milaboratory / mixcr

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

Runtime error of "Can't apply step BuildingInitialTrees" when running findShmTrees #1708

Closed omegahh closed 4 months ago

omegahh commented 4 months ago

Checklist before submitting the issue:

Expected Result

A description of what you wanted to happen I have 13 samples in one batch. 11 of them pass the findShmTrees analysis. but 2 of them failed, as one sample's log shown below.

Actual Result

A description of what actually happened

Search for clones with the same targets: 0%
Search for clones with the same targets: 64.6%  ETA: 00:00:00
Group clones by the same V, J and CDR3Length: 0%
Group clones by the same V, J and CDR3Length: 25.1%  ETA: 00:00:02
Group clones by the same V, J and CDR3Length: 59.6%  ETA: 00:00:01
Group clones by the same V, J and CDR3Length: 97.8%  ETA: 00:00:00
Step 1/3, Building initial trees: 0%
Step 1/3, Building initial trees: 11.5%  ETA: 00:00:15
Step 1/3, Building initial trees: 22.1%  ETA: 00:00:07
Can't apply step BuildingInitialTrees(predictor=ClusterPredictor(commonMutationsCountForClustering=5, maxNDNDistanceForClustering=1.0), algorithm=BronKerboschWithFallback(limit=10000000, fallback=com.milaboratory.mixcr.trees.CommandFindShmTreesParams$ClusterizationAlgorithm$SingleLinkage@118ea634)) on VJBase(V=IGHV3-74*01, J=IGHJ6*02, CDR3length=27)
Please copy the following information along with the stacktrace:
   Version: 4.6.0; built=Sun Dec 10 03:48:42 CST 2023; rev=c9fafa41fe; lib=repseqio.v4.0
        OS: Linux
      Java: 11.0.22
  Cmd args: findShmTrees -t 16 trim_mixcr/S2G07-MQ08-MT09.clns trim_mixcr/S2G07-MQ08-MT09.shmt -j logs/Library.06_S2G07-MQ08-MT09.mixcr_findShmTrees.json
picocli.CommandLine$ExecutionException: Error while running command findShmTrees java.lang.IndexOutOfBoundsException: Range = (-6<-1); size = 27
        at com.milaboratory.mixcr.cli.Main.registerExceptionHandlers$lambda-12(SourceFile:395)
        at picocli.CommandLine.execute(CommandLine.java:2088)
        at com.milaboratory.mixcr.cli.Main.main(SourceFile:101)
Caused by: java.lang.IndexOutOfBoundsException: Range = (-6<-1); size = 27
        at com.milaboratory.core.sequence.NucleotideSequence.getRange(SourceFile:166)
        at com.milaboratory.o.xs.a(SourceFile:110)
        at com.milaboratory.o.xy.a(SourceFile:109)
        at com.milaboratory.o.xw$d.a(SourceFile:53)
        at com.milaboratory.o.xw$d.b(SourceFile:41)
        at com.milaboratory.o.xz.a(SourceFile:151)
        at com.milaboratory.o.xw$d.a(SourceFile:53)
        at com.milaboratory.o.xw$d.b(SourceFile:41)
        at com.milaboratory.o.xw$a.a(SourceFile:236)
        at com.milaboratory.o.xw$b.a(SourceFile:203)
        at com.milaboratory.mixcr.trees.SHMTreeBuilderBySteps.a(SourceFile:36367)
        at com.milaboratory.mixcr.trees.SHMTreeBuilderBySteps.a(SourceFile:14295)
        at com.milaboratory.o.zP.process(SourceFile:36)
        at cc.redberry.pipe.blocks.ParallelProcessor$Worker.run(ParallelProcessor.java:308)
        at java.base/java.lang.Thread.run(Thread.java:829)
        Suppressed: java.lang.IllegalStateException: Footer not set
                at com.milaboratory.o.Bd.close(SourceFile:77)
                at kotlin.jdk7.AutoCloseableKt.closeFinally(AutoCloseable.kt:64)
                at com.milaboratory.mixcr.cli.CommandFindShmTrees.run1(SourceFile:341)
                at com.milaboratory.mixcr.cli.MiXCRCommandWithOutputs.run0(SourceFile:69)
                at com.milaboratory.mixcr.cli.MiXCRCommand.run(SourceFile:37)
                at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
                at picocli.CommandLine.access$1300(CommandLine.java:145)
                at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
                at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
                at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
                at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
                at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
                at com.milaboratory.mixcr.cli.Main.registerLogger$lambda-27(SourceFile:514)
                at picocli.CommandLine.execute(CommandLine.java:2078)
                at com.milaboratory.mixcr.cli.Main.main(SourceFile:101)

Exact MiXCR commands

Paste here exact MiXCR commands you used (enclose it with single ` for better formatting) mixcr findShmTrees -t 16 -Xmx160g trim_mixcr/S2G07-MQ08-MT09.clns trim_mixcr/S2G07-MQ08-MT09.shmt -j logs/Library.06_S2G07-MQ08-MT09.mixcr_findShmTrees.json &>> logs/Library.06_S2G07.log

MiXCR report files

Paste here content of the report files produced by MiXCR (enclose it with triple ``` for better formatting) No report file generated.

MiXCR version

MiXCR v4.6.0 (built Sun Dec 10 03:48:42 CST 2023; rev=c9fafa41fe; branch=no_branch; host=fv-az520-378)
RepSeq.IO v2.4.0 (rev=5b5b4475b8)
MiLib v3.4.0 (rev=d42f072b23)
Built-in V/D/J/C library: repseqio.v4.0
mizraelson commented 4 months ago

Hi, can you please try the latest develop version and confirm the error is still there. Also, do your samples come from the same patient? If needed you can pass multiple clns files to the findShmTrees command to generate trees across multiple samples if they all come from the same biological object.

omegahh commented 4 months ago

Thank you, I will try the latest develop version. They come from different patients. I can upload the .clns file if the error is still exist.

omegahh commented 4 months ago

The error is disappeared. I will analyze more samples to check the stability. Thank you!