MinzhuXie / H-PoPG

H-PoP and H-PoPG: Heuristic Partitioning Algorithms for Single Individual Haplotyping of Polyploids
8 stars 4 forks source link

NullPointerException when running H-PoPG with polyploid organism vcf #2

Closed euginm closed 7 years ago

euginm commented 7 years ago

Hello Minzhu,

I've experienced same problem described here when running H-PoPG with input VCF file: java -jar H-PoPG.jar -p 6 -f input_SNP_matrix -vcf input.vcf -o phased_haplotypes.txt

Exception in thread "main" java.lang.NullPointerException at algorithms.HBOP2Builder.<init>(HBOP2Builder.java:59) at algorithms.HBOP2Builder.<init>(HBOP2Builder.java:25) at algorithms.HPBOP2Alg.buildHaplotype(HPBOP2Alg.java:24) at main.PolyPlotyping.Polyphasing(PolyPlotyping.java:224) at main.PolyPlotyping.go(PolyPlotyping.java:159) at main.PolyPlotyping.main(PolyPlotyping.java:280)

I've checked the VCF file, there is no overlaps in it, it also contains full genotype information: chr1 930 . T G 2178.22 . AB=0.369668;ABP=34.1416;AC=2;AF=0.333333;AN=6;AO=78;CIGAR=1X;DP=211;DPB=211;DPRA=0;EPP=8.46682;EPPR=4.35297;GTI=0;LEN=1;MEANALT=2;MQM=18.2949;MQMR=50.0534;NS=1;NUMALT=1;ODDS=12.9311;PAIRED=0.205128;PAIREDR=0.694656;PAO=0;PQA=0;PQR=0;PRO=0;QA=2770;QR=4550;RO=131;RPP=172.385;RPPR=8.99428;RUN=1;SAF=32;SAP=8.46682;SAR=46;SRF=65;SRP=3.02688;SRR=66;TYPE=snp GT:DP:RO:QR:AO:QA 0/0/0/0/1/1:211:131:4550:78:2770

H-PoPG works fine without VCF file, though I'd like to know, if it's a problem with VCF file or not.

MinzhuXie commented 7 years ago

Hi euginm, Could you please send the files of input_SNP_matrix and input.vcf to me by email? I would like to have a check. Minzhu

MinzhuXie commented 7 years ago

There is a bug in the program dealing with the vcf file, which requires that the Filter field (the seventh column) of each line must be set as "PASS" to be regarded as a valid SNP. chr1 930 . T G 2178.22 PASS ...........

I will modify the program and update the modified program as soon as possible.

MinzhuXie commented 7 years ago

Please download the modified version H-PoPG-v-0.1.jar which solve this issue.