snijderlab / stitch

Template-based assembly of proteomics short reads for de novo antibody sequencing and repertoire profiling
MIT License
22 stars 3 forks source link

error when provided a single template with more than 12000 proteins #252

Open irleader opened 2 weeks ago

irleader commented 2 weeks ago

"at Stitch.PhylogeneticTree+Tree1[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Remodel[[System.ValueTuple2[[System.Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Func2<Tree1,System.ValueTuple2<System.__Canon,System.__Canon>>) ...... at Stitch.PhylogeneticTree+Tree1[[System.Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Remodel[[System.ValueTuple`2[[System.Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Func2<Tree1<System.Canon>,System.ValueTuple2<System.__Canon,System.__Canon>>) at Stitch.PhylogeneticTree+ProteinHierarchyTree..ctor(Tree1, System.Collections.Generic.List1<Stitch.Alignment>) at Stitch.RunParameters.Run.<RunTemplateMatching>g__BuildTree|20_2(Stitch.Segment) at Stitch.RunParameters.Run+<>c.<RunTemplateMatching>b__20_4(Stitch.Segment) at System.Threading.Tasks.Parallel+<>c__DisplayClass44_02[[System.Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].b1(System.Collections.IEnumerator ByRef, Int32, Boolean ByRef) at System.Threading.Tasks.TaskReplicator+Replica`1[[System.Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ExecuteAction(Boolean ByRef) at System.Threading.Tasks.TaskReplicator+Replica.Execute() at System.Threading.Tasks.TaskReplicator+Replica+<>c.<.ctor>b4_0(System.Object) at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task+<>c.<.cctor>b__273_0(System.Object) at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef, System.Threading.Thread) at System.Threading.Tasks.Task.ExecuteEntryUnsafe(System.Threading.Thread) at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(System.Threading.Tasks.Task, Boolean) at System.Threading.Tasks.TaskScheduler.TryRunInline(System.Threading.Tasks.Task, Boolean) at System.Threading.Tasks.Task.InternalRunSynchronously(System.Threading.Tasks.TaskScheduler, Boolean) at System.Threading.Tasks.Task.RunSynchronously(System.Threading.Tasks.TaskScheduler) at System.Threading.Tasks.TaskReplicator+Replica.Start() at System.Threading.Tasks.TaskReplicator.Run[[System.Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](ReplicatableUserAction1<System.__Canon>, System.Threading.Tasks.ParallelOptions, Boolean) at System.Threading.Tasks.Parallel.PartitionerForEachWorker[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Concurrent.Partitioner1, System.Threading.Tasks.ParallelOptions, System.Action1<System.__Canon>, System.Action2<System.Canon,System.Threading.Tasks.ParallelLoopState>, System.Action`3<System.Canon,System.Threading.Tasks.ParallelLoopState,Int64>, System.Func4<System.__Canon,System.Threading.Tasks.ParallelLoopState,System.__Canon,System.__Canon>, System.Func5<System.Canon,System.Threading.Tasks.ParallelLoopState,Int64,System.Canon,System.Canon>, System.Func`1<System.Canon>, System.Action1<System.__Canon>) at System.Threading.Tasks.Parallel.ForEachWorker[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable1, System.Threading.Tasks.ParallelOptions, System.Action1<System.__Canon>, System.Action2<System.Canon,System.Threading.Tasks.ParallelLoopState>, System.Action`3<System.Canon,System.Threading.Tasks.ParallelLoopState,Int64>, System.Func4<System.__Canon,System.Threading.Tasks.ParallelLoopState,System.__Canon,System.__Canon>, System.Func5<System.Canon,System.Threading.Tasks.ParallelLoopState,Int64,System.Canon,System.Canon>, System.Func`1<System.Canon>, System.Action1<System.__Canon>) at System.Threading.Tasks.Parallel.ForEach[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable1, System.Threading.Tasks.ParallelOptions, System.Action`1) at Stitch.RunParameters.Run.RunTemplateMatching() at Stitch.RunParameters.Run.Calculate() at Stitch.ToRunWithCommandLine.RunBatchFile(System.String, Stitch.ExtraArguments) at Stitch.ToRunWithCommandLine.Main()"

This is the tail of the error message, the same dataset (around 1000 reads) and batchfile works well with a template of 500 proteins, when the template is replace with 12000 proteins, this error comes out. The first part of the message keeps repeating, I only paste 2 repeats here.

douweschulte commented 2 weeks ago

From the stacktrace I can see it crashes in the phylogenetic tree generation. Turning the tree generation off will prevent this crash, use BuildTree: False as argument in the TemplateMatching section to turn this off. Either the C# stacktrace misses the underlying issue or that issue was present earlier in the stacktrace, but from this info I will not be able to pinpoint the exact issue. Hopefully just turning off the tree is enough to make it usable for your use case.