head.h

Go to the documentation of this file.
00001 #ifndef GBHEAD_H
00002 #define GBHEAD_H
00003 #include <iostream>
00004 #include "seqinfo.h"
00005 #include "date.h"
00006 
00007 #ifndef LINE
00008 #define LINE 84
00009 #endif
00010 
00011 /*file: head.h
00012  * model representing header information of each GenBank record
00013  * The part that is not repeated
00014  * From LOCUS to REFERENCE */
00015 
00016 class head
00017 {
00018   public:
00019    head();
00020    head(const head& hd);
00021    ~head();
00022 
00023          /* read from LOCUS line to ORGANISM */
00024    void getHead(istream &ins, char ln[]);
00025 
00026         /* parse the first line of GenBank record into a seqinfo object and 
00027          * a Date objects */
00028    void loadSeqInfo(seqinfo &si, Date &gd);
00029         /* If the header contains the SEGMENT     1 of 2
00030          * or not 
00031          * */
00032    bool isseg() const {return seg[0] != '\0';}
00033         /* if the first segment
00034          * */
00035    bool firstSeg() const;
00036         /* for output
00037          */
00038    void segmentOut(ostream &SOUF, char ss[], const seqinfo &mseq) const;
00039    //ss is the name for the seqmented sequence
00040    char *phylogeny() const;
00041 
00042          /* get SOURCE as char pointer */
00043          inline char* getSource() const { return source; }
00044          //char *getSource() const;
00045          inline char* getOrganism() const { return org; }
00046 
00047          /* dump in the ace format; I am discarding SOURCE=human */
00048    void dump(ostream &SOUF, seqinfo &si) const;
00049    friend ostream &operator<<(ostream &ous, const head &h);
00050    //this one is only used for debuging aid
00051    
00052   private:
00053    void outAcc(ostream &so) const;
00054    char locus[LINE+1];   // the Locus line
00055    char ver[35]; 
00056         char seg[12];
00057 
00058    /* source may contain organism or organ or cell type
00059     * info, not well organiszed; I found this not useful and often
00060          * redundant with the source feature. I am discarding this field if it
00061          * is just human. 
00062     */
00063          char *source;
00064 
00065    char *def, *acess, *keywd, *org, *phyl;
00066    //release 115.0 has eliminted the NID line!!!
00067    //but some recoreds still contains it!!
00068    //program has to deal with this at this time 2000-05-02
00069 };
00070 #endif

Generated on Wed Aug 10 11:56:51 2011 for Softwares from Orpara by  doxygen 1.5.6