#include <gnStringSpec.h>
Inheritance diagram for gnStringSpec:
Public Member Functions | |
gnStringSpec () | |
Empty constructor. | |
gnStringSpec (const string &m_string, const gnSeqI startI=0, const gnSeqI endI=GNSEQI_END, const boolean revComp=false) | |
Constructor, creates a gnStringSpec using sequence data in the given string. | |
gnStringSpec (const gnStringSpec &s) | |
Copy constructor. | |
~gnStringSpec () | |
gnStringSpec * | Clone () const |
virtual void | Clear () |
Clears all data from this spec. | |
virtual gnSeqI | GetSourceLength () const |
Get the length of the source for this spec. | |
virtual gnBaseSource * | GetSource () const |
virtual gnStringSpec * | CloneRange (const gnSeqI startI, const gnSeqI len) const |
Copies a specified range of bases and returns a pointer to the resulting gnStringSpec. | |
virtual gnContigSpec * | CloneRange (const uint32 startI, const uint32 len) const=0 |
virtual string | GetSourceName () const |
Get the name of the source associated with this spec. | |
virtual gnSeqI | GetStart () const |
Get the base pair index where this contig starts inside of the sequence data. | |
virtual gnSeqI | GetLength () const |
Get the length of this contig inside of the sequence data. | |
virtual uint32 | GetSourceContigIndex () const |
Returns this contig's index in its source sequence. | |
virtual void | SetSourceName (const string &sourceName) |
Sets the name of the source associated with this contig. | |
virtual void | SetStart (const gnSeqI start) |
Sets the starting base pair to read from in the contig's sequence. | |
virtual void | SetLength (const gnSeqI len) |
Sets the length of reads into this sequence. | |
virtual void | SetSourceContigIndex (const uint32 contigI) |
Sets this contig's index in its source sequence. | |
virtual void | SetReverseComplement (const boolean value) |
Sets the reverse complement bit for this contig. | |
virtual void | CropStart (gnSeqI cropLen) |
Crop the first cropLen bases from the sequence. | |
virtual void | CropEnd (gnSeqI cropLen) |
Crop the last cropLen bases from the sequence. | |
virtual boolean | SeqRead (const gnSeqI start, gnSeqC *buf, uint32 &bufLen, const uint32 contigI) const |
Reads sequence data from this spec. | |
virtual string | GetName () const |
Get the name of the contig associated with this spec. | |
virtual void | SetName (const string &name) |
Sets the name for this contig. | |
virtual boolean | IsReverseComplement () const |
Returns true if this spec is read reverse complement. | |
virtual boolean | IsCircular () const |
Returns true if this spec's sequence is circular. | |
virtual void | SetCircular (const boolean value) |
Sets whether this spec should be read circular. | |
Protected Member Functions | |
virtual boolean | Read (const gnSeqI start, gnSeqC *buf, uint32 &bufLen) const |
all derived classes must implement this! it simply reads the specified bases into buf, disregarding circularity and reverse complement. | |
Protected Attributes | |
string | m_seqString |
gnSeqI | m_start |
gnSeqI | m_length |
uint32 | m_SourceContigIndex |
boolean | m_reverseComplement |
boolean | m_circular |
string | m_name |
string | m_sourceName |
For a more complete description see the gnBaseSpec documentation.
Definition at line 25 of file gnStringSpec.h.
|
Empty constructor.
Definition at line 16 of file gnStringSpec.cpp. References gnContigSpec::Clear(). Referenced by Clone(), and CloneRange(). |
|
Constructor, creates a gnStringSpec using sequence data in the given string. A circular spec will be created if the end index is greater than the start.
Definition at line 21 of file gnStringSpec.cpp. References gnSeqI, gnBaseSpec::m_circular, gnContigSpec::m_length, gnBaseSpec::m_reverseComplement, m_seqString, gnContigSpec::m_SourceContigIndex, and gnContigSpec::m_start. |
|
Copy constructor.
Definition at line 44 of file gnStringSpec.cpp. References gnBaseSpec::m_circular, gnContigSpec::m_length, gnBaseSpec::m_name, gnBaseSpec::m_reverseComplement, m_seqString, gnContigSpec::m_SourceContigIndex, gnBaseSpec::m_sourceName, and gnContigSpec::m_start. |
|
Definition at line 55 of file gnStringSpec.cpp. References Clear(). |
|
Clears all data from this spec.
Reimplemented from gnContigSpec. Definition at line 59 of file gnStringSpec.cpp. References gnContigSpec::Clear(), and m_seqString. Referenced by ~gnStringSpec(). |
|
Implements gnContigSpec. Definition at line 75 of file gnStringSpec.h. References gnStringSpec(). |
|
Implements gnBaseSpec. Referenced by gnFragmentSpec::CloneRange(). |
|
Copies a specified range of bases and returns a pointer to the resulting gnStringSpec. You must delete the copy when you are finished with it.
Definition at line 65 of file gnStringSpec.cpp. References gnStringSpec(), gnBaseSpec::m_circular, gnContigSpec::m_length, gnBaseSpec::m_name, gnBaseSpec::m_reverseComplement, m_seqString, gnContigSpec::m_SourceContigIndex, gnBaseSpec::m_sourceName, and gnContigSpec::m_start. |
|
Crop the last cropLen bases from the sequence. CropEnd will delete features and headers associated with the cropped bases.
Implements gnBaseSpec. Definition at line 22 of file gnContigSpec.cpp. References gnContigSpec::m_length. |
|
Crop the first cropLen bases from the sequence. CropStart will delete features and headers associated with the cropped bases.
Implements gnBaseSpec. Definition at line 16 of file gnContigSpec.cpp. References gnContigSpec::GetSourceLength(), gnContigSpec::m_length, gnBaseSpec::m_reverseComplement, and gnContigSpec::m_start. |
|
Get the length of this contig inside of the sequence data.
Implements gnBaseSpec. Definition at line 133 of file gnContigSpec.h. References gnSeqI, and gnContigSpec::m_length. Referenced by gnFragmentSpec::CloneRange(), gnSEQSource::ParseStream(), and gnGBKSource::ParseStream(). |
|
Get the name of the contig associated with this spec.
Definition at line 116 of file gnBaseSpec.h. References gnBaseSpec::m_name. Referenced by gnSequence::contigName(), gnDNXSource::GetContigID(), gnDNXSource::GetContigName(), gnMultiSpec::GetSpecIndexByName(), gnDNXSource::HasContig(), gnGBKSource::Write(), and gnDNXSource::Write(). |
|
Definition at line 84 of file gnStringSpec.h. |
|
Returns this contig's index in its source sequence.
Definition at line 149 of file gnContigSpec.h. References gnContigSpec::m_SourceContigIndex, and uint32. Referenced by gnSequence::globalToSource(). |
|
Get the length of the source for this spec.
Implements gnContigSpec. Definition at line 80 of file gnStringSpec.h. References gnSeqI, and m_seqString. |
|
Get the name of the source associated with this spec.
Definition at line 119 of file gnContigSpec.h. References gnBaseSpec::m_sourceName. |
|
Get the base pair index where this contig starts inside of the sequence data.
Definition at line 128 of file gnContigSpec.h. References gnSeqI, and gnContigSpec::m_start. Referenced by gnSequence::globalToSource(). |
|
Returns true if this spec's sequence is circular.
Definition at line 128 of file gnBaseSpec.h. References gnBaseSpec::m_circular. Referenced by gnSequence::isCircular(), and gnGBKSource::Write(). |
|
Returns true if this spec is read reverse complement.
Definition at line 124 of file gnBaseSpec.h. References gnBaseSpec::m_reverseComplement. Referenced by gnSequence::globalToSource(), gnSequence::isReverseComplement(), gnGenomeSpec::SetReverseComplement(), and gnFragmentSpec::SetReverseComplement(). |
|
all derived classes must implement this! it simply reads the specified bases into buf, disregarding circularity and reverse complement.
Implements gnContigSpec. Definition at line 90 of file gnStringSpec.h. References m_seqString. |
|
Reads sequence data from this spec. SeqRead will attempt to read "bufLen" base pairs starting at "start", an offset into the sequence. Reading inside a specific contig can be accomplished by supplying the "contigI" parameter with a valid contig index. SeqRead stores the sequence data in "buf" and returns the actual number of bases read in "bufLen". SeqRead will return false if a serious error occurs.
Implements gnBaseSpec. Definition at line 34 of file gnContigSpec.cpp. References gnFilter::DNAComplementFilter(), gnContigSpec::GetSourceLength(), gnSeqI, gnContigSpec::m_length, gnBaseSpec::m_reverseComplement, gnContigSpec::m_start, gnContigSpec::Read(), and gnFilter::ReverseFilter(). |
|
Sets whether this spec should be read circular. If circular is set, reads beyond the end of this spec will pick up at the beginning and read up to the start index.
Definition at line 132 of file gnBaseSpec.h. References gnBaseSpec::m_circular. Referenced by gnSEQSource::ParseStream(), gnGBKSource::ParseStream(), and gnSequence::setCircular(). |
|
Sets the length of reads into this sequence. This does not affect the actual sequence data but only how much of it is used in this contig.
Definition at line 144 of file gnContigSpec.h. References gnContigSpec::m_length. Referenced by gnSEQSource::ParseStream(), and gnGBKSource::ParseStream(). |
|
Sets the name for this contig.
Definition at line 120 of file gnBaseSpec.h. References gnBaseSpec::m_name. Referenced by gnFASSource::GetSpec(), gnSEQSource::ParseStream(), gnGBKSource::ParseStream(), gnDNXSource::ParseStream(), and gnSequence::setContigName(). |
|
Sets the reverse complement bit for this contig. This routine will translate the start index to the reverse base pair.
Implements gnBaseSpec. Definition at line 26 of file gnContigSpec.cpp. References gnContigSpec::GetSourceLength(), gnContigSpec::m_length, gnBaseSpec::m_reverseComplement, and gnContigSpec::m_start. Referenced by gnFragmentSpec::SetReverseComplement(). |
|
Sets this contig's index in its source sequence.
Definition at line 153 of file gnContigSpec.h. References gnContigSpec::m_SourceContigIndex. |
|
Sets the name of the source associated with this contig.
Definition at line 123 of file gnContigSpec.h. References gnBaseSpec::m_sourceName. Referenced by gnFASSource::GetSpec(), gnSEQSource::ParseStream(), gnRAWSource::ParseStream(), gnGBKSource::ParseStream(), and gnDNXSource::ParseStream(). |
|
Sets the starting base pair to read from in the contig's sequence. This does not affect the actual sequence data but only where to begin using it in this contig.
Definition at line 139 of file gnContigSpec.h. References gnContigSpec::m_start. |
|
Definition at line 108 of file gnBaseSpec.h. Referenced by gnBaseSpec::Clear(), CloneRange(), gnSourceSpec::CloneRange(), gnFragmentSpec::gnFragmentSpec(), gnGenomeSpec::gnGenomeSpec(), gnSourceSpec::gnSourceSpec(), gnStringSpec(), gnBaseSpec::IsCircular(), and gnBaseSpec::SetCircular(). |
|
Definition at line 104 of file gnContigSpec.h. Referenced by gnContigSpec::Clear(), CloneRange(), gnSourceSpec::CloneRange(), gnContigSpec::CropEnd(), gnContigSpec::CropStart(), gnContigSpec::GetLength(), gnSourceSpec::gnSourceSpec(), gnStringSpec(), gnContigSpec::SeqRead(), gnContigSpec::SetLength(), and gnContigSpec::SetReverseComplement(). |
|
Definition at line 110 of file gnBaseSpec.h. Referenced by gnBaseSpec::Clear(), CloneRange(), gnSourceSpec::CloneRange(), gnBaseSpec::GetName(), gnFragmentSpec::gnFragmentSpec(), gnGenomeSpec::gnGenomeSpec(), gnSourceSpec::gnSourceSpec(), gnStringSpec(), and gnBaseSpec::SetName(). |
|
|
Definition at line 70 of file gnStringSpec.h. Referenced by Clear(), CloneRange(), GetSourceLength(), gnStringSpec(), and Read(). |
|
Definition at line 105 of file gnContigSpec.h. Referenced by gnSourceSpec::Clear(), gnContigSpec::Clear(), CloneRange(), gnSourceSpec::CloneRange(), gnContigSpec::GetSourceContigIndex(), gnSourceSpec::gnSourceSpec(), gnStringSpec(), and gnContigSpec::SetSourceContigIndex(). |
|
Reimplemented in gnMultiSpec. Definition at line 111 of file gnBaseSpec.h. Referenced by gnBaseSpec::Clear(), CloneRange(), gnSourceSpec::CloneRange(), gnContigSpec::GetSourceName(), gnSourceSpec::gnSourceSpec(), gnStringSpec(), and gnContigSpec::SetSourceName(). |
|
Definition at line 103 of file gnContigSpec.h. Referenced by gnContigSpec::Clear(), CloneRange(), gnSourceSpec::CloneRange(), gnContigSpec::CropStart(), gnContigSpec::GetStart(), gnSourceSpec::gnSourceSpec(), gnStringSpec(), gnContigSpec::SeqRead(), gnContigSpec::SetReverseComplement(), and gnContigSpec::SetStart(). |