SamReadGroup.h

Go to the documentation of this file.
00001 // ***************************************************************************
00002 // SamReadGroup.h (c) 2010 Derek Barnett
00003 // Marth Lab, Department of Biology, Boston College
00004 // ---------------------------------------------------------------------------
00005 // Last modified: 10 October 2011 (DB)
00006 // ---------------------------------------------------------------------------
00007 // Provides direct read/write access to the SAM read group data fields.
00008 // ***************************************************************************
00009 
00010 #ifndef SAM_READGROUP_H
00011 #define SAM_READGROUP_H
00012 
00013 #include "api/api_global.h"
00014 #include <string>
00015 
00016 namespace BamTools {
00017 
00018 struct API_EXPORT SamReadGroup {
00019 
00020     // ctor & dtor
00021     SamReadGroup(void);
00022     SamReadGroup(const std::string& id);
00023     SamReadGroup(const SamReadGroup& other);
00024     ~SamReadGroup(void);
00025 
00026     // query/modify entire read group
00027     void Clear(void);                          // clears all data fields
00028 
00029     // convenience query methods
00030     bool HasDescription(void) const;           // returns true if read group has a description
00031     bool HasFlowOrder(void) const;             // returns true if read group has a flow order entry
00032     bool HasID(void) const;                    // returns true if read group has a group ID
00033     bool HasKeySequence(void) const;           // returns true if read group has a key sequence
00034     bool HasLibrary(void) const;               // returns true if read group has a library name
00035     bool HasPlatformUnit(void) const;          // returns true if read group has a platform unit ID
00036     bool HasPredictedInsertSize(void) const;   // returns true if read group has a predicted insert size
00037     bool HasProductionDate(void) const;        // returns true if read group has a production date
00038     bool HasProgram(void) const;               // returns true if read group has a program entry
00039     bool HasSample(void) const;                // returns true if read group has a sample name
00040     bool HasSequencingCenter(void) const;      // returns true if read group has a sequencing center ID
00041     bool HasSequencingTechnology(void) const;  // returns true if read group has a sequencing technology ID
00042 
00043 
00044     // data fields
00045     std::string Description;                   // DS:<Description>
00046     std::string FlowOrder;                     // FO:<FlowOrder>
00047     std::string ID;                            // ID:<ID>              *Required for valid SAM header*
00048     std::string KeySequence;                   // KS:<KeySequence>
00049     std::string Library;                       // LB:<Library>
00050     std::string PlatformUnit;                  // PU:<PlatformUnit>
00051     std::string PredictedInsertSize;           // PI:<PredictedInsertSize>
00052     std::string ProductionDate;                // DT:<ProductionDate>
00053     std::string Program;                       // PG:<Program>
00054     std::string Sample;                        // SM:<Sample>
00055     std::string SequencingCenter;              // CN:<SequencingCenter>
00056     std::string SequencingTechnology;          // PL:<SequencingTechnology>
00057 };
00058 
00062 API_EXPORT inline bool operator==(const SamReadGroup& lhs, const SamReadGroup& rhs) {
00063     return lhs.ID == rhs.ID;
00064 }
00065 
00066 } // namespace BamTools
00067 
00068 #endif // SAM_READGROUP_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Aug 29 17:43:46 2012 for BamTools by  doxygen 1.6.3