public SampleSet <CanvasOutput> Run(SampleSet <CanvasTumorNormalWgsInput> inputs, IDirectoryLocation sandbox)
        {
            var outputs = new SampleSet <CanvasOutput>();

            foreach (var input in inputs)
            {
                IDirectoryLocation sampleSandbox = sandbox.CreateSubdirectory(input.Key.Id);
                outputs.Add(input.Key, RunSingleSample(input.Key.Id, input.Value, sampleSandbox));
            }
            return(outputs);
        }
示例#2
0
        public SampleSet <T> Load(SampleSet <TIn> input)
        {
            var set = new SampleSet <T>();

            foreach (var sample in input)
            {
                IFileLocation stub = _convention(sample.Key);
                ILoadingConvention <TIn, T> namingConvention = _loadingConventionGenerator(stub);
                T output = namingConvention.Load(sample.Value);
                set.Add(sample.Key, output);
            }
            return(set);
        }
        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);
        }
示例#4
0
        public SampleSet <CanvasOutput> Run(SampleSet <CanvasTumorNormalEnrichmentInput> inputs, IDirectoryLocation sandbox)
        {
            var bAlleleVcfs = GetBAlleleVcfs(inputs, sandbox);
            var manifests   = _enrichmentInputCreator.WriteManifests(inputs, sandbox);
            var outputs     = new SampleSet <CanvasOutput>();

            foreach (var input in inputs)
            {
                IDirectoryLocation sampleSandbox = sandbox.CreateSubdirectory(input.Key.Id);
                var bAlleleVcf = bAlleleVcfs[input.Key].Item1;
                var isDbSnpVcf = bAlleleVcfs[input.Key].Item2;
                var manifest   = manifests[input.Value.NexteraManifest];
                outputs.Add(input.Key, RunSingleSample(input.Key.Id, input.Value, bAlleleVcf, isDbSnpVcf, manifest, sampleSandbox));
            }
            return(outputs);
        }
示例#5
0
        private void ProcessSample(SampleSet sample)
        {
#if UseAverage
            if (!isSumInitialized)
            {
                isSumInitialized = true;
                // init running averaging store
                indexSamples = 0;
                samplesSum   = sample * samples.Length;
                for (int indexSample = 0; indexSample < samples.Length; indexSample++)
                {
                    samples[indexSample] = sample;
                }
            }
            else
            {
                samplesSum.Subtract(samples[indexSamples]);
                samplesSum.Add(sample);
                samples[indexSamples] = sample;
            }

            SampleSet averageSample = samplesSum / samples.Length;
#endif
            this.Dispatcher.BeginInvoke(DispatcherPriority.Normal,
                                        new UpdateTbsDelegate(
                                            delegate()
            {
                for (int indexChannel = 0; indexChannel < sample.Channels.Length; indexChannel++)
                {
                    switch (sample.Channels[indexChannel].Channel)
                    {
                    case 0:
                        UpdateGraphBar(sample.Channels[indexChannel],
                                       sample.Channels[indexChannel],
                                       tbs1Label,
                                       tbs1DeltaLabel,
                                       tbs1RpmLabel,
                                       tbs1,
                                       tbs1Average,
                                       tbs1Reading,
                                       tbs1MinMax);
                        break;

                    case 1:
                        UpdateGraphBar(sample.Channels[indexChannel],
                                       sample.Channels[indexChannel],
                                       tbs2Label,
                                       tbs2DeltaLabel,
                                       tbs2RpmLabel,
                                       tbs2,
                                       tbs2Average,
                                       tbs2Reading,
                                       tbs2MinMax);
                        break;

                    case 2:
                        UpdateGraphBar(sample.Channels[indexChannel],
                                       sample.Channels[indexChannel],
                                       tbs3Label,
                                       tbs3DeltaLabel,
                                       tbs3RpmLabel,
                                       tbs3,
                                       tbs3Average,
                                       tbs3Reading,
                                       tbs3MinMax);
                        break;

                    case 3:
                        UpdateGraphBar(sample.Channels[indexChannel],
                                       sample.Channels[indexChannel],
                                       tbs4Label,
                                       tbs4DeltaLabel,
                                       tbs4RpmLabel,
                                       tbs4,
                                       tbs4Average,
                                       tbs4Reading,
                                       tbs4MinMax);
                        break;
                    }
                }
            }));
        }