/usr/include/bamtools/api/SamSequence.h is in libbamtools-dev 2.4.1+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | // ***************************************************************************
// SamSequence.h (c) 2010 Derek Barnett
// Marth Lab, Department of Biology, Boston College
// ---------------------------------------------------------------------------
// Last modified: 10 October 2011 (DB)
// ---------------------------------------------------------------------------
// Provides direct read/write access to the SAM sequence data fields.
// ***************************************************************************
#ifndef SAM_SEQUENCE_H
#define SAM_SEQUENCE_H
#include "api/api_global.h"
#include "api/BamAux.h"
#include <string>
#include <vector>
namespace BamTools {
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
// convenience query methods
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 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>
std::vector<CustomHeaderTag> CustomTags; // optional custom tags
};
/*! \fn bool operator==(const SamSequence& lhs, const SamSequence& rhs)
\brief tests equality by comparing sequence names, lengths, & checksums (if available)
*/
API_EXPORT inline bool operator==(const SamSequence& lhs, const SamSequence& rhs) {
if ( lhs.Name != rhs.Name ) return false;
if ( lhs.Length != rhs.Length ) return false;
if ( lhs.HasChecksum() && rhs.HasChecksum() )
return (lhs.Checksum == rhs.Checksum);
else return true;
}
} // namespace BamTools
#endif // SAM_SEQUENCE_H
|