#include "bioseq.h"#include <cctype>#include "strformat.h"#include <fstream>#include <math.h>Functions | |
| void | translate (string &pep, const string &seq, int begin, int end) |
| int | countInternalStops (const string &seq) |
| int | aachar2num (char a) |
| char | aanum2char (int c) |
| string | reverseComplement (const string &seq) |
| char | complementChar (char ch) |
| void | reverseComplementInPlace (string &seq) |
| void | printFasta (ostream &ous, const string &seq, int width) |
| ostream & | operator<< (ostream &ous, const bioseq &s) |
| pair< int, int > | longestORFIndex (const Protein &p) |
| void | loadFastaIntoMap (const string &file, map< string, string > &store) |
| int aachar2num | ( | char | a | ) |
used by encode function
Referenced by Matrix::lookup(), and Matrix::read().
| char aanum2char | ( | int | c | ) |
convert amino acid number to character
| char complementChar | ( | char | ch | ) |
Referenced by reverseComplementInPlace().
| int countInternalStops | ( | const string & | seq | ) |
global function to be used in a more flexible way
Referenced by JGIModel::valid().
| void loadFastaIntoMap | ( | const string & | file, | |
| map< string, string > & | store | |||
| ) |
load all the sequences in the file into a map for later usage. Only the id is used, title information is not cached.
References ifstream(), and bioseq::seq.
Referenced by main(), and testLoad().
| pair<int,int> longestORFIndex | ( | const Protein & | p | ) |
| ostream& operator<< | ( | ostream & | ous, | |
| const bioseq & | s | |||
| ) |
fasta format, 70 residues per line. If the sequence has name it will produce a full fasta file, otherwise only the sequence.
References bioseq::name, bioseq::printFasta(), bioseq::seq, and bioseq::title.
| void printFasta | ( | ostream & | ous, | |
| const string & | seq, | |||
| int | width = 70 | |||
| ) |
class wide function that can be used without constructing a bioseq object. This will increase the performance if you are only interested in the operation but not in using the bioseq object and its derived classes
Referenced by extractInter(), main(), testLoad(), and ESTAssembly::write().
| string reverseComplement | ( | const string & | seq | ) |
operation only make sense on DNA or RNA sequences
Referenced by GenModel::CDSSeq(), and main().
| void reverseComplementInPlace | ( | string & | seq | ) |
a version for better performance
References complementChar().
Referenced by main(), DNA::revcomp(), RNAModel::seqGenomic(), and Noschain::subsequence().
| void translate | ( | string & | pep, | |
| const string & | seq, | |||
| int | begin, | |||
| int | end = -1 | |||
| ) |
helper function to be used by other methods Uses more basic type, for convinience
References ct, and DNA::getCodonTable().
Referenced by mRNAModel::mRNAModel(), and JGIModel::valid().
1.5.6