]> git.donarmstrong.com Git - bamtools.git/blobdiff - src/api/SamSequence.h
Brought API up to compliance with recent SAM Format Spec (v1.4-r962)
[bamtools.git] / src / api / SamSequence.h
index fea09d39b4148526e639784af9b509e4f5a30569..054e58f985ec40c74820f37a8318157202dfd2ed 100644 (file)
@@ -3,7 +3,7 @@
 // Marth Lab, Department of Biology, Boston College
 // All rights reserved.
 // ---------------------------------------------------------------------------
-// Last modified: 4 March 2011 (DB)
+// Last modified: 18 April 2011 (DB)
 // ---------------------------------------------------------------------------
 // Provides direct read/write access to the SAM sequence data fields.
 // ***************************************************************************
@@ -21,27 +21,28 @@ struct API_EXPORT SamSequence {
     // ctor & dtor
     SamSequence(void);
     SamSequence(const std::string& name, const int& length);
+    SamSequence(const std::string& name, const std::string& length);
     SamSequence(const SamSequence& other);
     ~SamSequence(void);
 
     // query/modify entire sequence
-    void Clear(void);                           // clears all contents
+    void Clear(void);                   // clears all contents
 
     // convenience query methods
-    bool HasName(void) const;                   // returns true if sequence has a name
-    bool HasLength(void) const;                 // returns true if sequence has a length
-    bool HasAssemblyID(void) const;             // returns true if sequence has an assembly ID
-    bool HasChecksum(void) const;               // returns true if sequence has an MD5 checksum
-    bool HasURI(void) const;                    // returns true if sequence has a URI
-    bool HasSpecies(void) const;                // returns true if sequence has a species ID
+    bool HasAssemblyID(void) const;     // returns true if sequence has an assembly ID
+    bool HasChecksum(void) const;       // returns true if sequence has an MD5 checksum
+    bool HasLength(void) const;         // returns true if sequence has a length
+    bool HasName(void) const;           // returns true if sequence has a name
+    bool HasSpecies(void) const;        // returns true if sequence has a species ID
+    bool HasURI(void) const;            // returns true if sequence has a URI
 
     // data members
-    std::string Name;       // SN:<Name>
-    std::string Length;     // LN:<Length>
-    std::string AssemblyID; // AS:<AssemblyID>
-    std::string Checksum;   // M5:<Checksum>
-    std::string URI;        // UR:<URI>
-    std::string Species;    // SP:<Species>
+    std::string AssemblyID;             // AS:<AssemblyID>
+    std::string Checksum;               // M5:<Checksum>
+    std::string Length;                 // LN:<Length>      *Required for valid SAM header*
+    std::string Name;                   // SN:<Name>        *Required for valid SAM header*
+    std::string Species;                // SP:<Species>
+    std::string URI;                    // UR:<URI>
 };
 
 /*! \fn bool operator==(const SamSequence& lhs, const SamSequence& rhs)