14#include "extrinsicinfo.hh"
21#include <mysql++/mysql++.h>
42 int getGroupID(
string speciesname);
43 void addSpeciesToGroup(
string skey,
int groupID);
44 bool withEvidence(
string speciesname){
return getGroupID(speciesname)>0;}
46 void readGFFFile(
const char* filename);
47 void readExtrinsicCFGFile(vector<string> &speciesNames);
49 map<int,FeatureCollection> speciesColl;
50 map<string,int> groupIDs;
52 static int groupCount;
64 int getNumSpecies() {
return numSpecies;}
65 void setLength(
int idx,
string chrName,
int len);
66 int getChrLen(
int idx,
string chrName);
67 void setSpeciesNames(vector<string> speciesNames);
68 string getSname(
size_t idx) {
return speciesNames[idx];}
70 int getIdx(
string speciesname);
72 bool withEvidence(
string speciesname) {
return extrinsicFeatures.withEvidence(speciesname);}
73 virtual AnnoSequence* getSeq(
string speciesname,
string chrName,
int start,
int end, Strand strand) = 0;
74 AnnoSequence* getSeq(
size_t speciesIdx,
string chrName,
int start,
int end, Strand strand) {
75 return getSeq(getSname(speciesIdx), chrName, start, end, strand);
77 virtual SequenceFeatureCollection* getFeatures(
string speciesname,
string chrName,
int start,
int end, Strand strand) = 0;
82 vector<map<string,int> > chrLen;
83 vector<string> speciesNames;
84 map<string, size_t> speciesIndex;
98 AnnoSequence* getSeq(
string speciesname,
string chrName,
int start,
int end, Strand strand);
102 map<string,string> filenames;
103 map<string,char*> sequences;
113map<string,string> getFileNames (
string listfile);
123 virtual AnnoSequence* getSeq(
string speciesname,
string chrName,
int start,
int end, Strand strand)=0;
136 MysqlAccess(vector<string> s = vector<string>()) :
DbSeqAccess(s){
140 AnnoSequence* getSeq(
string speciesname,
string chrName,
int start,
int end, Strand strand);
142 AnnoSequence* getSeq2(
string speciesname,
string chrName,
int start,
int end, Strand strand);
145 int split_dbaccess();
146 void connect_db(ostream& out=cout);
148 AnnoSequence* getNextDBSequence(
string charName,
int start,
int end, vector<T>& asm_query_region);
152 int get_region_coord(
int seq_region_id,
int start,
int end, vector<T>& asm_query_region);
155 mysqlpp::Connection con;
156 vector<string> db_information;
170 SQLiteAccess(
const char* f, vector<string> s = vector<string>()) :
DbSeqAccess(s), db(f) {
171 filenames = getFileNames (Constant::speciesfilenames);
174 AnnoSequence* getSeq(
string speciesname,
string chrName,
int start,
int end, Strand strand);
178 map<string,string> filenames;
Random access to sequence segments through a database.
Definition randseqaccess.hh:121
Definition extrinsicinfo.hh:314
Achieve random access by simply storing all genomes in memory and then retrieving the required substr...
Definition randseqaccess.hh:94
abstract class for quick access to an arbitrary sequence segment in genomes needed for comparative ge...
Definition randseqaccess.hh:62
Definition sqliteDB.hh:42
holds all extrinsic feature information for one sequence
Definition extrinsicinfo.hh:86
SpeciesCollection holds all extrinsic evidence given for the species.
Definition randseqaccess.hh:39