C# Класс CanvasCommon.CanvasSegment

Contains information about a genomic interval. Has functions for computing copy numbers and their likelihoods.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Counts List
Filter string
MajorChromosomeCount int?
ModelDistance double
QScore double
RunnerUpModelDistance double
VariantFrequencies List
VariantTotalCoverage List
cnSwaped string

Открытые методы

Метод Описание
AssignQualityScores ( List segments, QScoreMethod qscoreMethod ) : void

Apply quality scores.

CanvasSegment ( string chr, int begin, int end, List counts ) : System
ComputeQScore ( QScoreMethod qscoreMethod ) : int
ExpectedCount ( List segments ) : double

Compute the median count from a list of segments.

GetCnvType ( int referenceCopyNumber ) : CnvType
GetQScorePredictor ( QScorePredictor predictorId ) : double
GetSegmentsByChromosome ( List segments ) : List>.Dictionary
MergeIn ( CanvasSegment s ) : void

Merge another neighboring segment into this one.

MergeSegments ( List &segments, int MinimumCallSize, int maximumMergeSpan = 10000 ) : void

Iterates through a list of segments and merges those which have the same copy number call. Also, for segments smaller than MinimumCallSize, assimilate them into the neighbor with the best quality score. Two consecutive segments are considered neighbors if they're on the same chromosome and the space between them is not too large.

MergeSegmentsUsingExcludedIntervals ( List &segments, int MinimumCallSize, Dictionary excludedIntervals ) : void

Iterates through a list of segments and merges those which have the same copy number call. Also, for segments smaller than MinimumCallSize, assimilate them into the neighbor with the best quality score. Two consecutive segments are considered neighbors if they're on the same chromosome and the space between them doesn't overlap with any excluded intervals.

ReadSegments ( string infile ) : List

Loads in data produced by CanvasPartition.exe.

WriteCoveragePlotData ( List segments, double normalDiploidCoverage, PloidyInfo referencePloidy, string filePath, string referenceFolder ) : void

Generate a tabular file with information about coverage and allele frequency for each chunk of the genome. This file can be used to generate a pretty plot of coverage versus MAF.

WriteSegments ( string outVcfPath, List segments, string wholeGenomeFastaDirectory, string sampleName, List extraHeaders, PloidyInfo ploidy, int qualityThreshold = 10 ) : void

Outputs the copy number calls to a text file.

Приватные методы

Метод Описание
IsForbiddenInterval ( string chr, int start, int end, Dictionary excludedIntervals ) : bool

Return true if we are not allowed to merge two segments separated by the interval (start, end).

SanityCheckChromosomeNames ( GenomeMetadata genome, List segments ) : void

Integrity check, to ensure that our reference FASTA file is in sync with our inputs.

Описание методов

AssignQualityScores() публичный статический Метод

Apply quality scores.
public static AssignQualityScores ( List segments, QScoreMethod qscoreMethod ) : void
segments List
qscoreMethod QScoreMethod
Результат void

CanvasSegment() публичный Метод

public CanvasSegment ( string chr, int begin, int end, List counts ) : System
chr string
begin int
end int
counts List
Результат System

ComputeQScore() публичный Метод

public ComputeQScore ( QScoreMethod qscoreMethod ) : int
qscoreMethod QScoreMethod
Результат int

ExpectedCount() публичный статический Метод

Compute the median count from a list of segments.
public static ExpectedCount ( List segments ) : double
segments List List of segments.
Результат double

GetCnvType() публичный Метод

public GetCnvType ( int referenceCopyNumber ) : CnvType
referenceCopyNumber int
Результат CnvType

GetQScorePredictor() публичный Метод

public GetQScorePredictor ( QScorePredictor predictorId ) : double
predictorId QScorePredictor
Результат double

GetSegmentsByChromosome() публичный статический Метод

public static GetSegmentsByChromosome ( List segments ) : List>.Dictionary
segments List
Результат List>.Dictionary

MergeIn() публичный Метод

Merge another neighboring segment into this one.
public MergeIn ( CanvasSegment s ) : void
s CanvasSegment Segment to merge in.
Результат void

MergeSegments() публичный статический Метод

Iterates through a list of segments and merges those which have the same copy number call. Also, for segments smaller than MinimumCallSize, assimilate them into the neighbor with the best quality score. Two consecutive segments are considered neighbors if they're on the same chromosome and the space between them is not too large.
public static MergeSegments ( List &segments, int MinimumCallSize, int maximumMergeSpan = 10000 ) : void
segments List
MinimumCallSize int
maximumMergeSpan int
Результат void

MergeSegmentsUsingExcludedIntervals() публичный статический Метод

Iterates through a list of segments and merges those which have the same copy number call. Also, for segments smaller than MinimumCallSize, assimilate them into the neighbor with the best quality score. Two consecutive segments are considered neighbors if they're on the same chromosome and the space between them doesn't overlap with any excluded intervals.
public static MergeSegmentsUsingExcludedIntervals ( List &segments, int MinimumCallSize, Dictionary excludedIntervals ) : void
segments List
MinimumCallSize int
excludedIntervals Dictionary
Результат void

ReadSegments() публичный статический Метод

Loads in data produced by CanvasPartition.exe.
public static ReadSegments ( string infile ) : List
infile string Input file.
Результат List

WriteCoveragePlotData() публичный статический Метод

Generate a tabular file with information about coverage and allele frequency for each chunk of the genome. This file can be used to generate a pretty plot of coverage versus MAF.
public static WriteCoveragePlotData ( List segments, double normalDiploidCoverage, PloidyInfo referencePloidy, string filePath, string referenceFolder ) : void
segments List
normalDiploidCoverage double
referencePloidy PloidyInfo
filePath string
referenceFolder string
Результат void

WriteSegments() публичный статический Метод

Outputs the copy number calls to a text file.
public static WriteSegments ( string outVcfPath, List segments, string wholeGenomeFastaDirectory, string sampleName, List extraHeaders, PloidyInfo ploidy, int qualityThreshold = 10 ) : void
outVcfPath string
segments List
wholeGenomeFastaDirectory string
sampleName string
extraHeaders List
ploidy PloidyInfo
qualityThreshold int
Результат void

Описание свойств

Counts публичное свойство

public List Counts
Результат List

Filter публичное свойство

public string Filter
Результат string

MajorChromosomeCount публичное свойство

public int? MajorChromosomeCount
Результат int?

ModelDistance публичное свойство

public double ModelDistance
Результат double

QScore публичное свойство

public double QScore
Результат double

RunnerUpModelDistance публичное свойство

public double RunnerUpModelDistance
Результат double

VariantFrequencies публичное свойство

public List VariantFrequencies
Результат List

VariantTotalCoverage публичное свойство

public List VariantTotalCoverage
Результат List

cnSwaped публичное свойство

public string cnSwaped
Результат string