예제 #1
0
        public SampleSet <CanvasEnrichmentOutput> Run(SampleSet <CanvasEnrichmentInput> inputs, IDirectoryLocation sandbox)
        {
            var targetedDbSnpVcfs = _enrichmentInputCreator.CreateDbSnpVcfForManifests(inputs, sandbox, _annotationFileProvider);
            var manifests         = _enrichmentInputCreator.WriteManifests(inputs, sandbox);
            var outputs           = new SampleSet <CanvasEnrichmentOutput>();

            foreach (var input in inputs)
            {
                IDirectoryLocation sampleSandbox = sandbox.CreateSubdirectory(input.Key.Id);
                var dbSnpVcf = targetedDbSnpVcfs[input.Value.NexteraManifest];
                var manifest = manifests[input.Value.NexteraManifest];
                outputs.Add(input.Key, RunSingleSample(input.Key.Id, input.Value, dbSnpVcf, manifest, sampleSandbox));
            }
            return(outputs);
        }
예제 #2
0
        public SampleSet <Tuple <IFileLocation, bool> > GetBAlleleVcfs(SampleSet <CanvasTumorNormalEnrichmentInput> inputs, IDirectoryLocation sandbox)
        {
            var inputsUsingDbSnpVcf = inputs.WhereData(input => _annotationFileProvider.CustomDbSnpVcf(input.GenomeMetadata));
            var targetedDbSnpVcfs   = _enrichmentInputCreator.CreateDbSnpVcfForManifests(inputsUsingDbSnpVcf, sandbox, _annotationFileProvider);
            var bAlleleVcfs         = new SampleSet <Tuple <IFileLocation, bool> >();

            foreach (var input in inputs)
            {
                IFileLocation bAlleleVcf;
                bool          isDbSnpVcf = true;
                if (!targetedDbSnpVcfs.TryGetValue(input.Value.NexteraManifest, out bAlleleVcf))
                {
                    bAlleleVcf = input.Value.NormalVcf.VcfFile;
                    isDbSnpVcf = false;
                }
                bAlleleVcfs[input.Key] = Tuple.Create(bAlleleVcf, isDbSnpVcf);
            }
            return(bAlleleVcfs);
        }