C# Class CanvasBin.FragmentBinner.BinTask

Mostra file Open project: Illumina/canvas Class Usage Examples

Public Methods

Method Description
BinOneAlignment ( BamAlignment alignment, uint qualityThreshold, int>.Dictionary readNameToBinIndex, HashSet samePositionReadNames, long &usableFragmentCount, List bins, int &binIndexStart ) : void

Bins the fragment identified by alignment. Increases bin count if the first read of a pair passes all the filters. Decreases bin count if the second read of a pair does not pass all the filters.

BinTask ( string fastaFile, string chrom, string bamFile, List bins ) : System

DoIt ( ) : void

Performs fragment binning for the chromosome.

FindBestBin ( List bins, int binIndexStart, int fragmentStart, int fragmentStop ) : int

Starting from the bin at binIndexStart, increments the bin index and searches for the bin that overlaps the fragment the most. In case of a tie, the bin encountered first is returned.

IsDuplicateFailedQCLowQuality ( BamAlignment alignment, uint qualityThreshold ) : bool

Checks if any of the conditions is true: 1. The read is a duplicate, 2. The read failed QC, 3. The read is of low mapping quality.

IsRightMostInPair ( BamAlignment alignment ) : bool

Is the read the right-most one (by genomic position) in a pair?

Private Methods

Method Description
InitializeBins ( ) : void

Sets bin counts to 0.

binFragments ( ) : void

Bins fragments.

isBinGCAvailable ( ) : bool

Is %GC available for all bins?

populateBinGC ( ) : void

Calculates %GC for bins on the chromosome.

Method Details

BinOneAlignment() public static method

Bins the fragment identified by alignment. Increases bin count if the first read of a pair passes all the filters. Decreases bin count if the second read of a pair does not pass all the filters.
public static BinOneAlignment ( BamAlignment alignment, uint qualityThreshold, int>.Dictionary readNameToBinIndex, HashSet samePositionReadNames, long &usableFragmentCount, List bins, int &binIndexStart ) : void
alignment BamAlignment
qualityThreshold uint minimum mapping quality
readNameToBinIndex int>.Dictionary Dictionary of read name to bin index
samePositionReadNames HashSet
usableFragmentCount long number of usable fragments
bins List predefined bins
binIndexStart int bin index from which to start searching for the best bin
return void

BinTask() public method

public BinTask ( string fastaFile, string chrom, string bamFile, List bins ) : System
fastaFile string
chrom string chromosome
bamFile string path to BAM
bins List predefined bins
return System

DoIt() public method

Performs fragment binning for the chromosome.
public DoIt ( ) : void
return void

FindBestBin() public static method

Starting from the bin at binIndexStart, increments the bin index and searches for the bin that overlaps the fragment the most. In case of a tie, the bin encountered first is returned.
public static FindBestBin ( List bins, int binIndexStart, int fragmentStart, int fragmentStop ) : int
bins List
binIndexStart int
fragmentStart int
fragmentStop int
return int

IsDuplicateFailedQCLowQuality() public static method

Checks if any of the conditions is true: 1. The read is a duplicate, 2. The read failed QC, 3. The read is of low mapping quality.
public static IsDuplicateFailedQCLowQuality ( BamAlignment alignment, uint qualityThreshold ) : bool
alignment BamAlignment
qualityThreshold uint
return bool

IsRightMostInPair() public static method

Is the read the right-most one (by genomic position) in a pair?
public static IsRightMostInPair ( BamAlignment alignment ) : bool
alignment BamAlignment
return bool