milaboratory / mixcr

MiXCR is an ultimate software platform for analysis of Next-Generation Sequencing (NGS) data for immune profiling.
https://mixcr.com
Other
323 stars 78 forks source link

NPE in assemblePartial #176

Closed bbimber closed 7 years ago

bbimber commented 7 years ago

Hello,

We just updated to Mixcr 2.0.2, and are seeing an NPE when running assemblePartial. It seems to have something to do w/ either not lacking any TRB hits, or our custom library. See the commands, outputs and stack below:

run this

mixcr align -f -r log.txt -s rhesus -OallowPartialAlignments=true -g -p rna-seq --library rhesus -OallowChimeras=true -t 8 Clone39-R1.fastq.gz Clone39-R2.fastq.gz Clone39.1.rhesus.mixcr.vdjca

output below, note TRA matching only

Reference library: rhesus:9544 (6daa1e92265f95d206ebff3ff02cd2a8) WARNING: Functional gene TRBV3-1*01 doesn't contain full VTranscriptWithout5UTRWithP (excluded) WARNING: ... 63 more functional genes excluded due to absent "featureToAlign". Alignment: 100% ============= Report ============== Analysis time: 1.03s Total sequencing reads: 254 Successfully aligned reads: 42 (16.54%) Alignment failed, no hits (not TCR/IG?): 126 (49.61%) Alignment failed because of absence of CDR3 parts: 74 (29.13%) Alignment failed because of low total score: 12 (4.72%) Overlapped: 60 (23.62%) Overlapped and aligned: 10 (3.94%) Overlapped and not aligned: 50 (19.69%) [TRA] chains: 42 (100%)

then run this, which fails with the NPE

mixcr assemblePartial -p -f -r log.txt Clone39.1.rhesus.mixcr.vdjca Clone39.1.rhesus.mixcr.partial.1.vdjca Searching for overlaps: 100% Exception in thread "main" java.lang.NullPointerException at com.milaboratory.mixcr.partialassembler.PartialAlignmentsAssemblerAligner.process0(PartialAlignmentsAssemblerAligner.java:102) at com.milaboratory.mixcr.partialassembler.PartialAlignmentsAssemblerAligner.process0(PartialAlignmentsAssemblerAligner.java:26) at com.milaboratory.mixcr.vdjaligners.VDJCAligner.process(VDJCAligner.java:74) at com.milaboratory.mixcr.partialassembler.PartialAlignmentsAssembler.searchOverlaps(PartialAlignmentsAssembler.java:129) at com.milaboratory.mixcr.cli.ActionAssemblePartialAlignments.go(ActionAssemblePartialAlignments.java:51) at com.milaboratory.cli.JCommanderBasedMain.main(JCommanderBasedMain.java:147) at com.milaboratory.mixcr.cli.Main.main(Main.java:113)

As a test, I repeated the align command, except included "-OvParameters.geneFeatureToAlign=VRegion" in the align command:

mixcr align -f -OvParameters.geneFeatureToAlign=VRegion -r log.txt -s rhesus -OallowPartialAlignments=true -g -p rna-seq --library rhesus -OallowChimeras=true -t 8 Clone39-R1.fastq.gz Clone39-R2.fastq.gz Clone39.1.rhesus.mixcr.vdjca

output, seeing a TRB hit:

Alignment: 100% ============= Report ============== Analysis time: 1.34s Total sequencing reads: 254 Successfully aligned reads: 40 (15.75%) Alignment failed, no hits (not TCR/IG?): 133 (52.36%) Alignment failed because of absence of CDR3 parts: 70 (27.56%) Alignment failed because of low total score: 11 (4.33%) Overlapped: 60 (23.62%) Overlapped and aligned: 12 (4.72%) Overlapped and not aligned: 48 (18.9%) [TRA] chains: 39 (97.5%) [TRB] chains: 1 (2.5%)

Then if you run the exact same assemblePartial command as above, it now works.

dbolotin commented 7 years ago

This seems to have something to do with absence of D genes in the library. Basically it looks like a bug.) I will now try to fix it and send you new jar, so you can confirm that it fixes the problem.

dbolotin commented 7 years ago

Please try this version, and let me know if it fixes the issue: http://files.milaboratory.com/mixcr/mixcr-2.0.3-hotfix.zip

bbimber commented 7 years ago

It did fix the NPE. I'm going to try to add D genes to our library anyway, since this is probably a good idea. Thanks!

dbolotin commented 7 years ago

Great!