|
MASA-Core
|
00001 /******************************************************************************* 00002 * 00003 * Copyright (c) 2010-2015 Edans Sandes 00004 * 00005 * This file is part of MASA-Core. 00006 * 00007 * MASA-Core is free software: you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation, either version 3 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * MASA-Core is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with MASA-Core. If not, see <http://www.gnu.org/licenses/>. 00019 * 00020 ******************************************************************************/ 00021 00022 #ifndef _SEQUENCE_HPP 00023 #define _SEQUENCE_HPP 00024 00025 #include <vector> 00026 #include <string> 00027 using namespace std; 00028 00029 #include "Constants.hpp" 00030 #include "SequenceInfo.hpp" 00031 #include "SequenceData.hpp" 00032 #include "SequenceModifiers.hpp" 00033 00034 class Sequence { 00035 public: 00036 Sequence( SequenceInfo* info, SequenceModifiers* modifiers ); 00037 Sequence ( const Sequence* orig ); 00038 virtual ~Sequence(); 00039 00040 void copyData( const Sequence* orig ); 00041 //void setFlags( const int flags ); 00042 //void setFileName ( const string filename ); 00043 //void loadFile ( ); 00044 void trim (int delta0, int delta1); 00045 //void setPadding(int lenth, char c); 00046 //void setBoundaries (int trimStart, int trimEnd); 00047 //void restore(); 00048 00049 void reverse(); 00050 int getAbsolutePos(int relativePos) const; 00051 00052 int getLen() const; 00053 int getTrimStart() const; 00054 int getTrimEnd() const; 00055 //int getType() const; 00056 //string getAccession() const; 00057 //string getDescription() const; 00058 00059 //void setDescription(string description); 00060 //int getFlags() const; 00061 //int getOriginalLen() const; 00062 SequenceInfo* getInfo() const; 00063 void setInfo(SequenceInfo* info); 00064 SequenceModifiers* getModifiers() const; 00065 const char* getData(bool reverse = false) const; 00066 const char* getForwardData() const; 00067 const char* getReverseData() const; 00068 //char getPaddingChar() const; 00069 //int getPaddingLenght() const; 00070 bool isReversed() const; 00071 00072 //char* data; 00073 private: 00074 SequenceInfo* info; 00075 SequenceModifiers* modifiers; 00076 SequenceData* data; 00077 //char* original_forward_data; 00078 //char* original_reverse_data; 00079 int reverseData; 00080 int offset0; 00081 int offset1; 00082 int len; 00083 00084 bool dataOwner; 00085 //int paddingLenght; 00086 //char paddingChar; 00087 //vector<char> data_vector; 00088 //void updateData(); 00089 void setBoundaries(int trimStart, int trimEnd); 00090 }; 00091 00092 #endif /* _SEQUENCE_HPP */ 00093
1.7.6.1