|
bpp-seq-omics
2.4.1
|
A sequence class which is used to store data from MAF files. More...
#include <Bpp/Seq/Io/Maf/MafSequence.h>
Inheritance diagram for bpp::MafSequence:
Collaboration diagram for bpp::MafSequence:Public Member Functions | |
| MafSequence (const Alphabet *alphabet=&AlphabetTools::DNA_ALPHABET) | |
| MafSequence (const std::string &name, const std::string &sequence, bool parseName=true, const Alphabet *alphabet=&AlphabetTools::DNA_ALPHABET) | |
| MafSequence (const std::string &name, const std::string &sequence, size_t begin, char strand, size_t srcSize, bool parseName=true, const Alphabet *alphabet=&AlphabetTools::DNA_ALPHABET) | |
| MafSequence * | clone () const |
| MafSequence * | cloneMeta () const |
| ~MafSequence () | |
| bool | hasCoordinates () const |
| void | removeCoordinates () |
| size_t | start () const |
| size_t | stop () const |
| Range< size_t > | getRange (bool origin=true) const |
| void | setName (const std::string &name) |
| const std::string & | getSpecies () const |
| const std::string & | getChromosome () const |
| char | getStrand () const |
| size_t | getGenomicSize () const |
| size_t | getSrcSize () const |
| void | setStart (size_t begin) |
| void | setChromosome (const std::string &chr) |
| void | setSpecies (const std::string &species) |
| void | setStrand (char s) |
| void | setSrcSize (size_t srcSize) |
| std::string | getDescription () const |
| MafSequence * | subSequence (size_t startAt, size_t length) const |
| Extract a sub-sequence. More... | |
| virtual void | addAnnotation (SequenceAnnotation *anno) |
| virtual bool | hasAnnotation (const std::string &type) const |
| virtual const SequenceAnnotation & | getAnnotation (const std::string &type) const |
| virtual SequenceAnnotation & | getAnnotation (const std::string &type) |
| virtual std::vector< std::string > | getAnnotationTypes () const |
| virtual void | merge (const SequenceWithAnnotation &swa) |
| const Comments & | getComments () const |
| void | setComments (const Comments &comments) |
| void | clearComments () |
| const std::string & | getName () const |
| virtual const Alphabet * | getAlphabet () const=0 |
| const Alphabet * | getAlphabet () const |
| virtual size_t | size () const=0 |
| size_t | size () const |
| virtual std::string | toString () const=0 |
| virtual std::string | toString () const |
| virtual double | getStateValueAt (size_t siteIndex, int state) const |
| virtual double | getStateValueAt (size_t siteIndex, int state) const |
| virtual double | operator() (size_t siteIndex, int state) const |
| virtual double | operator() (size_t siteIndex, int state) const |
| virtual void | addElement (const std::string &c) |
| virtual void | addElement (size_t pos, const std::string &c) |
| virtual void | addElement (const int &v) |
| virtual void | addElement (size_t pos, const int &v) |
| virtual void | addElement (const T &c)=0 |
| virtual void | addElement (size_t pos, const T &c)=0 |
| virtual void | addElement (const T &c)=0 |
| virtual void | addElement (size_t pos, const T &c)=0 |
| virtual void | setElement (size_t pos, const std::string &c) |
| virtual void | setElement (size_t pos, const int &v) |
| virtual void | setElement (size_t pos, const T &c)=0 |
| virtual void | setElement (size_t pos, const T &c)=0 |
| void | addIntSymbolListListener (IntSymbolListListener *listener) |
| void | deleteElement (size_t pos) |
| virtual void | deleteElement (size_t pos)=0 |
| virtual void | deleteElement (size_t pos)=0 |
| void | deleteElements (size_t pos, size_t len) |
| virtual void | deleteElements (size_t pos, size_t len)=0 |
| virtual void | deleteElements (size_t pos, size_t len)=0 |
| virtual const std::vector< int > & | getContent () const |
| virtual const std::vector< T > & | getContent () const=0 |
| virtual const std::vector< T > & | getContent () const=0 |
| virtual const int & | getElement (size_t pos) const |
| virtual const T & | getElement (size_t pos) const=0 |
| virtual const T & | getElement (size_t pos) const=0 |
| virtual const int & | getValue (size_t pos) const |
| virtual const T & | getValue (size_t pos) const=0 |
| virtual const T & | getValue (size_t pos) const=0 |
| virtual const int & | operator[] (size_t pos) const |
| virtual int & | operator[] (size_t pos) |
| virtual const T & | operator[] (size_t pos) const=0 |
| virtual T & | operator[] (size_t pos)=0 |
| virtual const T & | operator[] (size_t pos) const=0 |
| virtual T & | operator[] (size_t pos)=0 |
| virtual void | shuffle () |
| virtual void | shuffle ()=0 |
| virtual void | shuffle ()=0 |
| virtual void | setContent (const std::string &sequence) |
| void | setContent (const std::vector< std::string > &list) |
| void | setContent (const std::vector< int > &list) |
| virtual void | setContent (const std::vector< T > &list)=0 |
| virtual void | setContent (const std::string &sequence) |
| void | setContent (const std::vector< std::string > &list) |
| void | setContent (const std::vector< int > &list) |
| virtual void | setContent (const std::vector< T > &list)=0 |
| std::string | getChar (size_t pos) const |
| std::string | getChar (size_t pos) const |
| void | setToSizeR (size_t newSize) |
| void | setToSizeR (size_t newSize) |
| void | setToSizeL (size_t newSize) |
| void | setToSizeL (size_t newSize) |
| void | append (const Sequence &seq) |
| void | append (const std::vector< int > &content) |
| void | append (const std::vector< std::string > &content) |
| void | append (const std::string &content) |
| void | append (const Sequence &seq) |
| void | append (const std::vector< int > &content) |
| void | append (const std::vector< std::string > &content) |
| void | append (const std::string &content) |
| virtual size_t | getNumberOfListeners () const |
| virtual const CoreSymbolListListener< int > & | getListener (size_t i) const |
| virtual CoreSymbolListListener< int > & | getListener (size_t i) |
| virtual void | addCoreSymbolListListener (CoreSymbolListListener< int > *listener) |
| virtual void | addCoreSymbolListListener (CoreSymbolListListener< T > *listener)=0 |
| virtual void | removeCoreSymbolListListener (CoreSymbolListListener< int > *listener) |
| virtual void | removeCoreSymbolListListener (CoreSymbolListListener< T > *listener)=0 |
Static Public Member Functions | |
| static void | splitNameIntoSpeciesAndChromosome (const std::string &name, std::string &species, std::string &chr) |
Protected Attributes | |
| Comments | comments_ |
| std::vector< CoreSymbolListListener< int > * > | listeners_ |
| std::vector< int > | content_ |
Private Member Functions | |
| void | beforeSequenceChanged (const IntSymbolListEditionEvent &event) |
| void | afterSequenceChanged (const IntSymbolListEditionEvent &event) |
| void | beforeSequenceInserted (const IntSymbolListInsertionEvent &event) |
| void | afterSequenceInserted (const IntSymbolListInsertionEvent &event) |
| void | beforeSequenceDeleted (const IntSymbolListDeletionEvent &event) |
| void | afterSequenceDeleted (const IntSymbolListDeletionEvent &event) |
| void | beforeSequenceSubstituted (const IntSymbolListSubstitutionEvent &event) |
| void | afterSequenceSubstituted (const IntSymbolListSubstitutionEvent &event) |
Private Attributes | |
| bool | hasCoordinates_ |
| size_t | begin_ |
| std::string | species_ |
| std::string | chromosome_ |
| char | strand_ |
| size_t | size_ |
| size_t | srcSize_ |
| std::string | name_ |
| bool | propagateEvents_ |
| const Alphabet * | alphabet_ |
A sequence class which is used to store data from MAF files.
It extends the SequenceWithAnnotation class to store MAF-specific features, like the chromosome position. The sequence is its own listener, and recomputes its "genomic" site by using the SequenceTools::getNumberOfSites function when a content modification is performed. Tags like begin and stop, hovever, have to be set by hand.
A MAF sequence is necessarily a DNA sequence.
Definition at line 62 of file MafSequence.h.
|
inline |
Definition at line 75 of file MafSequence.h.
Referenced by clone(), and cloneMeta().
|
inline |
Definition at line 81 of file MafSequence.h.
References chromosome_, bpp::SequenceTools::getNumberOfSites(), size_, species_, and splitNameIntoSpeciesAndChromosome().
|
inline |
Definition at line 91 of file MafSequence.h.
References chromosome_, bpp::SequenceTools::getNumberOfSites(), size_, species_, and splitNameIntoSpeciesAndChromosome().
|
inline |
Definition at line 109 of file MafSequence.h.
|
inlineprivatevirtual |
Reimplemented from bpp::SequenceWithAnnotation.
Definition at line 201 of file MafSequence.h.
References bpp::SequenceTools::getNumberOfSites(), and size_.
|
inlineprivatevirtual |
Reimplemented from bpp::SequenceWithAnnotation.
Definition at line 205 of file MafSequence.h.
References bpp::SequenceTools::getNumberOfSites(), and size_.
|
inlineprivatevirtual |
Reimplemented from bpp::SequenceWithAnnotation.
Definition at line 203 of file MafSequence.h.
References bpp::SequenceTools::getNumberOfSites(), and size_.
|
inlineprivatevirtual |
Reimplemented from bpp::SequenceWithAnnotation.
Definition at line 207 of file MafSequence.h.
|
inlineprivatevirtual |
Reimplemented from bpp::SequenceWithAnnotation.
Definition at line 200 of file MafSequence.h.
|
inlineprivatevirtual |
Reimplemented from bpp::SequenceWithAnnotation.
Definition at line 204 of file MafSequence.h.
|
inlineprivatevirtual |
Reimplemented from bpp::SequenceWithAnnotation.
Definition at line 202 of file MafSequence.h.
|
inlineprivatevirtual |
Reimplemented from bpp::SequenceWithAnnotation.
Definition at line 206 of file MafSequence.h.
|
inlinevirtual |
Reimplemented from bpp::SequenceWithAnnotation.
Definition at line 101 of file MafSequence.h.
References MafSequence().
|
inline |
Definition at line 105 of file MafSequence.h.
References begin_, bpp::SequenceWithAnnotation::getName(), MafSequence(), srcSize_, and strand_.
|
inline |
Definition at line 164 of file MafSequence.h.
References chromosome_.
Referenced by bpp::BlockMergerMafIterator::analyseCurrentBlock_(), bpp::CoordinateTranslatorMafIterator::analyseCurrentBlock_(), bpp::FeatureExtractorMafIterator::analyseCurrentBlock_(), bpp::FeatureFilterMafIterator::analyseCurrentBlock_(), bpp::OutputAlignmentMafIterator::analyseCurrentBlock_(), bpp::SequenceLDhotOutputMafIterator::analyseCurrentBlock_(), bpp::CsvStatisticsOutputIterationListener::iterationMoves(), bpp::OrderFilterMafIterator::parseBlock_(), bpp::PlinkOutputMafIterator::parseBlock_(), bpp::OutputAlignmentMafIterator::writeBlock(), bpp::MsmcOutputMafIterator::writeBlock_(), bpp::TableOutputMafIterator::writeBlock_(), and bpp::VcfOutputMafIterator::writeBlock_().
|
inline |
Definition at line 188 of file MafSequence.h.
References bpp::SequenceWithAnnotation::getName(), hasCoordinates_, start(), stop(), strand_, and bpp::TextTools::toString().
Referenced by bpp::FeatureFilterMafIterator::analyseCurrentBlock_(), bpp::OrderFilterMafIterator::parseBlock_(), bpp::PlinkOutputMafIterator::parseBlock_(), and bpp::MsmcOutputMafIterator::writeBlock_().
|
inline |
Definition at line 168 of file MafSequence.h.
References size_.
Referenced by bpp::OutputMafIterator::writeBlock().
|
inline |
| origin | Tell if coordinates according to original sequence should be used. If 'yes' and the sequence is on the negative strand, the returned range will be computed as [SrcSize-Stop, SrcSize-Start[ |
Definition at line 131 of file MafSequence.h.
References bpp::SequenceWithAnnotation::getName(), hasCoordinates_, srcSize_, start(), stop(), and strand_.
Referenced by bpp::CoordinateTranslatorMafIterator::analyseCurrentBlock_(), bpp::FeatureExtractorMafIterator::analyseCurrentBlock_(), and bpp::FeatureFilterMafIterator::analyseCurrentBlock_().
|
inline |
Definition at line 162 of file MafSequence.h.
References species_.
Referenced by bpp::ChromosomeMafIterator::analyseCurrentBlock_(), bpp::DuplicateFilterMafIterator::analyseCurrentBlock_(), bpp::FullGapFilterMafIterator::analyseCurrentBlock_(), bpp::OrphanSequenceFilterMafIterator::analyseCurrentBlock_(), bpp::SequenceFilterMafIterator::analyseCurrentBlock_(), bpp::MafBlock::getSequenceForSpecies(), bpp::MafBlock::getSequencesForSpecies(), bpp::MafBlock::getSpeciesList(), bpp::MafBlock::hasSequenceForSpecies(), and bpp::OutputAlignmentMafIterator::writeBlock().
|
inline |
Definition at line 170 of file MafSequence.h.
References srcSize_.
Referenced by bpp::BlockMergerMafIterator::analyseCurrentBlock_(), bpp::CoordinateTranslatorMafIterator::analyseCurrentBlock_(), bpp::FeatureExtractorMafIterator::analyseCurrentBlock_(), bpp::FeatureFilterMafIterator::analyseCurrentBlock_(), and bpp::OutputMafIterator::writeBlock().
|
inline |
Definition at line 166 of file MafSequence.h.
References strand_.
Referenced by bpp::BlockMergerMafIterator::analyseCurrentBlock_(), bpp::CoordinateTranslatorMafIterator::analyseCurrentBlock_(), bpp::FeatureExtractorMafIterator::analyseCurrentBlock_(), bpp::FeatureFilterMafIterator::analyseCurrentBlock_(), bpp::OutputAlignmentMafIterator::writeBlock(), and bpp::OutputMafIterator::writeBlock().
|
inline |
Definition at line 112 of file MafSequence.h.
References hasCoordinates_.
Referenced by bpp::BlockMergerMafIterator::analyseCurrentBlock_(), bpp::CsvStatisticsOutputIterationListener::iterationMoves(), bpp::OutputAlignmentMafIterator::writeBlock(), and bpp::OutputMafIterator::writeBlock().
|
inline |
Definition at line 114 of file MafSequence.h.
References begin_, and hasCoordinates_.
Referenced by subSequence().
|
inline |
Definition at line 174 of file MafSequence.h.
References chromosome_, bpp::SequenceWithAnnotation::setName(), and species_.
|
inlinevirtual |
Reimplemented from bpp::SequenceWithAnnotation.
Definition at line 142 of file MafSequence.h.
References chromosome_, bpp::SequenceWithAnnotation::setName(), species_, and splitNameIntoSpeciesAndChromosome().
Referenced by bpp::SequenceStreamToMafIterator::analyseCurrentBlock_().
|
inline |
Definition at line 179 of file MafSequence.h.
References chromosome_, bpp::SequenceWithAnnotation::setName(), and species_.
|
inline |
Definition at line 186 of file MafSequence.h.
References srcSize_.
|
inline |
Definition at line 172 of file MafSequence.h.
References begin_, and hasCoordinates_.
Referenced by bpp::SequenceStreamToMafIterator::analyseCurrentBlock_().
|
inline |
Definition at line 184 of file MafSequence.h.
References strand_.
Referenced by bpp::SequenceStreamToMafIterator::analyseCurrentBlock_().
|
inlinestatic |
Definition at line 152 of file MafSequence.h.
Referenced by MafSequence(), and setName().
|
inline |
Definition at line 116 of file MafSequence.h.
References begin_, bpp::SequenceWithAnnotation::getName(), and hasCoordinates_.
Referenced by bpp::BlockMergerMafIterator::analyseCurrentBlock_(), bpp::CoordinateTranslatorMafIterator::analyseCurrentBlock_(), bpp::FeatureExtractorMafIterator::analyseCurrentBlock_(), bpp::FeatureFilterMafIterator::analyseCurrentBlock_(), bpp::OutputAlignmentMafIterator::analyseCurrentBlock_(), bpp::SequenceLDhotOutputMafIterator::analyseCurrentBlock_(), getDescription(), getRange(), bpp::CsvStatisticsOutputIterationListener::iterationMoves(), bpp::OrderFilterMafIterator::parseBlock_(), bpp::PlinkOutputMafIterator::parseBlock_(), bpp::OutputAlignmentMafIterator::writeBlock(), bpp::OutputMafIterator::writeBlock(), bpp::MsmcOutputMafIterator::writeBlock_(), and bpp::VcfOutputMafIterator::writeBlock_().
|
inline |
Definition at line 121 of file MafSequence.h.
References begin_, bpp::SequenceWithAnnotation::getName(), hasCoordinates_, and size_.
Referenced by bpp::BlockMergerMafIterator::analyseCurrentBlock_(), bpp::FeatureFilterMafIterator::analyseCurrentBlock_(), bpp::OutputAlignmentMafIterator::analyseCurrentBlock_(), bpp::SequenceLDhotOutputMafIterator::analyseCurrentBlock_(), getDescription(), getRange(), bpp::CsvStatisticsOutputIterationListener::iterationMoves(), bpp::OrderFilterMafIterator::parseBlock_(), bpp::PlinkOutputMafIterator::parseBlock_(), bpp::OutputAlignmentMafIterator::writeBlock(), and bpp::MsmcOutputMafIterator::writeBlock_().
| MafSequence * MafSequence::subSequence | ( | size_t | startAt, |
| size_t | length | ||
| ) | const |
Extract a sub-sequence.
| startAt | Begining of sub-sequence. |
| length | the length of the sub-sequence. |
Definition at line 48 of file MafSequence.cpp.
References bpp::SequenceWithAnnotation::addAnnotation(), removeCoordinates(), and toString().
Referenced by bpp::AlignmentFilterMafIterator::analyseCurrentBlock_(), bpp::AlignmentFilter2MafIterator::analyseCurrentBlock_(), bpp::EntropyFilterMafIterator::analyseCurrentBlock_(), bpp::FeatureFilterMafIterator::analyseCurrentBlock_(), bpp::MaskFilterMafIterator::analyseCurrentBlock_(), bpp::QualityFilterMafIterator::analyseCurrentBlock_(), and bpp::WindowSplitMafIterator::analyseCurrentBlock_().
|
private |
Definition at line 67 of file MafSequence.h.
Referenced by cloneMeta(), removeCoordinates(), setStart(), start(), and stop().
|
private |
Definition at line 69 of file MafSequence.h.
Referenced by getChromosome(), MafSequence(), setChromosome(), setName(), and setSpecies().
|
private |
Definition at line 66 of file MafSequence.h.
Referenced by getDescription(), getRange(), hasCoordinates(), removeCoordinates(), setStart(), start(), and stop().
|
private |
Definition at line 71 of file MafSequence.h.
Referenced by afterSequenceChanged(), afterSequenceDeleted(), afterSequenceInserted(), getGenomicSize(), MafSequence(), and stop().
|
private |
Definition at line 68 of file MafSequence.h.
Referenced by getSpecies(), MafSequence(), setChromosome(), setName(), and setSpecies().
|
private |
Definition at line 72 of file MafSequence.h.
Referenced by cloneMeta(), getRange(), getSrcSize(), and setSrcSize().
|
private |
Definition at line 70 of file MafSequence.h.
Referenced by cloneMeta(), getDescription(), getRange(), getStrand(), and setStrand().