Function
positionGapToSeq
Convert from gap-space in the global alignment to the sequence-space on the reference.
positionGapToSeq(gaps, pos)
Include Headers
seqan/store.h
Parameters

gaps | Contig gaps from fragment store. Types: AnchorGaps
pos | Position in gap space.

Remarks
See the example below to construct the gaps object. Note that this construction is fast since it is only a thin wrapper around underlying objects.
Return Values
Position in sequence space.
Examples
Convert from gap space to position space when the contigs required to be loaded.
Converts position aligned read with index idx in the aligned read store.
typedef typename TFragmentStore::TContigStore TContigStore;
typedef typename Value<TContigStore>::Type TContig;
typedef typename TFragmentStore::TContigSeq TContigSeq;
typedef Gaps<TContigSeq, AnchorGaps<typename TContig::TGapAnchors> > TContigGaps;
typedef typename TFragmentStore::TAlignedReadStore TAlignedReadStore;
typedef typename Value<TAlignedReadStore>::Type TAlignedRead;
typedef typename TAlignedRead::TPos TAlignedReadPos;
unsigned contigId = alignedReadStore[idx].contigId;
TContigGaps contigGaps(contigStore[contigId].seq, contigStore[contigId].gaps);
TAlignedRead const & alignedRead = alignedReadStore[idx];
// Translate end position from aligned read record to sequence space in reference.
TAlignedReadPos endPos = positionGapToSeq(contigGaps, alignedRead.endPos);
Convert from gap space to position space when the contigs are not required.
Converts position aligned read with index idx in the aligned read store.
typedef typename TFragmentStore::TContigStore TContigStore;
typedef typename Value<TContigStore>::Type TContig;
typedef Gaps<Nothing, AnchorGaps<typename TContig::TGapAnchors> > TContigGaps;
typedef typename TFragmentStore::TAlignedReadStore TAlignedReadStore;
typedef typename Value<TAlignedReadStore>::Type TAlignedRead;
typedef typename TAlignedRead::TPos TAlignedReadPos;
unsigned contigId = alignedReadStore[idx].contigId;
TContigGaps contigGaps(Nothing(), contigStore[contigId].gaps);
TAlignedRead const & alignedRead = alignedReadStore[idx];
// Translate end position from aligned read record to sequence space in reference.
TAlignedReadPos endPos = positionGapToSeq(contigGaps, alignedRead.endPos);
See Also
positionSeqToGap
SeqAn - Sequence Analysis Library - www.seqan.de

Page built @2014/10/13 16:12:58