C# Class CanvasDiploidCaller.CanvasDiploidCaller

Show file Open project: Illumina/canvas Class Usage Examples

Public Properties

Property Type Description
CoverageWeighting double
IsDbsnpVcf bool
TempFolder string

Protected Properties

Property Type Description
MeanCoverage float
MedianHetSnpsDistance int
MinimumVariantFrequenciesForInformativeSegment int

Public Methods

Method Description
AggregateCounts ( List &segments ) : float[]
AggregateVariantCoverage ( List &segments ) : int
CallVariants ( string variantFrequencyFile, string inFile, string outFile, string ploidyBedPath, string referenceFolder, string sampleName, string truthDataPath ) : int
InitializePloidies ( ) : void

Setup: Model various copy ploidies.

Protected Methods

Method Description
GetKnownCNForSegment ( CanvasSegment segment ) : int

Check whether we know the CN for this segment. Look for a known-CN interval that covers (at least half of) this segment. Return -1 if we don't know its CN.

GetProjectedMeanCoverage ( double diploidCoverage ) : double[]

Compute the expected bin counts for each copy number, given a specified bin count for CN=2 regions

InitializeModelPoints ( CoverageModel model ) : List

Private Methods

Method Description
AssignPloidyCallsDistance ( CoverageModel model, List segments, int medianVariantCoverage ) : void
AssignPloidyCallsGaussianMixture ( ) : void

Assign a SegmentPloidy to each CanvasSegment, based on which model matches this segment best:

FitGaussians ( CoverageModel model, List segments, string debugPath = null ) : double

Fit a Gaussian mixture model. Fix the means to the model MAF and Coverage and run the EM algorithm until convergence. Compute the empirical MAF and Coverage. Fix the means to the empirical MAF and Coverage and run the EM algorithm again until convergence. Always estimate the full covariance matrix?

GenerateReportVersusKnownCN ( ) : void

Generate a table listing segments (and several features), and noting which are accurate (copy number exactly matches truth set) or directionally accurate (copy number and truth set are both <2, both =2, or both >2) This table will become our collection of feature vectors for training q-scores!

Method Details

AggregateCounts() public static method

public static AggregateCounts ( List &segments ) : float[]
segments List
return float[]

AggregateVariantCoverage() public static method

public static AggregateVariantCoverage ( List &segments ) : int
segments List
return int

CallVariants() public method

public CallVariants ( string variantFrequencyFile, string inFile, string outFile, string ploidyBedPath, string referenceFolder, string sampleName, string truthDataPath ) : int
variantFrequencyFile string
inFile string
outFile string
ploidyBedPath string
referenceFolder string
sampleName string
truthDataPath string
return int

GetKnownCNForSegment() protected method

Check whether we know the CN for this segment. Look for a known-CN interval that covers (at least half of) this segment. Return -1 if we don't know its CN.
protected GetKnownCNForSegment ( CanvasSegment segment ) : int
segment CanvasCommon.CanvasSegment
return int

GetProjectedMeanCoverage() protected static method

Compute the expected bin counts for each copy number, given a specified bin count for CN=2 regions
protected static GetProjectedMeanCoverage ( double diploidCoverage ) : double[]
diploidCoverage double
return double[]

InitializeModelPoints() protected method

protected InitializeModelPoints ( CoverageModel model ) : List
model CanvasCommon.CoverageModel
return List

InitializePloidies() public method

Setup: Model various copy ploidies.
public InitializePloidies ( ) : void
return void

Property Details

CoverageWeighting public static property

public static double CoverageWeighting
return double

IsDbsnpVcf public property

public bool IsDbsnpVcf
return bool

MeanCoverage protected property

protected float MeanCoverage
return float

MedianHetSnpsDistance protected property

protected int MedianHetSnpsDistance
return int

MinimumVariantFrequenciesForInformativeSegment protected static property

protected static int MinimumVariantFrequenciesForInformativeSegment
return int

TempFolder public property

public string TempFolder
return string