Class
GenomicRegion
Store information about a genomic region.
A genomic region is a range on a chromosome. The chromosome is identified by its name (as text in seqName, optionally also as an integer in seqId). The range is stored as a half-open interval [beginPos, endPos). If beginPos is set to -1 then the range spans the whole chromosome. If beginPos is set to a value >= 0 and endPos is set ot -1, then the chromosome is selected from beginPos to the end.
Examples for genomic regions are chr1, chr1:1,000, chr1:1,000-2,000.
The textual description of a genomic region has one of the formats NAME, NAME:START, NAME:START-END. The positions in the textual representation START and END are one-based. However, the representation in the members of GenomicRegion is zero-based.
GenomicRegion
Include Headers
seqan/seq_io.h
Data Members
beginPosBegin position of the range on the chromosome. Default is -1.
endPosEnd position of the range on the chromosome. Default is -1.
seqIdAn optional field storing an integer. Default is -1.
seqNameName of the sequence the region lies on, default is the empty string.
Member Functions
GenomicRegionConstructor.
Functions
clearReset a GenomicRegion object to the same state after default construction.
parseParse genomic region string store results in GenomicRegion.
readRegionLoad the infix of a sequence from a FaiIndex.
Examples
Construct a GenomicRegion object and fill it from different region strings.
seqan::GenomicRegion genomicRegion;
 
parse(genomicRegion, "chr1");
// genomicRegion.seqName == "chr1"
// genomicRegion.seqId == -1, genomicRegion.beginPos == -1, genomicRegion.beginPos == -1
 
parse(genomicRegion, "chr1:1000");
// genomicRegion.seqName == "chr1"
// genomicRegion.beginPos == 999
// genomicRegion.seqId == -1, genomicRegion.beginPos == -1
 
parse(genomicRegion, "chr1:1000-2000");
// genomicRegion.seqName == "chr1"
// genomicRegion.beginPos == 999
// genomicRegion.beginPos == 2000
// genomicRegion.seqId == -1
SeqAn - Sequence Analysis Library - www.seqan.de
 

Page built @2013/07/11 09:12:16