C# Class Bio.Variant.VariantCaller

This class takes alignments and generates a list of variants.
Show file Open project: dotnetbio/bio Class Usage Examples

Public Methods

Method Description
CallVariants ( IPairwiseSequenceAlignment aln ) : List

Given a pairwise sequence alignment, call variants, producing a list of SNPs and Indels found in the alignment. This method will first left-align all variants before calling to be consistent with other software. The

LeftAlignIndelsAndCallVariants ( IPairwiseSequenceAlignment aln, bool callVariants = true ) : List>.Tuple

Given two byte arrays representing a pairwise alignment, shift them so that all deletions start as early as possible. For example: TTTTAAAATTTT -> Converts to -> TTTTAAAATTTT TTTTAA--TTTT TTTT--AATTTT This function takes a IPairwiseSequenceAlignment and assumes that the first sequence is the reference and second sequence is the query. It returns a new Pairwise sequence alignment with all of the indels left aligned as well as a list of variants.

Private Methods

Method Description
CallVariants ( byte refSeq, Bio.Variant.BPandQV querySeq, bool originallyReverseComplemented ) : List

Calls the variants. Should only be used internally as assumptions are made that the alignments are left-aligned and fulfill certain criteria.

determineHomoPolymerLength ( int pos, byte refSeq ) : char>.Tuple

Returns the length of the homopolymer

getBases ( Bio.Variant.BPandQV array, int position, int length ) : string

Gets the bases for a length of the sequence as a string.

getBases ( byte array, int position, int length ) : string

Converts a subset of bases in the array into a string.

Method Details

CallVariants() public static method

Given a pairwise sequence alignment, call variants, producing a list of SNPs and Indels found in the alignment. This method will first left-align all variants before calling to be consistent with other software. The
public static CallVariants ( IPairwiseSequenceAlignment aln ) : List
aln IPairwiseSequenceAlignment The Pairwise alignment to call variants with.
return List

LeftAlignIndelsAndCallVariants() public static method

Given two byte arrays representing a pairwise alignment, shift them so that all deletions start as early as possible. For example: TTTTAAAATTTT -> Converts to -> TTTTAAAATTTT TTTTAA--TTTT TTTT--AATTTT This function takes a IPairwiseSequenceAlignment and assumes that the first sequence is the reference and second sequence is the query. It returns a new Pairwise sequence alignment with all of the indels left aligned as well as a list of variants.
public static LeftAlignIndelsAndCallVariants ( IPairwiseSequenceAlignment aln, bool callVariants = true ) : List>.Tuple
aln IPairwiseSequenceAlignment Aln. The second sequence should be of type QualitativeSequence or Sequence
callVariants bool callVariants. If true, it will call variants, otherwise the second half of tuple will be null.
return List>.Tuple