chapmanb / bcbio.variation

Toolkit to analyze genomic variation data, built on the GATK with Clojure
66 stars 15 forks source link

Cannot cast java.lang.Integer to java.lang.CharSequence #25

Closed lbeltrame closed 9 years ago

lbeltrame commented 9 years ago

This occurs when using variant-compare on two VCF files. I'm pretty sure there is some invalid value, however this error does not tell me exactly what is wrong with it.

Trace:

java.lang.ClassCastException: Cannot cast java.lang.Integer to java.lang.CharSequence
        at java.lang.Class.cast(Unknown Source)
        at clojure.lang.Reflector.boxArg(Reflector.java:411)
        at clojure.lang.Reflector.boxArgs(Reflector.java:444)
        at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:58)
        at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
        at bcbio.variation.filter.intervals$vcf_sample_name$sample_match__2799$fn__2800.invoke(intervals.clj:31)
        at clojure.core$filter$fn__4226.invoke(core.clj:2533)
        at clojure.lang.LazySeq.sval(LazySeq.java:42)
        at clojure.lang.LazySeq.seq(LazySeq.java:60)
        at clojure.lang.RT.seq(RT.java:484)
        at clojure.lang.RT.countFrom(RT.java:537)
        at clojure.lang.RT.count(RT.java:530)
        at bcbio.variation.filter.intervals$vcf_sample_name$sample_match__2799.invoke(intervals.clj:32)
        at bcbio.variation.filter.intervals$vcf_sample_name.invoke(intervals.clj:38)
        at bcbio.variation.filter.intervals$select_by_sample.doInvoke(intervals.clj:50)
        at clojure.lang.RestFn.invoke(RestFn.java:846)
        at bcbio.variation.combine$dirty_prep_work$run_sample_select__1157.invoke(combine.clj:142)
        at bcbio.variation.combine$dirty_prep_work.invoke(combine.clj:144)
        at bcbio.variation.combine$gatk_normalize.invoke(combine.clj:189)
        at bcbio.variation.compare$prepare_vcf_calls$fn__7526.invoke(compare.clj:120)
        at clojure.core$map$fn__4207.invoke(core.clj:2487)
        at clojure.lang.LazySeq.sval(LazySeq.java:42)
        at clojure.lang.LazySeq.seq(LazySeq.java:60)
        at clojure.lang.RT.seq(RT.java:484)
        at clojure.lang.LazilyPersistentVector.create(LazilyPersistentVector.java:31)
        at clojure.core$vec.invoke(core.clj:354)
        at bcbio.variation.compare$prepare_vcf_calls.invoke(compare.clj:121)
        at bcbio.variation.compare$variant_comparison_from_config$iter__7582__7586$fn__7587.invoke(compare.clj:255)
        at clojure.lang.LazySeq.sval(LazySeq.java:42)
        at clojure.lang.LazySeq.seq(LazySeq.java:60)
        at clojure.lang.RT.seq(RT.java:484)
        at clojure.core$seq.invoke(core.clj:133)
        at clojure.core$tree_seq$walk__4647$fn__4648.invoke(core.clj:4475)
        at clojure.lang.LazySeq.sval(LazySeq.java:42)
        at clojure.lang.LazySeq.seq(LazySeq.java:60)
        at clojure.lang.LazySeq.more(LazySeq.java:96)
        at clojure.lang.RT.more(RT.java:607)
        at clojure.core$rest.invoke(core.clj:73)
        at clojure.core$flatten.invoke(core.clj:6478)
        at bcbio.variation.compare$variant_comparison_from_config.invoke(compare.clj:254)
        at bcbio.variation.compare$_main.invoke(compare.clj:274)
        at clojure.lang.AFn.applyToHelper(AFn.java:161)
        at clojure.lang.AFn.applyTo(AFn.java:151)
        at clojure.core$apply.invoke(core.clj:617)
        at bcbio.variation.core$_main.doInvoke(core.clj:35)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at bcbio.variation.core.main(Unknown Source)
chapmanb commented 9 years ago

Luca; Sorry about the issue, I think this might be due to sample names like '1234' being treated as numbers instead of strings. If that makes sense with your input file, could you try this snapshot to see if that resolves the issue:

https://github.com/chapmanb/bcbio.variation/releases/download/0.2.3-SNAPSHOT-20150115/bcbio.variation-0.2.3-SNAPSHOT-standalone.jar

Fingers crossed that does it. Thanks again for the report.

lbeltrame commented 9 years ago

Yes, with the latest snapshot, it is fixed.