MinzhuXie / H-PoPG

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

Error can not input multiple fragment files #10

Open nadiabaig opened 2 years ago

nadiabaig commented 2 years ago

Hi, I am using H-PoPG tool get the haplotypes. I am using the following code:

java -jar /src/H-PoPG-master/H-PoPGv0.2.0.jar -p 4 -f out.txt -v Chr01.vcf -d phased_Chr01_cc_hap.txt here the out.txt file contains multiple fragment files: frag_cc_0.txt frag_cc_1.txt frag_cc_2.txt frag_cc_3.txt frag_cc_4.txt frag_cc_5.txt

Error: Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at dataStructure.Block.(Block.java:36) at main.PolyPlotyping.go(PolyPlotyping.java:220) at main.PolyPlotyping.main(PolyPlotyping.java:417)

It works fine when only 1 fragment file is provided.

Looking forward for the answer. Thanks

MinzhuXie commented 2 years ago

Please see the readme: -f input_SNP_matrix_file_name The input_SNP_matrix_file should be the file providing the information of the SNP matrix, not the fragment file names. The format of the file had been described in the README file.

2021年11月11日 上午2:21,Nadia Baig @.***> 写道:

Hi, I am using H-PoPG tool get the haplotypes. I am using the following code:

java -jar /src/H-PoPG-master/H-PoPGv0.2.0.jar -p 4 -f out.txt -v Chr01.vcf -d phased_Chr01_cc_hap.txt here the out.txt file contains multiple fragment files: frag_cc_0.txt frag_cc_1.txt frag_cc_2.txt frag_cc_3.txt frag_cc_4.txt frag_cc_5.txt

Error: Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at dataStructure.Block.(Block.java:36) at main.PolyPlotyping.go(PolyPlotyping.java:220) at main.PolyPlotyping.main(PolyPlotyping.java:417)

It works fine when only 1 fragment file is provided.

Looking forward for the answer. Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/MinzhuXie/H-PoPG/issues/10, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUAUZV5CAUDLVL77V3I3GLULKZ2FANCNFSM5HYSIBOQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.