Skip to content
This repository has been archived by the owner on May 15, 2020. It is now read-only.

Sequence contains no elements? #97

Closed
alvaralmstedt opened this issue Sep 28, 2018 · 11 comments
Closed

Sequence contains no elements? #97

alvaralmstedt opened this issue Sep 28, 2018 · 11 comments

Comments

@alvaralmstedt
Copy link

Hi!

Running rhel7, we are having issues getting Canvas Somatic-WGS for version 1.38.0.1554 working with our whole genome samples:

dotnet /apps/bio/software/canvas/1.38.0.1554/Canvas.dll Somatic-WGS -b /tmp/canvas_on_sentieon/LCH16_REALIGNED_tumor.bam --sample-b-allele-vcf=/tmp/canvas_on_sentieon/LCH16_normal_SVs.vcf -o /tmp/canvas_on_sentieon/new --reference=/medstore/External_References/Canvas_CLC_HG19_Dataset/kmer.fa -g /medstore/External_References/Canvas_CLC_HG19_Dataset/new/Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta -f /medstore/External_References/Canvas_CLC_HG19_Dataset/new/Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta/filter13.bed -n WGS --ploidy-vcf=/apps/bio/software/canvas/female_hg19.vcf

The error I’m getting is:

2018-09-25T15:29:16+02:00,ERROR: Job SomaticCNV-WGS failed with exit code 134. Job logs:
        /tmp/canvas_on_sentieon/new/Logging/SomaticCNV-WGS.stdout
        /tmp/canvas_on_sentieon/new/Logging/SomaticCNV-WGS.stderr
Job error message:
Unhandled Exception: System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.Average(IEnumerable`1 source)
   at CanvasSomaticCaller.SomaticCaller.CallVariants(String inFile, String variantFrequencyFile, String outputVCFPath, String referenceFolder, String name, Nullable`1 localSDmetric, Nullable`1 evennessScore, CanvasSomaticClusteringMode clusteringMode) in D:\TeamCity\buildAgent\work\a29a190a11771d97\Src\Canvas\CanvasSomaticCaller\SomaticCaller.cs:line 392
   at CanvasSomaticCaller.Program.Main(String[] args) in D:\TeamCity\buildAgent\work\a29a190a11771d97\Src\Canvas\CanvasSomaticCaller\Program.cs:line 196
2018-09-25T15:29:16+02:00,ERROR: Canvas workflow error: Isas.Framework.WorkManagement.JobFailedException: Job SomaticCNV-WGS failed with exit code 134
   at Isas.Framework.WorkManagement.JobLaunching.BasicJobLauncher.<RunSystemProcessCheckExitAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Isas.Framework.WorkManagement.JobLaunching.RuntimeTrackingJobLauncher.<LaunchJobAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Isas.Framework.WorkManagement.IJobLauncherExtensions.LaunchJob(IJobLauncher jobLauncher, JobInfo jobInfo, Action`1 stdoutCallback, Action`1 stderrCallback)
   at Isas.Framework.WorkManagement.IWorkDoerJobExtensions.<>c__DisplayClass0_0`1.<DoWork>b__0(WorkResources sr, IJobLauncher jobLauncher)
   at Isas.Framework.WorkManagement.ResourceManagement.ThreadedWorkResourceManager.<>c__DisplayClass11_0`1.<RunWithResources>b__3(WorkResources resources)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Isas.Framework.WorkManagement.ResourceManagement.ThreadedWorkResourceManager.<<RunWithResources>b__11_1>d`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Isas.Framework.WorkManagement.AsTaskExtensions.Await[T](Task`1 task)
   at Canvas.CanvasRunner.RunSomaticCalling(IFileLocation partitionedPath, CanvasCallset callset, String canvasBedPath, String ploidyVcfPath, IFileLocation localSdMetricFile, IFileLocation evennessMetricFile, IFileLocation canvasSnvPath)
   at Canvas.CanvasRunner.<>c__DisplayClass38_0.<CallSampleInternal>b__5()
   at Isas.Framework.Checkpointing.Legacy.LegacyCheckpointRunner.<>c__DisplayClass0_0.<RunCheckpoint>b__0()
   at Isas.Framework.Checkpointing.Internals.SerializingCheckpointRunner.<>c__DisplayClass8_0`1.<RunCheckpoint>b__0(Checkpoint checkpoint)
   at Isas.Framework.Checkpointing.Internals.CoreCheckpointRunner.RunCheckpoint[TResult](String name, Func`2 run)
   at Isas.Framework.Checkpointing.Legacy.LegacyCheckpointRunner.RunCheckpoint(ICheckpointRunner runner, String name, Action a)
   at Canvas.CanvasRunner.<CallSampleInternal>d__38.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Canvas.CanvasRunner.CallSample(CanvasCallset callset)
   at Canvas.ModeLauncher.Launch()

This error seems to happen when I am using vcf-files versioned 4.2 or 4.1 for the --sample-b-allele-vcf input. When using the old dbsnp_common_all_20160601.vcf (vcf v4.0) it instead crashed with the following error:

2018-09-26T16:49:03+02:00,ERROR: Job SomaticCNV-WGS failed with exit code 134. Job logs:
        /tmp/canvas_on_sentieon/old_bam/result/Logging/SomaticCNV-WGS.stdout
        /tmp/canvas_on_sentieon/old_bam/result/Logging/SomaticCNV-WGS.stderr
Job error message:
Unhandled Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRange_IndexException()
   at CanvasSomaticCaller.SomaticCaller.GetUsableSegmentsAndSourcesForModeling(IEnumerable`1 segments, Boolean IsEnrichment, Int32 MinimumVariantFrequenciesForInformativeSegment, Nullable`1 overallMedianCoverage) in D:\TeamCity\buildAgent\work\a29a190a11771d97\Src\Canvas\CanvasSomaticCaller\SomaticCaller.cs:line 1436
   at CanvasSomaticCaller.SomaticCaller.GetUsableSegmentsForModeling(List`1 segments, Boolean IsEnrichment, Int32 MinimumVariantFrequenciesForInformativeSegment, Nullable`1 overallMediancoverage) in D:\TeamCity\buildAgent\work\a29a190a11771d97\Src\Canvas\CanvasSomaticCaller\SomaticCaller.cs:line 1428
   at CanvasSomaticCaller.SomaticCaller.ModelOverallCoverageAndPurity(Int64 genomeLength, CanvasSomaticClusteringMode clusteringMode, Nullable`1 evennessScore) in D:\TeamCity\buildAgent\work\a29a190a11771d97\Src\Canvas\CanvasSomaticCaller\SomaticCaller.cs:line 1628
   at CanvasSomaticCaller.SomaticCaller.CallCNVUsingSNVFrequency(Nullable`1 localSDmetric, Nullable`1 evennessScore, String referenceFolder, CanvasSomaticClusteringMode clusteringMode) in D:\TeamCity\buildAgent\work\a29a190a11771d97\Src\Canvas\CanvasSomaticCaller\SomaticCaller.cs:line 2556
   at CanvasSomaticCaller.SomaticCaller.CallVariants(String inFile, String variantFrequencyFile, String outputVCFPath, String referenceFolder, String name, Nullable`1 localSDmetric, Nullable`1 evennessScore, CanvasSomaticClusteringMode clusteringMode) in D:\TeamCity\buildAgent\work\a29a190a11771d97\Src\Canvas\CanvasSomaticCaller\SomaticCaller.cs:line 437
   at CanvasSomaticCaller.Program.Main(String[] args) in D:\TeamCity\buildAgent\work\a29a190a11771d97\Src\Canvas\CanvasSomaticCaller\Program.cs:line 196
2018-09-26T16:49:03+02:00,ERROR: Canvas workflow error: Isas.Framework.WorkManagement.JobFailedException: Job SomaticCNV-WGS failed with exit code 134
   at Isas.Framework.WorkManagement.JobLaunching.BasicJobLauncher.<RunSystemProcessCheckExitAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Isas.Framework.WorkManagement.JobLaunching.RuntimeTrackingJobLauncher.<LaunchJobAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Isas.Framework.WorkManagement.IJobLauncherExtensions.LaunchJob(IJobLauncher jobLauncher, JobInfo jobInfo, Action`1 stdoutCallback, Action`1 stderrCallback)
   at Isas.Framework.WorkManagement.IWorkDoerJobExtensions.<>c__DisplayClass0_0`1.<DoWork>b__0(WorkResources sr, IJobLauncher jobLauncher)
   at Isas.Framework.WorkManagement.ResourceManagement.ThreadedWorkResourceManager.<>c__DisplayClass11_0`1.<RunWithResources>b__3(WorkResources resources)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Isas.Framework.WorkManagement.ResourceManagement.ThreadedWorkResourceManager.<<RunWithResources>b__11_1>d`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Isas.Framework.WorkManagement.AsTaskExtensions.Await[T](Task`1 task)
   at Canvas.CanvasRunner.RunSomaticCalling(IFileLocation partitionedPath, CanvasCallset callset, String canvasBedPath, String ploidyVcfPath, IFileLocation localSdMetricFile, IFileLocation evennessMetricFile, IFileLocation canvasSnvPath)
   at Canvas.CanvasRunner.<>c__DisplayClass38_0.<CallSampleInternal>b__5()
   at Isas.Framework.Checkpointing.Legacy.LegacyCheckpointRunner.<>c__DisplayClass0_0.<RunCheckpoint>b__0()
   at Isas.Framework.Checkpointing.Internals.SerializingCheckpointRunner.<>c__DisplayClass8_0`1.<RunCheckpoint>b__0(Checkpoint checkpoint)
   at Isas.Framework.Checkpointing.Internals.CoreCheckpointRunner.RunCheckpoint[TResult](String name, Func`2 run)
   at Isas.Framework.Checkpointing.Legacy.LegacyCheckpointRunner.RunCheckpoint(ICheckpointRunner runner, String name, Action a)
   at Canvas.CanvasRunner.<CallSampleInternal>d__38.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

Which I found this person also had an issue with this: #86
Although he was running on PC and using TN-enrichment instead of Somatic-WGS

Do you suggest we stick with the old canvas version 1.11.0 & mono when running canvas on Red Hat instead of trying to get the newer versions using dotnet core running or is there some fix i could try for the new version?

Thankful for any assistance!

@eroller
Copy link
Member

eroller commented Oct 19, 2018

your error is likely different than in issue #86. The first error you are seeing I think is because of mismatched chromosome names in the small variant vcf and the reference genome fasta? The second error you are seeing is likely a problem with the data, either noisiness in the read coverage resulting in no usable segments. Essentially Canvas cannot fit a purity/ploidy model. What is the coverage of the WGS sample? Which sequencer was used? We recommend at least 40x coverage for T/N WGS

@alvaralmstedt
Copy link
Author

Hi Eric!

Thank you for the response.

We are using the "b37" -version of hg19 (https://wiki.dnanexus.com/scientific-notes/human-genome)
for our upstream analysis.
I have double and triple- checked all the files to see that the files are using the correct chromosome names (1..22, X, Y, MT):

  • kmer.fa
  • genome.fa
  • genome.fa.fai
  • GenomeSize.xml
  • filter13.bed

But it's still throwing the "Sequence contains no elements" error.

I also tried trimming down the --sample-b-allele-vcf file to contain just 10 or so SNVs but same error.

Is there something hardcoded that looks for "chr" in the chromosome names?

Our WGS samples are 60x tumour 30x normal. I think the machine used for this is HiSeq X-Ten. Not exactly sure but its one of the Hi-Seq machines.

Do you mean that the coverage for tumour should be 40x or above or both the tumour and normal?

Thanks again!

@eroller
Copy link
Member

eroller commented Oct 26, 2018

The file you are passing for --sample-b-allele-vcf is named LCH16_normal_SVs.vcf. Are these structural variants? They need to be SNVs in the normal sample from a small variant caller, preferably strelka.

We recommend 40x normal and 80x tumor, but the analysis should still work with 30x normal /60x tumor.

@alvaralmstedt
Copy link
Author

alvaralmstedt commented Oct 30, 2018

Thanks for the rapid response!

Yes, initially that vcf also contained indels and SVs along with SNVs, but we removed all non-SNV variants from this file and Canvas crashed with the same "Sequence contains no elements" message.

We are using the Sentieon DNAscope software to call the variants, which is outputting VCFv4.2.

I have so far not been able to get Somatic-WGS running with any vcf file. Germline-WGS, I have gotten to work using the dbsnp vcf- Below are some of my results:

  • Tried Somatic-WGS with --population-b-allele-vcf=dbsnp. Doesn’t work. Index was out of range
  • Tried Somatic-WGS with with --pop-b-allele-vcf=dbsnp and --somatic-vcf=sentieon SNV only tumor vcf. Index was out of range
  • Tried Somatic-WGS with --sample-b-allele-vcf=sentieon-normal SNV-only vcf. Sequence contains no elements.
  • Tried Germline-WGS with --sample-b-allele-vcf=sentieon normal SNV-only vcf. Sequence contains no elements.
  • Tried Germline-WGS with --population-b-allele-vcf=dbsnp. Works!
  • Tried Germline-WGS with --population-b-allele-vcf=sentieon normal SNV-only vcf. Sequence contains no elements.
  • Tried Germline-WGS with --sample-b-allele-vcf=dbsnp. Works!
  • Tried Somatic-WGS with --bam=new 90x tumor.bam --pop-b-allele-vcf=dbsnp. Index was out of range

My only remaining idea is that my vcf is incorrectly formatted for Canvas somehow, as the dbsnp vcf either results in other error or works. Is there some limit on the number of fields allowed in the input vcf? Could trying some vcf version downgrade tool (4.2 -> 4.0) work?

In case none of that would work, my backup would be to use dbsnp for all samples.

In that case, I'm curious as to why the Germline WGS works fine with a 30x normal bam but Somatic fails to fit a purity/ploidy model using the 60x and 90x tumor bam?

I have also tried Running v1.11.0 on the same bam and vcf which worked fine ran though, producing an empty output:

mono /apps/CLC_ExternalApps/canvas/1.11.0/Canvas.exe Somatic-WGS -b /tmp/canvas_mono/bams/LCH16_REALIGNED_tumor.bam --b-allele-vcf=/tmp/canvas_mono/vcf/LCH16_germline_SNVs.vcf.recode.vcf --exclude-non-het-b-allele-sites -o /tmp/canvas_mono/mono1/ --reference=/medstore/External_References/Canvas_CLC_HG19_Dataset/custom/Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta/kmer2.fa -g /medstore/External_References/Canvas_CLC_HG19_Dataset/custom/Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta/ -f /medstore/External_References/Canvas_CLC_HG19_Dataset/custom/Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta/filter13.bed -n somatic_mono --custom-parameters=CanvasBin,-p

Using dbsnp as the vcf did produce good output, however.

How big are the improvements of going to a newer version like 1.38.0.1554 versus 1.11.0?

I have also noted that you've updated Canvas to version 1.39.0.1598. Could upgrading to this version possibly ameliorate the issue? The notes merely mention an issue with multiple samples.

Any ideas would be helpful.

Thanks!

@eroller
Copy link
Member

eroller commented Oct 30, 2018

Can you show me the stack trace for this scenario:

Tried Germline-WGS with --sample-b-allele-vcf=sentieon normal SNV-only vcf. Sequence contains no elements.

I want to compare it to the Somatic-WGS case. The problem with the Somatic-WGS case is definitely a problem with the SNVs. I don't think vcf spec 4.2 vs 4.1 would cause a problem.

1.38.0.1554 is substantially different than 1.11.0 and should give superior performance. 1.39.0.1598 won't give any different for single sample analysis compared to 1.38.0.1554.

If you could share an example SNV entry in the vcf that could also help troubleshoot.

@alvaralmstedt
Copy link
Author

Thanks again for the quick response.

I reran the following command:

[root@kuat test18]# dotnet /apps/bio/software/canvas/1.38.0.1554/Canvas.dll Germline-WGS -b /tmp/canvas_on_sentieon/bams/LCH16_REALIGNED_normal.bam --population-b-allele-vcf=/tmp/canvas_on_sentieon/vcf/LCH16_germline_SNVs.vcf.recode_LCH16_normal.vcf -n germlinewgs -o /tmp/canvas_on_sentieon/test18/ --ploidy-vcf=/apps/bio/software/canvas/male_hg19.vcf --reference=/medstore/External_References/Canvas_CLC_HG19_Dataset/custom/Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta/kmer2.fa -g /medstore/External_References/Canvas_CLC_HG19_Dataset/custom/Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta/ -f /medstore/External_References/Canvas_CLC_HG19_Dataset/custom/Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta/filter13.bed

Which resulted in the following stacktrace:

2018-10-31T10:13:19+01:00,Launching process for job CNV.vcf.gz:
/opt/rh/rh-dotnet20/root/usr/bin/dotnet /apps/bio/software/canvas/1.38.0.1554/CanvasDiploidCaller/CanvasDiploidCaller.dll -i "/tmp/canvas_on_sentieon/test18/TempCNV_germlinewgs/germlinewgs.partitioned" -v "/tmp/canvas_on_sentieon/test18/TempCNV_germlinewgs/VFResultsgermlinewgs.txt.gz" -o "/tmp/canvas_on_sentieon/test18/CNV.vcf.gz" -n "germlinewgs" -r "/medstore/External_References/Canvas_CLC_HG19_Dataset/custom/Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta" -p "/apps/bio/software/canvas/male_hg19.vcf" -d
2018-10-31T10:13:31+01:00,Job CNV.vcf.gz duration: 00:00:12.5
2018-10-31T10:13:31+01:00,ERROR: Job CNV.vcf.gz failed with exit code 134. Job logs:
        /tmp/canvas_on_sentieon/test18/Logging/CNV.vcf.gz.stdout
        /tmp/canvas_on_sentieon/test18/Logging/CNV.vcf.gz.stderr
Job error message:
Unhandled Exception: System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.Average(IEnumerable`1 source)
   at CanvasDiploidCaller.CanvasDiploidCaller.CallVariants(String variantFrequencyFile, String inFile, String outFile, String ploidyVcfPath, String referenceFolder, String sampleName, String truthDataPath) in D:\TeamCity\buildAgent\work\a29a190a11771d97\Src\Canvas\CanvasDiploidCaller\CanvasDiploidCaller.cs:line 298
   at CanvasDiploidCaller.Program.Main(String[] args) in D:\TeamCity\buildAgent\work\a29a190a11771d97\Src\Canvas\CanvasDiploidCaller\Program.cs:line 98
2018-10-31T10:13:31+01:00,ERROR: Canvas workflow error: Isas.Framework.WorkManagement.JobFailedException: Job CNV.vcf.gz failed with exit code 134
   at Isas.Framework.WorkManagement.JobLaunching.BasicJobLauncher.<RunSystemProcessCheckExitAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Isas.Framework.WorkManagement.JobLaunching.RuntimeTrackingJobLauncher.<LaunchJobAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Isas.Framework.WorkManagement.IJobLauncherExtensions.LaunchJob(IJobLauncher jobLauncher, JobInfo jobInfo, Action`1 stdoutCallback, Action`1 stderrCallback)
   at Isas.Framework.WorkManagement.IWorkDoerJobExtensions.<>c__DisplayClass0_0`1.<DoWork>b__0(WorkResources sr, IJobLauncher jobLauncher)
   at Isas.Framework.WorkManagement.ResourceManagement.ThreadedWorkResourceManager.<>c__DisplayClass11_0`1.<RunWithResources>b__3(WorkResources resources)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Isas.Framework.WorkManagement.ResourceManagement.ThreadedWorkResourceManager.<<RunWithResources>b__11_1>d`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Isas.Framework.WorkManagement.AsTaskExtensions.Await[T](Task`1 task)
   at Canvas.CanvasRunner.RunGermlineCalling(IFileLocation partitionedPath, CanvasCallset callset, String ploidyVcfPath, IFileLocation canvasSnvPath)
   at Isas.Framework.Checkpointing.Legacy.LegacyCheckpointRunner.<>c__DisplayClass0_0.<RunCheckpoint>b__0()
   at Isas.Framework.Checkpointing.Internals.SerializingCheckpointRunner.<>c__DisplayClass8_0`1.<RunCheckpoint>b__0(Checkpoint checkpoint)
   at Isas.Framework.Checkpointing.Internals.CoreCheckpointRunner.RunCheckpoint[TResult](String name, Func`2 run)
   at Isas.Framework.Checkpointing.Legacy.LegacyCheckpointRunner.RunCheckpoint(ICheckpointRunner runner, String name, Action a)
   at Canvas.CanvasRunner.<CallSampleInternal>d__38.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Canvas.CanvasRunner.CallSample(CanvasCallset callset)
   at Canvas.ModeLauncher.Launch()

I will also attach a truncated version of the normal vcf I used:

LCH16_normal_SNVonly_truncated.zip

Thanks again Eric!

@eroller
Copy link
Member

eroller commented Nov 1, 2018

Germline-WGS is deprecated. Can you try running SmallPedigree-WGS? It supports single sample analysis.

@eroller
Copy link
Member

eroller commented Nov 1, 2018

I think the problem might be the FILTER column. It is "." and we are using only PASS variants. Try changing them to PASS.

@alvaralmstedt
Copy link
Author

Hi Eric!

I modified the vcf to use only PASS in the FILTER- column.

After initially having some issues with dependencies for bedGraphToBigWig (libpng12.so.0), I got this command to run through:

dotnet /apps/bio/software/canvas/1.38.0.1554/Canvas.dll SmallPedigree-WGS -b /tmp/canvas_on_sentieon/bams/LCH16_REALIGNED_normal.bam --population-b-allele-vcf=/tmp/canvas_on_sentieon/vcf/LCH16_germline_SNVs.vcf.recode_PASS.vcf -o /tmp/canvas_on_sentieon/test25/ --reference=/medstore/External_References/Canvas_CLC_HG19_Dataset/custom/Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta/kmer2.fa -g /medstore/External_References/Canvas_CLC_HG19_Dataset/custom/Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta/ -f /medstore/External_References/Canvas_CLC_HG19_Dataset/custom/Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta/filter13.bed

I also got the command for Somatic-WGS to work:

dotnet /apps/bio/software/canvas/1.38.0.1554/Canvas.dll Somatic-WGS -b /tmp/canvas_on_sentieon/bams/LCH16_REALIGNED_tumor.bam --sample-b-allele-vcf=/tmp/canvas_on_sentieon/vcf/LCH16_germline_SNVs.vcf.recode_PASS.vcf -o /tmp/canvas_on_sentieon/test28_TN/ --reference=/medstore/External_References/Canvas_CLC_HG19_Dataset/custom/Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta/kmer2.fa -g /medstore/External_References/Canvas_CLC_HG19_Dataset/custom/Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta/ -f /medstore/External_References/Canvas_CLC_HG19_Dataset/custom/Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta/filter13.bed --sample-name=TN_WGS --ploidy-vcf=/apps/bio/software/canvas/male_hg19.vcf

So it seems like the FILTER column was the issue. I did consider this when I looked at the help output saying "vcf containing SNV b-allele sites in the sample (only sites with PASS in the filter column will be used) (either this option or option population-b-allele-vcf is required)". I disregarded it though, since dbsnp and my vcf both had "." and crashed with different error outputs.

Thanks a lot for the help Eric, very nice to have it working again!

@eroller
Copy link
Member

eroller commented Nov 2, 2018

Interesting, I did not realize bedGraphToBigWig required libpng12. That should probably be statically linked!

@sbamin
Copy link

sbamin commented Dec 24, 2018

I too had libpng12 missing error. We have an updated version, libpng16. I ended up replacing canvas bedGraphToBigWig with an updated binary from Kent utilities,

mkdir -p /os7apps/kent

rsync -azvP rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/ /os7apps/kent/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants