cgatools::variants::Call Struct Reference

A struct that corresponds to a single line of a Complete Genomics variant file. More...

#include <Call.hpp>

List of all members.

Classes

struct  AlternativeCall
class  AlternativeCallsField
class  TotalScoreField
class  VarFilterField
class  VarQualityField

Public Member Functions

 Call ()
 Construct an empty call.
std::string calledSequence (const reference::CrrFile &crr) const
 Returns the called sequence as a string, replacing "=" with the corresponding reference sequence.
std::string refSequence (const reference::CrrFile &crr) const
 Returns the reference sequence as a string, replacing "=" with the corresponding reference sequence.
bool isRefConsistent (const reference::CrrFile &crr) const
 Returns true iff the alleleSeq_ is consistent with the reference.
bool hasNoCalls () const
 Returns true iff this call's sequence sequence contains N or ? characters.
void addFieldParsers (util::DelimitedFile &df, const reference::CrrFile &crr)
 Add fields to parser so that it can parse lines, putting data in this call.
void addVarFilter (const std::string &filter)
 Adds a filter string to varFilter_ vector.
std::ostream & write (std::ostream &out, const reference::CrrFile &crr, const char sep= '\t') const
 Writes the call out, using the given separator charactor.

Static Public Member Functions

static void parseAlternativeCalls (const char *first, const char *last, std::vector< AlternativeCall > &alternativeCalls)
 Parse alternativeCalls field.
static void parseVarFilter (const char *first, const char *last, std::vector< std::string > &varFilter)
 Parse varFilter field.
static std::string getHeader (const char separator= '\t')
 Returns header for a call output.

Public Attributes

uint32_t locus_
 The locus column in the variant file.
uint16_t ploidy_
 The ploidy column in the variant file.
uint16_t haplotype_
 The haplotype column in the variant file.
reference::Range range_
 The chromosome, begin, and end columns in the variant file.
std::string varType_
 The varType column in the variant file.
std::string reference_
 The reference column in the variant file.
std::string alleleSeq_
 The alleleSeq column in the variant file.
int32_t varScoreVAF_
 The varScoreVAF column in the variant file.
int32_t varScoreEAF_
 The varScoreEAF column in the variant file.
std::vector< std::string > varFilter_
 The varFilter column in the variant file.
std::string hapLink_
 The hapLink column in the variant file.
std::string xRef_
 The xRef column in the variant file.
std::string alleleFreq_
 The alleleFreq column in the variant file.
std::vector< AlternativeCallalternativeCalls_
 The alternativeCalls column in the variant file.

Static Public Attributes

static const uint16_t ALL_HAPLOTYPES
 The "all" haplotype == [1..ploidy_] haplotypes.
static const uint16_t UNKNOWN_PLOIDY
 Unknown ploidy, normally in no-ref regions on genome.
static const int32_t EMPTY_SCORE
 The in-memory score corresponding to empty score on disk.

Detailed Description

A struct that corresponds to a single line of a Complete Genomics variant file.


Member Function Documentation

void cgatools::variants::Call::addFieldParsers ( util::DelimitedFile df,
const reference::CrrFile crr 
)

Add fields to parser so that it can parse lines, putting data in this call.

std::string cgatools::variants::Call::calledSequence ( const reference::CrrFile crr  )  const

Returns the called sequence as a string, replacing "=" with the corresponding reference sequence.

bool cgatools::variants::Call::hasNoCalls (  )  const

Returns true iff this call's sequence sequence contains N or ? characters.

bool cgatools::variants::Call::isRefConsistent ( const reference::CrrFile crr  )  const

Returns true iff the alleleSeq_ is consistent with the reference.

std::string cgatools::variants::Call::refSequence ( const reference::CrrFile crr  )  const

Returns the reference sequence as a string, replacing "=" with the corresponding reference sequence.


Member Data Documentation

The haplotype column in the variant file.

The value is Call::ALL_HAPLOTYPES if the variant file specifies "all".

The ploidy column in the variant file.

The value is Call::UNKNOWN_PLOIDY if the variant file specifies "?".

std::vector<std::string> cgatools::variants::Call::varFilter_

The varFilter column in the variant file.

For old var files that have no varFilter or varQuality, this field is empty. For old var files with varQuality instead of varFilter, this field may be empty, VQLOW or PASS.

The varScoreEAF column in the variant file.

For older var files that have totalScore instead of varScoreVAF and varScoreEAF, the totalScore is filled into the varScoreEAF column.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated by  doxygen 1.6.2