public StringBuilder GetMultiSampleCommandLine(SampleSet <CanvasPedigreeSample> samples, GenomeMetadata genomeMetadata, Vcf vcf, IDirectoryLocation sampleSandbox)
        {
            StringBuilder commandLine = new StringBuilder();

            foreach (var sampleKvp in samples)
            {
                var sampleId = sampleKvp.Key.Id;
                var sample   = sampleKvp.Value;
                commandLine.Append($" --bam \"{sample.Bam.BamFile}\"");
                if (sample.SampleType != SampleType.Other)
                {
                    commandLine.Append($" --{sample.SampleType.GetOptionName()} {sampleId}");
                }
            }
            IFileLocation kmerFasta = _annotationFileProvider.GetKmerFasta(genomeMetadata);

            commandLine.Append($" --reference \"{kmerFasta}\"");
            IDirectoryLocation wholeGenomeFasta = new FileLocation(genomeMetadata.Sequences.First().FastaPath).Directory;

            commandLine.Append($" --genome-folder \"{wholeGenomeFasta}\"");
            IFileLocation filterBed = _annotationFileProvider.GetFilterBed(genomeMetadata);

            commandLine.Append($" --filter-bed \"{filterBed}\"");
            commandLine.Append($" --output \"{sampleSandbox}\"");
            return(commandLine);
        }
        public StringBuilder GetSingleSampleCommandLine(string sampleId, Bam bam, GenomeMetadata genomeMetadata, IDirectoryLocation sampleSandbox)
        {
            StringBuilder commandLine = new StringBuilder();

            commandLine.Append($" --bam \"{bam.BamFile}\"");
            commandLine.Append($" --sample-name \"{sampleId}\"");
            IFileLocation kmerFasta = _annotationFileProvider.GetKmerFasta(genomeMetadata);

            commandLine.Append($" --reference \"{kmerFasta}\"");
            IDirectoryLocation wholeGenomeFasta = new FileLocation(genomeMetadata.Sequences.First().FastaPath).Directory;

            commandLine.Append($" --genome-folder \"{wholeGenomeFasta}\"");
            IFileLocation filterBed = _annotationFileProvider.GetFilterBed(genomeMetadata);

            commandLine.Append($" --filter-bed \"{filterBed}\"");
            commandLine.Append($" --output \"{sampleSandbox}\"");

            return(commandLine);
        }
예제 #3
0
        public StringBuilder GetMultiSampleCommandLine(SampleSet <CanvasPedigreeSample> samples, GenomeMetadata genomeMetadata, Vcf vcf, IDirectoryLocation sampleSandbox)
        {
            StringBuilder commandLine = new StringBuilder();
            // move proband to the front of collection (enum Proband gets the lowest int value )
            var sortedBySampleTypeSamples = samples.OrderBy(sample => sample.Value.SampleType);

            foreach (var sampleKvp in sortedBySampleTypeSamples)
            {
                var sampleId = sampleKvp.Key.Id;
                var sample   = sampleKvp.Value;
                commandLine.Append($" --bam \"{sample.Bam.BamFile}\" {sample.SampleType} {sampleId}");
            }
            IFileLocation kmerFasta = _annotationFileProvider.GetKmerFasta(genomeMetadata);

            commandLine.Append($" --reference \"{kmerFasta}\"");
            IDirectoryLocation wholeGenomeFasta = new FileLocation(genomeMetadata.Contigs().First().FastaPath).Directory;

            commandLine.Append($" --genome-folder \"{wholeGenomeFasta}\"");
            IFileLocation filterBed = _annotationFileProvider.GetFilterBed(genomeMetadata);

            commandLine.Append($" --filter-bed \"{filterBed}\"");
            commandLine.Append($" --output \"{sampleSandbox}\"");
            return(commandLine);
        }