Illumina / canvas

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

CanvasPedigreeCaller looking for hardcoded path to GenomeSize.xml #91

Open david-a-parry opened 6 years ago

david-a-parry commented 6 years ago

Hi,

Using the precompiled release Canvas-1.38.0.1554+master_x64, I run into the following error when running the SmallPedigree-WGS workflow:

2018-08-10T01:07:05+01:00,ERROR: Job CanvasPedigreeCaller failed with exit code 255. Job logs: 
    /path/edited/for/privacy/canvas_cnv_calling/canvas_results/1268/Logging/CanvasPedigreeCaller.stdout
    /path/edited/for/privacy/canvas_cnv_calling/canvas_results/1268/Logging/CanvasPedigreeCaller.stderr
Job error message:
2018-08-10T01:07:04+01:00,ERROR: Exception caught in WorkDoerFactory. Cancelling all jobs. Exception: 
    Could not find a part of the path '/path/edited/for/privacy/Sequence/WholeGenomeFasta/GenomeSize.xml'.
System.IO.DirectoryNotFoundException: Could not find a part of the path '/path/edited/for/privacy/Sequence/WholeGenomeFasta/GenomeSize.xml'.
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.FileInfo.OpenRead()
   at Isas.SequencingFiles.GenomeMetadata.Deserialize(IReferenceGenome referenceGenome)
   at Isas.SequencingFiles.ReferenceGenome.get_GenomeMetadata()
   at CanvasPedigreeCaller.Program.<>c__DisplayClass2_0.<Run>b__12(IWorkDoer workDoer) in D:\TeamCity\buildAgent\work\a29a190a11771d97\Src\Canvas\CanvasPedigreeCaller\Program.cs:line 175
   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-08-10T01:07:05+01: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 appears that despite providing the location of the --genome-folder containing GenomeSize.xml when invoking the SmallPedigree-WGS workflow, the CanvasPedigreeCaller expects 'Sequence/WholeGenomeFasta/GenomeSize.xml' to be present in the parent directory of my 'Canvas-1.38.0.1554+master_x64' folder (or equivalently, two folders above the location specified using the --genome-folder argument). The workflow completes successfully if I add the file where the program expects it, but it would be great if this could be fixed so I don't have to clutter my directory in order to get this to run or remember this fix when running on a different machine.

Thanks

Dave

cvlvxi commented 5 years ago

I also got this..

bump

eroller commented 5 years ago

this is a known issue, but there are no plans for a future Canvas release. Please use the workaround mentioned above (use expected directory structure).

david-a-parry commented 5 years ago

Given the cumbersome nature of the workaround and the lack of any future release, would someone be willing to point me to where in the code the problem arises so that I can fork and fix this issue myself without trawling through all the source code?

eroller commented 5 years ago

Unfortunately there are some binary library dependencies (NuGet packages) that we haven't included in the repo so it won't be possible to build from source at the moment. I could give them to you if you really want to give it a shot, but it doesn't seem worth the effort. Setting up the reference genome is a one time task involving downloading from S3 so creating the correct directory structure at that time shouldn't be too cumbersome.