#include <gnAlignedSequences.h>
Public Member Functions | |
| void | addSequence (genome::gnSequence &seqToAdd, std::string &seqName) |
| Adds a sequence to the alignment. | |
| void | addSequence (std::string &seqToAdd, std::string &seqName) |
| Adds a sequence to the alignment. | |
| gnSeqI | alignedSeqsSize () const |
| Returns the size of each sequence in the alignment (all are identical). | |
| void | assignFileName (std::string name) |
| Assigns a file name to the alignment data for purposes of output. | |
| bool | collapseIdenticalSequences () |
| Collapses the alignment accross all sequences. | |
| void | concatenateAlignedSequences (gnAlignedSequences toConcat) |
| Concatenates 2 alignmnets. | |
| void | constructFromClustalW (std::string alignedFileName) |
| Loads the data held in file alignedFileName (in ClustalW format). | |
| void | constructFromMega (std::string alignedFileName) |
| Loads the data held in file alignedFileName (in Mega format). | |
| void | constructFromMSF (std::string alignedFileName) |
| Loads the data held in file alignedFileName (in MSF format). | |
| void | constructFromNexus (std::string alignedFileName) |
| Loads the data held in file alignedFileName (in Nexus format). | |
| void | constructFromPhylip (std::string alignedFileName) |
| Loads the data held in file alignedFileName (in Phylip format). | |
| void | constructFromRelaxedNexus (std::istream &align_stream) |
| Reads a single sequence entry in relaxed NEXUS format. | |
| void | extractVariableSites (gnAlignedSequences &variableSites, bool countGapsAsMismatches) |
| Extracts the variable sites from *this. | |
| gnAlignedSequences | getAlignedSegment (unsigned start, unsigned stop) |
| Create a new alignment that is comprised of all of the segments in the initial alignment from start to stop (inclusive) if stop == 0, the alignment ends at the end. | |
| std::string | getAlignedSequenceFileName () |
| Returns the name of the file associated with this gnAlignedSequences. | |
| gnAlignedSequences | getCodons (int readingFrame, int startCodon, int codonMultiple) |
| Extracts every codonMultiple-th codon in the reading frame readingFrame beginning with startCodon reading frames supported: 1, 2 & 3 (no reverse complementing). | |
| gnAlignedSequences (const gnAlignedSequences &toCopy) | |
| Copy Constructor, creates a copy of toCopy. | |
| gnAlignedSequences () | |
| Empty Constructor, creates a default gnAlignedSequences. | |
| std::vector< char > | operator[] (const int offset) |
| Accesses the alignment and returns the bases at that position in all sequences. | |
| void | output (const std::string &format_name, std::ostream &os) const |
| Writes out this sequence alignment in the specified format, assuming the format is supported. | |
| bool | outputClustalW (std::ostream &os) const |
| Writes alignment using the given output stream (in ClustalW format). | |
| bool | outputCodon (std::ostream &os) const |
| Writes alignment in 3-base, codon segments using the given output stream (in Phylip format). | |
| bool | outputMega (std::ostream &os) const |
| Writes alignment using the given output stream (in Mega format). | |
| bool | outputMSF (std::ostream &os) const |
| Writes alignment using the given output stream (in MSF format). | |
| bool | outputNexus (std::ostream &os) const |
| Writes alignment using the given output stream (in Nexus format). | |
| bool | outputPhylip (std::ostream &os) const |
| Writes alignment using the given output stream (in Phylip format). | |
| bool | outputWithConsensus (std::ostream &os) |
| Writes alignment with consensus using the given output stream (in Phylip format). | |
| bool | removeAlignedSeq (unsigned index) |
| Removes a single sequence from the alignment. | |
| bool | removeAlignedSeq (std::string seqName) |
| Removes a single sequence from the alignment. | |
| void | seq (uint seqI) |
| ~gnAlignedSequences () | |
| Destructor, frees the memory used. | |
Static Public Member Functions | |
| const std::vector< std::string > & | getSupportedFormats () |
| Returns a vector of supported format names. | |
| boolean | isSupportedFormat (const std::string &format_name) |
| Checks whether a particular format name is supported. | |
Public Attributes | |
| std::list< std::pair< std::string *, std::string * > > | alignedSequences |
| std::vector< std::string > | names |
| std::vector< int64 > | positions |
| If this is part of a larger alignment this vector stores start positions within that alignment. | |
| std::vector< std::string > | sequences |
Private Member Functions | |
| void | addAllSegments (gnAlignedSequences &alignment, unsigned start, unsigned stop) |
| Adds all segments in *this to the given alignment. | |
| void | addAllSegmentsReplaceGaps (gnAlignedSequences &alignment, unsigned start, unsigned stop) |
| Adds all segments in *this to the given alignment - replaces gaps with consensus data. | |
| void | addSequence (genome::gnSequence seqToAdd, std::string seqName, int consensusStart, std::string originalConsensus) |
| Adds a sequence to the alignment. | |
| bool | buildConsensus () |
| Reads all sequences in the alignment and creates a consensus. | |
| bool | constructClustalWAlignedSequenceList (std::ifstream &alignmentFile) |
| Aids readClustalWAlignment. | |
| bool | constructMegaAlignedSequenceList (std::ifstream &alignmentFile) |
| Aids readMegaAlignment. | |
| bool | constructMSFAlignedSequenceList (std::ifstream &alignmentFile) |
| Aids readMSFAlignment. | |
| bool | constructNexusAlignedSequenceList (std::ifstream &alignmentFile) |
| Aids readNexusAlignment. | |
| bool | constructPhylipAlignedSequenceList (std::ifstream &alignmentFile) |
| Aids readPhylipAlignment. | |
| bool | coordinates (std::string line) |
| Searches given line for coordinates. | |
| int | determineBaseIndex (char base) |
| Computes an index for a given base (0-25: a-z). | |
| bool | readClustalWAlignment () |
| Aids constructFromClustalW. | |
| bool | readMegaAlignment () |
| Aids constructFromMega. | |
| bool | readMSFAlignment () |
| Aids constructFromMSF. | |
| bool | readNexusAlignment () |
| Aids constructFromNexus. | |
| bool | readPhylipAlignment () |
| Aids constructFromPhylip. | |
| bool | readRelaxedNexusAlignment (std::istream &align_stream) |
| This function assumes that the #NEXUS at the beginning of the file has been read off already. | |
| void | removeAllSegments (unsigned start, unsigned stop) |
| Removes all segments across all sequences in *this. | |
| int | sequenceNameInList (std::string &sequenceName) |
| Determines whether a sequence of the given name is present in the list. | |
| bool | sequenceNameInList (std::string sequenceName, std::list< std::pair< std::string *, std::string * > >::iterator &sequenceItr) |
| Determines whether a sequence of the given name is present in the list.. | |
Private Attributes | |
| std::string | alignedSequenceFileName |
| std::string | consensus |
| std::vector< int > | indexPositions |
Definition at line 48 of file gnAlignedSequences.h.
|
|
Empty Constructor, creates a default gnAlignedSequences.
Definition at line 20 of file gnAlignedSequences.cpp. References alignedSequenceFileName. |
|
|
Copy Constructor, creates a copy of toCopy.
Definition at line 28 of file gnAlignedSequences.cpp. References alignedSequenceFileName, consensus, names, positions, and sequences. |
|
|
Destructor, frees the memory used.
Definition at line 399 of file gnAlignedSequences.h. |
|
||||||||||||||||
|
Adds all segments in *this to the given alignment.
Definition at line 1503 of file gnAlignedSequences.cpp. References addSequence(), names, sequences, and uint. Referenced by extractVariableSites(), and getAlignedSegment(). |
|
||||||||||||||||
|
Adds all segments in *this to the given alignment - replaces gaps with consensus data.
Definition at line 1515 of file gnAlignedSequences.cpp. References addSequence(), alignedSequences, and consensus. Referenced by getCodons(). |
|
||||||||||||||||||||
|
Adds a sequence to the alignment.
Definition at line 1466 of file gnAlignedSequences.cpp. References alignedSequences, and sequenceNameInList(). |
|
||||||||||||
|
Adds a sequence to the alignment.
Definition at line 1441 of file gnAlignedSequences.cpp. |
|
||||||||||||
|
Adds a sequence to the alignment.
Definition at line 1434 of file gnAlignedSequences.cpp. References names, and sequences. Referenced by addAllSegments(), and addAllSegmentsReplaceGaps(). |
|
|
Returns the size of each sequence in the alignment (all are identical).
Definition at line 705 of file gnAlignedSequences.cpp. References sequences. Referenced by outputClustalW(), mems::simpleFindBackbone(), and mems::simpleFindIslands(). |
|
|
Assigns a file name to the alignment data for purposes of output.
Definition at line 402 of file gnAlignedSequences.h. References alignedSequenceFileName. |
|
|
Reads all sequences in the alignment and creates a consensus.
Definition at line 1377 of file gnAlignedSequences.cpp. References alignedSequences, consensus, and determineBaseIndex(). Referenced by concatenateAlignedSequences(), constructFromClustalW(), constructFromMega(), constructFromMSF(), constructFromNexus(), constructFromPhylip(), extractVariableSites(), getAlignedSegment(), and getCodons(). |
|
|
Collapses the alignment accross all sequences. Sequences are compared in terms of base content - if the sequences of base pairs of equal, the sequences are identical
Definition at line 846 of file gnAlignedSequences.cpp. References alignedSequences. |
|
|
Concatenates 2 alignmnets.
Definition at line 750 of file gnAlignedSequences.cpp. References alignedSequences, and buildConsensus(). |
|
|
Aids readClustalWAlignment.
Definition at line 1083 of file gnAlignedSequences.cpp. References alignedSequences, and sequenceNameInList(). Referenced by readClustalWAlignment(). |
|
|
Loads the data held in file alignedFileName (in ClustalW format).
Definition at line 39 of file gnAlignedSequences.cpp. References alignedSequenceFileName, buildConsensus(), consensus, indexPositions, and readClustalWAlignment(). |
|
|
Loads the data held in file alignedFileName (in Mega format).
Definition at line 100 of file gnAlignedSequences.cpp. References alignedSequenceFileName, buildConsensus(), consensus, indexPositions, and readMegaAlignment(). |
|
|
Loads the data held in file alignedFileName (in MSF format).
Definition at line 65 of file gnAlignedSequences.cpp. References alignedSequenceFileName, buildConsensus(), consensus, indexPositions, and readMSFAlignment(). |
|
|
Loads the data held in file alignedFileName (in Nexus format).
Definition at line 87 of file gnAlignedSequences.cpp. References alignedSequenceFileName, buildConsensus(), consensus, indexPositions, and readNexusAlignment(). |
|
|
Loads the data held in file alignedFileName (in Phylip format).
Definition at line 52 of file gnAlignedSequences.cpp. References alignedSequenceFileName, buildConsensus(), consensus, indexPositions, and readPhylipAlignment(). |
|
|
Reads a single sequence entry in relaxed NEXUS format. Assumes that the #NEXUS has already been read off.
Definition at line 78 of file gnAlignedSequences.cpp. References readRelaxedNexusAlignment(). |
|
|
Aids readMegaAlignment.
Definition at line 1289 of file gnAlignedSequences.cpp. References alignedSequences, and sequenceNameInList(). Referenced by readMegaAlignment(). |
|
|
Aids readMSFAlignment.
Definition at line 1189 of file gnAlignedSequences.cpp. References alignedSequences, coordinates(), and sequenceNameInList(). Referenced by readMSFAlignment(). |
|
|
Aids readNexusAlignment.
Definition at line 1240 of file gnAlignedSequences.cpp. References alignedSequences, and sequenceNameInList(). Referenced by readNexusAlignment(). |
|
|
Aids readPhylipAlignment.
Definition at line 1132 of file gnAlignedSequences.cpp. References alignedSequences. Referenced by readPhylipAlignment(). |
|
|
Searches given line for coordinates.
Definition at line 1554 of file gnAlignedSequences.cpp. Referenced by constructMSFAlignedSequenceList(). |
|
|
Computes an index for a given base (0-25: a-z).
Definition at line 1544 of file gnAlignedSequences.cpp. Referenced by buildConsensus(). |
|
||||||||||||
|
Extracts the variable sites from *this.
Definition at line 783 of file gnAlignedSequences.cpp. References addAllSegments(), alignedSequences, buildConsensus(), and indexPositions. |
|
||||||||||||
|
Create a new alignment that is comprised of all of the segments in the initial alignment from start to stop (inclusive) if stop == 0, the alignment ends at the end.
Definition at line 680 of file gnAlignedSequences.cpp. References addAllSegments(), and buildConsensus(). |
|
|
Returns the name of the file associated with this gnAlignedSequences.
Definition at line 405 of file gnAlignedSequences.h. References alignedSequenceFileName. |
|
||||||||||||||||
|
Extracts every codonMultiple-th codon in the reading frame readingFrame beginning with startCodon reading frames supported: 1, 2 & 3 (no reverse complementing).
Definition at line 691 of file gnAlignedSequences.cpp. References addAllSegmentsReplaceGaps(), alignedSequences, and buildConsensus(). |
|
|
Returns a vector of supported format names.
Definition at line 112 of file gnAlignedSequences.cpp. Referenced by isSupportedFormat(). |
|
|
Checks whether a particular format name is supported.
Definition at line 126 of file gnAlignedSequences.cpp. References getSupportedFormats(). |
|
|
Accesses the alignment and returns the bases at that position in all sequences.
Definition at line 871 of file gnAlignedSequences.cpp. References alignedSequences. |
|
||||||||||||
|
Writes out this sequence alignment in the specified format, assuming the format is supported.
Definition at line 135 of file gnAlignedSequences.cpp. References outputClustalW(), outputCodon(), outputMega(), outputMSF(), outputNexus(), and outputPhylip(). |
|
|
Writes alignment using the given output stream (in ClustalW format).
Definition at line 205 of file gnAlignedSequences.cpp. References alignedSeqsSize(), mems::countGaps(), names, positions, sequences, and uint. Referenced by output(). |
|
|
Writes alignment in 3-base, codon segments using the given output stream (in Phylip format).
Definition at line 554 of file gnAlignedSequences.cpp. References alignedSequences. Referenced by output(). |
|
|
Writes alignment using the given output stream (in Mega format).
Definition at line 512 of file gnAlignedSequences.cpp. References alignedSequences, and mems::MEGA_ALIGN_COLUMNS. Referenced by output(). |
|
|
Writes alignment using the given output stream (in MSF format).
Definition at line 267 of file gnAlignedSequences.cpp. References alignedSequences. Referenced by output(). |
|
|
Writes alignment using the given output stream (in Nexus format).
Definition at line 351 of file gnAlignedSequences.cpp. References alignedSequences, names, names, and sequences. Referenced by output(). |
|
|
Writes alignment using the given output stream (in Phylip format).
Definition at line 162 of file gnAlignedSequences.cpp. References names, sequences, and uint. Referenced by output(). |
|
|
Writes alignment with consensus using the given output stream (in Phylip format).
Definition at line 606 of file gnAlignedSequences.cpp. References alignedSequences, and consensus. |
|
|
Aids constructFromClustalW.
Definition at line 883 of file gnAlignedSequences.cpp. References alignedSequenceFileName, and constructClustalWAlignedSequenceList(). Referenced by constructFromClustalW(). |
|
|
Aids constructFromMega.
Definition at line 1053 of file gnAlignedSequences.cpp. References alignedSequenceFileName, and constructMegaAlignedSequenceList(). Referenced by constructFromMega(). |
|
|
Aids constructFromMSF.
Definition at line 943 of file gnAlignedSequences.cpp. References alignedSequenceFileName, and constructMSFAlignedSequenceList(). Referenced by constructFromMSF(). |
|
|
Aids constructFromNexus.
Definition at line 1022 of file gnAlignedSequences.cpp. References alignedSequenceFileName, and constructNexusAlignedSequenceList(). Referenced by constructFromNexus(). |
|
|
Aids constructFromPhylip.
Definition at line 914 of file gnAlignedSequences.cpp. References alignedSequenceFileName, and constructPhylipAlignedSequenceList(). Referenced by constructFromPhylip(). |
|
|
This function assumes that the #NEXUS at the beginning of the file has been read off already.
Definition at line 978 of file gnAlignedSequences.cpp. References names, sequences, and uint. Referenced by constructFromRelaxedNexus(). |
|
|
Removes a single sequence from the alignment.
Definition at line 730 of file gnAlignedSequences.cpp. References alignedSequences. |
|
|
Removes a single sequence from the alignment.
Definition at line 713 of file gnAlignedSequences.cpp. References alignedSequences. |
|
||||||||||||
|
Removes all segments across all sequences in *this.
Definition at line 1529 of file gnAlignedSequences.cpp. References alignedSequences. |
|
|
|
|
|
Determines whether a sequence of the given name is present in the list.
Definition at line 1357 of file gnAlignedSequences.cpp. |
|
||||||||||||
|
Determines whether a sequence of the given name is present in the list..
Definition at line 1365 of file gnAlignedSequences.cpp. References alignedSequences. Referenced by addSequence(), constructClustalWAlignedSequenceList(), constructMegaAlignedSequenceList(), constructMSFAlignedSequenceList(), and constructNexusAlignedSequenceList(). |
|
|
Definition at line 390 of file gnAlignedSequences.h. Referenced by assignFileName(), constructFromClustalW(), constructFromMega(), constructFromMSF(), constructFromNexus(), constructFromPhylip(), getAlignedSequenceFileName(), gnAlignedSequences(), readClustalWAlignment(), readMegaAlignment(), readMSFAlignment(), readNexusAlignment(), and readPhylipAlignment(). |
|
|
|
Definition at line 392 of file gnAlignedSequences.h. Referenced by addAllSegmentsReplaceGaps(), buildConsensus(), constructFromClustalW(), constructFromMega(), constructFromMSF(), constructFromNexus(), constructFromPhylip(), gnAlignedSequences(), and outputWithConsensus(). |
|
|
Definition at line 393 of file gnAlignedSequences.h. Referenced by constructFromClustalW(), constructFromMega(), constructFromMSF(), constructFromNexus(), constructFromPhylip(), and extractVariableSites(). |
|
|
Definition at line 256 of file gnAlignedSequences.h. Referenced by addAllSegments(), addSequence(), mems::GenericInterval< GappedBaseImpl >::GetAlignedSequences(), gnAlignedSequences(), outputClustalW(), outputNexus(), outputPhylip(), readRelaxedNexusAlignment(), and sequenceNameInList(). |
|
|
If this is part of a larger alignment this vector stores start positions within that alignment.
Definition at line 257 of file gnAlignedSequences.h. Referenced by mems::GenericInterval< GappedBaseImpl >::GetAlignedSequences(), gnAlignedSequences(), and outputClustalW(). |
|
|
Definition at line 255 of file gnAlignedSequences.h. Referenced by addAllSegments(), addSequence(), alignedSeqsSize(), mems::GenericInterval< GappedBaseImpl >::GetAlignedSequences(), gnAlignedSequences(), outputClustalW(), outputNexus(), outputPhylip(), readRelaxedNexusAlignment(), mems::simpleFindBackbone(), and mems::simpleFindIslands(). |
1.3.6