genome-rcast / karkinos

Tumor genotyper, that detects SNV, absolute CNV and Tumor contents
Apache License 2.0
10 stars 2 forks source link

ArrayIndexOutOfBoundsException in mergeresult #2

Closed alumi closed 7 years ago

alumi commented 7 years ago

I got an exception while executing karkinos with following command.

java -Xmx15g -XX:+UseSerialGC -jar karkinos-standalone-2.0.4-SNAPSHOT.jar mergeresult -a /PATH/TO/ID.hg38_multianno.csv -v /PATH/TO/ID_snvdata.vcf
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 58
        at jp.ac.utokyo.rcast.karkinos.annotationutils.AnnoverOutputJoin.exec1(AnnoverOutputJoin.java:112)
        at jp.ac.utokyo.rcast.karkinos.annotationutils.AnnoverOutputJoin.main(AnnoverOutputJoin.java:47)
        at jp.ac.utokyo.rcast.karkinos.cmd.KarkinosCmd.main(KarkinosCmd.java:43)

The exception is thrown from here.

String chr = data[getIndex(csvtitle, "Chr")].trim();
// System.out.println(chr);
String pos = data[getIndex(csvtitle, "Start")].trim();
String end = data[getIndex(csvtitle, "End")].trim();
String ref = data[getIndex(csvtitle, "Ref")].trim();
String alt = data[getIndex(csvtitle, "Obs")].trim();

The header line of the input CSV file has not "Obs" but "Alt".

Chr,Start,End,Ref,Alt,Func.refGene_panel,Gene.refGene_panel,GeneDetail.refGene_panel,ExonicFunc.refGene_panel,AAChange.refGene_panel,cytoBand,genomicSuperDups,esp6500siv2_all,1000g2015aug_all,1000g2015aug_eur,ExAC_ALL,ExAC_AFR,ExAC_AMR,ExAC_EAS,ExAC_FIN,ExAC_NFE,ExAC_OTH,ExAC_SAS,avsnp147,SIFT_score,SIFT_pred,Polyphen2_HDIV_score,Polyphen2_HDIV_pred,Polyphen2_HVAR_score,Polyphen2_HVAR_pred,LRT_score,LRT_pred,MutationTaster_score,MutationTaster_pred,MutationAssessor_score,MutationAssessor_pred,FATHMM_score,FATHMM_pred,PROVEAN_score,PROVEAN_pred,VEST3_score,CADD_raw,CADD_phred,DANN_score,fathmm-MKL_coding_score,fathmm-MKL_coding_pred,MetaSVM_score,MetaSVM_pred,MetaLR_score,MetaLR_pred,integrated_fitCons_score,integrated_confidence_value,GERP++_RS,phyloP7way_vertebrate,phyloP20way_mammalian,phastCons7way_vertebrate,phastCons20way_mammalian,SiPhy_29way_logOdds

There're no string "Obs" in source code of table_annovar.pl

> grep Obs table_annovar.pl | wc -l
0
> grep Alt table_annovar.pl | wc -l
3

I think we can fix this by replacing "Obs" with "Alt". It that correct?

hirokiuedaRcast commented 7 years ago

Thanks.

In older version, its "Obs" and its "Alt" in newer version. I think I wrote the code that is compatible to both String, but seems fails to merge the code correctly. Hold on, and let me check this.

hirokiuedaRcast commented 7 years ago

I merge the code.

alumi commented 7 years ago

Thank you so much for the patch!