C# Class CanvasCommon.CanvasSegment

Contains information about a genomic interval. Has functions for computing copy numbers and their likelihoods.
Afficher le fichier Open project: Illumina/canvas Class Usage Examples

Méthodes publiques

Свойство Type Description
Counts List
Filter string
MajorChromosomeCount int?
ModelDistance double
QScore double
RunnerUpModelDistance double
VariantFrequencies List
VariantTotalCoverage List
cnSwaped string

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

AssignQualityScores() public static méthode

Apply quality scores.
public static AssignQualityScores ( List segments, QScoreMethod qscoreMethod ) : void
segments List
qscoreMethod QScoreMethod
Résultat void

CanvasSegment() public méthode

public CanvasSegment ( string chr, int begin, int end, List counts ) : System
chr string
begin int
end int
counts List
Résultat System

ComputeQScore() public méthode

public ComputeQScore ( QScoreMethod qscoreMethod ) : int
qscoreMethod QScoreMethod
Résultat int

ExpectedCount() public static méthode

Compute the median count from a list of segments.
public static ExpectedCount ( List segments ) : double
segments List List of segments.
Résultat double

GetCnvType() public méthode

public GetCnvType ( int referenceCopyNumber ) : CnvType
referenceCopyNumber int
Résultat CnvType

GetQScorePredictor() public méthode

public GetQScorePredictor ( QScorePredictor predictorId ) : double
predictorId QScorePredictor
Résultat double

GetSegmentsByChromosome() public static méthode

public static GetSegmentsByChromosome ( List segments ) : List>.Dictionary
segments List
Résultat List>.Dictionary

MergeIn() public méthode

Merge another neighboring segment into this one.
public MergeIn ( CanvasSegment s ) : void
s CanvasSegment Segment to merge in.
Résultat void

MergeSegments() public static méthode

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
Résultat void

MergeSegmentsUsingExcludedIntervals() public static méthode

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
Résultat void

ReadSegments() public static méthode

Loads in data produced by CanvasPartition.exe.
public static ReadSegments ( string infile ) : List
infile string Input file.
Résultat List

WriteCoveragePlotData() public static méthode

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
Résultat void

WriteSegments() public static méthode

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
Résultat void

Property Details

Counts public_oe property

public List Counts
Résultat List

Filter public_oe property

public string Filter
Résultat string

MajorChromosomeCount public_oe property

public int? MajorChromosomeCount
Résultat int?

ModelDistance public_oe property

public double ModelDistance
Résultat double

QScore public_oe property

public double QScore
Résultat double

RunnerUpModelDistance public_oe property

public double RunnerUpModelDistance
Résultat double

VariantFrequencies public_oe property

public List VariantFrequencies
Résultat List

VariantTotalCoverage public_oe property

public List VariantTotalCoverage
Résultat List

cnSwaped public_oe property

public string cnSwaped
Résultat string