Illumina / canvas

Canvas - Copy number variant (CNV) calling from DNA sequencing data
Other
121 stars 20 forks source link

Canvas for SE data? #105

Open fedkon opened 5 years ago

fedkon commented 5 years ago

Hi!

Is it possible to run Canvas on single-end WGS reads? By default the results of SmallPedigree-WGS workflow are basically empty and the following error is produced:

2018-11-15T21:42:09+03:00,ERROR: Job CanvasPedigreeCaller failed with exit code 255. Job logs: 
    /home/fedor/Canvas/out/Logging/CanvasPedigreeCaller.stdout
    /home/fedor/Canvas/out/Logging/CanvasPedigreeCaller.stderr
Job error message:
2018-11-15T21:42:09+03:00,ERROR: Exception caught in WorkDoerFactory. Cancelling all jobs. Exception: 
    Cannot calculate median of an empty SortedList.
System.Exception: Cannot calculate median of an empty SortedList.
   at Illumina.Common.SortedListExtensions.Median[T](SortedList`1 list, Func`3 average)
   at CanvasPedigreeCaller.SampleMetrics.GetSampleInfo(IReadOnlyList`1 segments, String ploidyBedPath, Int32 numberOfTrimmedBins, SampleId id) in D:\TeamCity\buildAgent\work\a29a190a11771d97\Src\Canvas\CanvasPedigreeCaller\SampleMetrics.cs:line 38
   at CanvasPedigreeCaller.CanvasPedigreeCaller.CallVariants(List`1 variantFrequencyFiles, List`1 segmentFiles, IFileLocation outVcfFile, String ploidyBedPath, String referenceFolder, List`1 sampleNames, String commonCnvsBedPath, List`1 sampleTypes) in D:\TeamCity\buildAgent\work\a29a190a11771d97\Src\Canvas\CanvasPedigreeCaller\CanvasPedigreeCaller.cs:line 86
   at CanvasPedigreeCaller.Program.<>c__DisplayClass2_0.<Run>b__12(IWorkDoer workDoer) in D:\TeamCity\buildAgent\work\a29a190a11771d97\Src\Canvas\CanvasPedigreeCaller\Program.cs:line 190
   at Isas.Framework.WorkManagement.JobLaunching.JobLauncherFactory.RunWithJobLauncher(ILogger logger, ISettings settings, IDirectoryLocation loggingDir, Action`1 logCommand, CancellationToken cancellationToken, Action`1 function)
   at Isas.Framework.WorkManagement.JobLaunching.JobLauncherFactory.RunWithJobLauncher(ILogger logger, ISettings settings, IDirectoryLocation analysisFolder, CancellationToken cancellationToken, Action`1 function)
   at Isas.Framework.WorkManagement.ResourceManagement.WorkResourceManagerFactory.RunWithResourceManager(ILogger logger, ISettings settings, CancellationToken cancellationToken, Action`1 function)
   at Isas.Framework.WorkManagement.WorkDoerFactory.RunWithWorkDoer(ILogger logger, ISettings settings, IDirectoryLocation analysisFolder, CancellationTokenSource cancellationTokenSource, Action`1 function)
   at CanvasPedigreeCaller.Program.Run(String[] args) in D:\TeamCity\buildAgent\work\a29a190a11771d97\Src\Canvas\CanvasPedigreeCaller\Program.cs:line 192
   at CanvasPedigreeCaller.Program.Main(String[] args) in D:\TeamCity\buildAgent\work\a29a190a11771d97\Src\Canvas\CanvasPedigreeCaller\Program.cs:line 39
2018-11-15T21:42:09+03:00,ERROR: Canvas workflow error: Isas.Framework.WorkManagement.JobFailedException: Job CanvasPedigreeCaller failed with exit code 255
   at Isas.Framework.WorkManagement.JobLaunching.BasicJobLauncher.RunSystemProcessCheckExitAsync(JobInfo job, Action`1 stdoutCallback, Action`1 stderrCallback)
   at Isas.Framework.WorkManagement.JobLaunching.RuntimeTrackingJobLauncher.LaunchJobAsync(JobInfo jobInfo, Action`1 stdoutCallback, Action`1 stderrCallback)
   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 Isas.Framework.WorkManagement.ResourceManagement.ThreadedWorkResourceManager.<RunWithResources>b__11_1[T](Task`1 resourceRequestTask, Task`1 functionTask)
   at Isas.Framework.WorkManagement.AsTaskExtensions.Await[T](Task`1 task)
   at Canvas.CanvasRunner.RunSmallPedigreeCalling(List`1 partitionedPaths, SmallPedigreeCallset callsets)
   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(SmallPedigreeCallset callset)
   at Canvas.CanvasRunner.CallPedigree(SmallPedigreeCallset callset)
   at Canvas.ModeLauncher.Launch()

It looks like SmallPedigree-WGS puts "-p" option into CanvasBin.dll command line which means "paired-end". I'll try to bypass CanvasBin checkpoint and run this step manually without "-p", but it would be nice to have a workflow option for SE reads, if the algorithm allows it.

eroller commented 5 years ago

It isn't something we have tested for a while and certainly not for SmallPedigree-WGS. Hopefully removing the -p option will work for you. I believe you will lose half your sequence coverage for single end since we use only forward strand alignments for binning. We briefly investigated relaxing that requirement, but never followed through with the implementation.