// Marth Lab, Department of Biology, Boston College\r
// All rights reserved.\r
// ---------------------------------------------------------------------------\r
-// Last modified: 16 August 2010 (DB)\r
+// Last modified: 19 November 2010 (DB)\r
// ---------------------------------------------------------------------------\r
// BGZF routines were adapted from the bgzf.c code developed at the Broad\r
// Institute.\r
// Provides the basic functionality for reading & writing BGZF files\r
// ***************************************************************************\r
\r
-#include <algorithm>\r
-#include "BGZF.h"\r
+#include <api/BGZF.h>\r
using namespace BamTools;\r
-using std::string;\r
-using std::min;\r
+\r
+#include <algorithm>\r
+using namespace std;\r
\r
BgzfData::BgzfData(void)\r
: UncompressedBlockSize(DEFAULT_BLOCK_SIZE)\r
// Marth Lab, Department of Biology, Boston College\r
// All rights reserved.\r
// ---------------------------------------------------------------------------\r
-// Last modified: 20 October 2010 (DB)\r
+// Last modified: 19 November 2010 (DB)\r
// ---------------------------------------------------------------------------\r
// BGZF routines were adapted from the bgzf.c code developed at the Broad\r
// Institute.\r
#ifndef BGZF_H\r
#define BGZF_H\r
\r
+#include <api/api_global.h>\r
+#include "zlib.h"\r
+\r
#include <cstdio>\r
#include <cstdlib>\r
#include <cstring>\r
#include <string>\r
-#include "zlib.h"\r
\r
// Platform-specific large-file support\r
#ifndef BAMTOOLS_LFS\r
const int MAX_BLOCK_SIZE = 65536;\r
const int DEFAULT_BLOCK_SIZE = 65536;\r
\r
-struct BgzfData {\r
+struct API_EXPORT BgzfData {\r
\r
// data members\r
public:\r
// Marth Lab, Department of Biology, Boston College
// All rights reserved.
// ---------------------------------------------------------------------------
-// Last modified: 19 September 2010 (DB)
+// Last modified: 19 November 2010 (DB)
// ---------------------------------------------------------------------------
// Provides the BamAlignment data structure
// ***************************************************************************
+#include <api/BamAlignment.h>
+using namespace BamTools;
+
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <exception>
#include <map>
#include <utility>
-#include "BamAlignment.h"
-using namespace BamTools;
using namespace std;
// default ctor
// return success
return true;
-}
\ No newline at end of file
+}
// Marth Lab, Department of Biology, Boston College
// All rights reserved.
// ---------------------------------------------------------------------------
-// Last modified: 9 October 2010 (DB)
+// Last modified: 19 November 2010 (DB)
// ---------------------------------------------------------------------------
// Provides the BamAlignment data structure
// ***************************************************************************
#ifndef BAMALIGNMENT_H
#define BAMALIGNMENT_H
+#include <api/api_global.h>
+#include <api/BamAux.h>
#include <string>
#include <vector>
-#include "BamAux.h"
namespace BamTools {
// BamAlignment data structure
// explicitly labeled as 'struct' to indicate that (most of) its fields are public
-struct BamAlignment {
+struct API_EXPORT BamAlignment {
// constructors & destructor
public:
// Marth Lab, Department of Biology, Boston College\r
// All rights reserved.\r
// ---------------------------------------------------------------------------\r
-// Last modified: 9 October 2010 (DB)\r
+// Last modified: 19 November 2010 (DB)\r
// ---------------------------------------------------------------------------\r
// Provides the basic constants, data structures, utilities etc. \r
// used throughout the API for handling BAM files\r
#ifndef BAMAUX_H\r
#define BAMAUX_H\r
\r
+#include <api/api_global.h>\r
+\r
#include <fstream> \r
#include <iostream>\r
#include <string>\r
// Data structs & typedefs\r
\r
// CIGAR operation data structure\r
-struct CigarOp {\r
+struct API_EXPORT CigarOp {\r
\r
// data members\r
char Type; // Operation type (MIDNSHP)\r
};\r
\r
// Reference data entry\r
-struct RefData {\r
+struct API_EXPORT RefData {\r
\r
// data members\r
std::string RefName; // Name of reference sequence\r
typedef std::vector<RefData> RefVector;\r
\r
// General (sequential) genome region\r
-struct BamRegion {\r
+struct API_EXPORT BamRegion {\r
\r
// data members\r
int LeftRefID;\r
// Marth Lab, Department of Biology, Boston College
// All rights reserved.
// ---------------------------------------------------------------------------
-// Last modified: 21 October 2010 (DB)
+// Last modified: 19 November 2010 (DB)
// ---------------------------------------------------------------------------
// Provides index functionality - both for the default (standardized) BAM
// index format (.bai) as well as a BamTools-specific (nonstandard) index
// format (.bti).
// ***************************************************************************
+#include <api/BamIndex.h>
+#include <api/BamReader.h>
+#include <api/BGZF.h>
+using namespace BamTools;
+
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <iostream>
#include <map>
-#include "BamIndex.h"
-#include "BamReader.h"
-#include "BGZF.h"
using namespace std;
-using namespace BamTools;
// -------------------------------
// BamIndex implementation
#ifndef BAM_INDEX_H
#define BAM_INDEX_H
+#include <api/api_global.h>
+#include <api/BamAux.h>
#include <iostream>
#include <string>
#include <vector>
-#include "BamAux.h"
namespace BamTools {
// --------------------------------------------------
// BamIndex base class
-class BamIndex {
+class API_EXPORT BamIndex {
// specify index-caching behavior
//
// Marth Lab, Department of Biology, Boston College
// All rights reserved.
// ---------------------------------------------------------------------------
-// Last modified: 18 September 2010 (DB)
+// Last modified: 19 November 2010 (DB)
// ---------------------------------------------------------------------------
// Uses BGZF routines were adapted from the bgzf.c code developed at the Broad
// Institute.
// precludes the need to sort merged files.
// ***************************************************************************
+#include <api/BamMultiReader.h>
+#include <api/BGZF.h>
+using namespace BamTools;
+
#include <algorithm>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
-#include "BGZF.h"
-#include "BamMultiReader.h"
-using namespace BamTools;
using namespace std;
// -----------------------------------------------------
// Marth Lab, Department of Biology, Boston College\r
// All rights reserved.\r
// ---------------------------------------------------------------------------\r
-// Last modified: 18 September 2010 (DB)\r
+// Last modified: 19 November 2010 (DB)\r
// ---------------------------------------------------------------------------\r
// Functionality for simultaneously reading multiple BAM files\r
// ***************************************************************************\r
#ifndef BAMMULTIREADER_H\r
#define BAMMULTIREADER_H\r
\r
-#include <string>\r
+#include <api/api_global.h>\r
+#include <api/BamReader.h>\r
#include <map>\r
-#include <utility>\r
#include <sstream>\r
-#include "BamReader.h"\r
+#include <string>\r
+#include <utility>\r
\r
namespace BamTools {\r
\r
// index mapping reference/position pairings to bamreaders and their alignments\r
typedef std::multimap<std::pair<int, int>, std::pair<BamReader*, BamAlignment*> > AlignmentIndex;\r
\r
-class BamMultiReader {\r
+class API_EXPORT BamMultiReader {\r
\r
// constructor / destructor\r
public:\r
// Marth Lab, Department of Biology, Boston College
// All rights reserved.
// ---------------------------------------------------------------------------
-// Last modified: 13 October 2010 (DB)
+// Last modified: 19 November 2010 (DB)
// ---------------------------------------------------------------------------
// Uses BGZF routines were adapted from the bgzf.c code developed at the Broad
// Institute.
// Provides the basic functionality for reading BAM files
// ***************************************************************************
-// C++ includes
+#include <api/BamReader.h>
+#include <api/BGZF.h>
+using namespace BamTools;
+
#include <algorithm>
+#include <iostream>
#include <iterator>
#include <string>
#include <vector>
-#include <iostream>
-#include "BGZF.h"
-#include "BamReader.h"
-using namespace BamTools;
using namespace std;
struct BamReader::BamReaderPrivate {
// Marth Lab, Department of Biology, Boston College\r
// All rights reserved.\r
// ---------------------------------------------------------------------------\r
-// Last modified: 13 October 2010 (DB)\r
+// Last modified: 19 November 2010 (DB)\r
// ---------------------------------------------------------------------------\r
// Uses BGZF routines were adapted from the bgzf.c code developed at the Broad\r
// Institute.\r
#ifndef BAMREADER_H\r
#define BAMREADER_H\r
\r
+#include <api/api_global.h>\r
+#include <api/BamAlignment.h>\r
+#include <api/BamIndex.h>\r
#include <string>\r
-#include "BamAlignment.h"\r
-#include "BamIndex.h"\r
\r
namespace BamTools {\r
\r
-class BamReader {\r
+class API_EXPORT BamReader {\r
\r
// constructor / destructor\r
public:\r
// Marth Lab, Department of Biology, Boston College\r
// All rights reserved.\r
// ---------------------------------------------------------------------------\r
-// Last modified: 16 September 2010 (DB)\r
+// Last modified: 19 November 2010 (DB)\r
// ---------------------------------------------------------------------------\r
// Uses BGZF routines were adapted from the bgzf.c code developed at the Broad\r
// Institute.\r
// Provides the basic functionality for producing BAM files\r
// ***************************************************************************\r
\r
-#include <iostream>\r
-\r
-#include "BGZF.h"\r
-#include "BamWriter.h"\r
+#include <api/BamWriter.h>\r
+#include <api/BGZF.h>\r
using namespace BamTools;\r
+\r
+#include <iostream>\r
using namespace std;\r
\r
struct BamWriter::BamWriterPrivate {\r
// Marth Lab, Department of Biology, Boston College\r
// All rights reserved.\r
// ---------------------------------------------------------------------------\r
-// Last modified: 18 September 2010 (DB)\r
+// Last modified: 19 November 2010 (DB)\r
// ---------------------------------------------------------------------------\r
// Uses BGZF routines were adapted from the bgzf.c code developed at the Broad\r
// Institute.\r
#ifndef BAMWRITER_H\r
#define BAMWRITER_H\r
\r
+#include <api/api_global.h>\r
+#include <api/BamAlignment.h>\r
#include <string>\r
-#include "BamAlignment.h"\r
\r
namespace BamTools {\r
\r
-class BamWriter {\r
+class API_EXPORT BamWriter {\r
\r
// constructor/destructor\r
public:\r
# ==========================
# list include paths
-include_directories ( ${BamTools_SOURCE_DIR}/src/shared )
+include_directories ( ${BamTools_SOURCE_DIR}/src )
# add compiler definitions
add_definitions(-DBAMTOOLS_API_LIBRARY) # (for proper exporting of library symbols)