CPDBSeq.h 1.91 KB
Newer Older
karius's avatar
karius committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
/*
 * CPDBSeq.h
 *
 *  Created on: Feb 14, 2019
 *      Author: kkarius
 */

#ifndef CPDBSEQ_H_
#define CPDBSEQ_H_

#include <corelib/ncbiobj.hpp>
#include <util/row_reader_ncbi_tsv.hpp>
#include <util/row_reader_char_delimited.hpp>
#include <algo/blast/api/sseqloc.hpp>
#include <string>

USING_NCBI_SCOPE;
USING_SCOPE(blast);
//copied from PDB.h of chimera implementation
//enum RecordType { UNKNOWN,
//		ANISOU, ATOM, ATOM1, ATOM2, ATOM3, ATOM4, ATOM5, ATOM6, ATOM7,
//		ATOM8, ATOM9, ATOMQR, AUTHOR,
//		CAVEAT, CISPEP, COMPND, CONECT, CRYST1,
//		DBREF, DBREF1, DBREF2, END, ENDMDL, EXPDTA, FORMUL, FTNOTE,
//		HEADER, HELIX, HET, HETATM, HETNAM, HETSYN, HYDBND,
//		JRNL, KEYWDS, LINK,
//		MASTER, MDLTYP, MODEL, MODRES, MTRIX, NUMMDL,
//		OBSLTE, ORIGX, REMARK, REVDAT,
//		SCALE, SEQADV, SEQRES, SHEET, SIGATM, SIGUIJ, SITE, SLTBRG,
//		SOURCE, SPLIT, SPRSDE, SSBOND,
//		TER, TITLE, TURN, TVECT,
//		USER,
//		USER_PDBRUN, USER_EYEPOS, USER_ATPOS, USER_WINDOW, USER_FOCUS,
//		USER_VIEWPORT, USER_BGCOLOR, USER_ANGLE, USER_DISTANCE,
//		USER_FILE, USER_MARKNAME, USER_MARK, USER_CNAME, USER_COLOR,
//		USER_RADIUS, USER_OBJECT, USER_ENDOBJ, USER_CHAIN,
//		USER_GFX_BEGIN, USER_GFX_END, USER_GFX_COLOR, USER_GFX_NORMAL,
//		USER_GFX_VERTEX, USER_GFX_FONT, USER_GFX_TEXTPOS,
//		USER_GFX_LABEL,
//		USER_GFX_MOVE, USER_GFX_DRAW, USER_GFX_MARKER, USER_GFX_POINT
//	};
//
////"X" for reasons of blast documentation
//static const string GAP_SYMBOL="X";

//struct Record {
//	RecordType type;
//	string chain_id;
//	int residue_index;
//	string residue_id;
//};

class CPDBSeq: public ncbi::CObject {
public:
	CPDBSeq();
	virtual ~CPDBSeq();
	void setPDBFilePath(const string& filename);
	TSeqLocVector getSeqLocs();
private:
	TSeqLocVector sequences;
	map<string,string> aa_codes_321;
	void parse();
	void fillGaps(string&,int);
	bool initAAMap();
//	RecordType getType(string line);
//	Record getRecord(string line);
};

#endif /* CPDBSEQ_H_ */