This file is indexed.

/usr/include/bamtools/api/BamMultiReader.h is in libbamtools-dev 2.4.0+dfsg-3build1.

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
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
// ***************************************************************************
// BamMultiReader.h (c) 2010 Erik Garrison, Derek Barnett
// Marth Lab, Department of Biology, Boston College
// ---------------------------------------------------------------------------
// Last modified: 14 January 2013 (DB)
// ---------------------------------------------------------------------------
// Convenience class for reading multiple BAM files.
// ***************************************************************************

#ifndef BAMMULTIREADER_H
#define BAMMULTIREADER_H

#include "api/api_global.h"
#include "api/BamReader.h"
#include <map>
#include <sstream>
#include <string>
#include <utility>

namespace BamTools {

namespace Internal {
    class BamMultiReaderPrivate;
} // namespace Internal

class API_EXPORT BamMultiReader {

    // enums
    public:
        // possible merge order strategies
        enum MergeOrder { RoundRobinMerge = 0
                        , MergeByCoordinate
                        , MergeByName
                        };

    // constructor / destructor
    public:
        BamMultiReader(void);
        ~BamMultiReader(void);

    // public interface
    public:

        // ----------------------
        // BAM file operations
        // ----------------------

        // closes all open BAM files
        bool Close(void);
        // close only the requested BAM file
        bool CloseFile(const std::string& filename);
        // returns list of filenames for all open BAM files
        const std::vector<std::string> Filenames(void) const;
        // returns curent merge order strategy
        BamMultiReader::MergeOrder GetMergeOrder(void) const;
        // returns true if multireader has any open BAM files
        bool HasOpenReaders(void) const;
        // performs random-access jump within current BAM files
        bool Jump(int refID, int position = 0);
        // opens BAM files
        bool Open(const std::vector<std::string>& filenames);
        // opens a single BAM file, adding to any other current BAM files
        bool OpenFile(const std::string& filename);
        // returns file pointers to beginning of alignments
        bool Rewind(void);
        // sets an explicit merge order, regardless of the BAM files' SO header tag
        bool SetExplicitMergeOrder(BamMultiReader::MergeOrder order);
        // sets the target region of interest
        bool SetRegion(const BamRegion& region);
        // sets the target region of interest
        bool SetRegion(const int& leftRefID,
                       const int& leftPosition,
                       const int& rightRefID,
                       const int& rightPosition);

        // ----------------------
        // access alignment data
        // ----------------------

        // retrieves next available alignment
        bool GetNextAlignment(BamAlignment& alignment);
        // retrieves next available alignment (without populating the alignment's string data fields)
        bool GetNextAlignmentCore(BamAlignment& alignment);

        // ----------------------
        // access auxiliary data
        // ----------------------

        // returns unified SAM header for all files
        SamHeader GetHeader(void) const;
        // returns unified SAM header text for all files
        std::string GetHeaderText(void) const;
        // returns number of reference sequences
        int GetReferenceCount(void) const;
        // returns all reference sequence entries.
        const BamTools::RefVector GetReferenceData(void) const;
        // returns the ID of the reference with this name.
        int GetReferenceID(const std::string& refName) const;

        // ----------------------
        // BAM index operations
        // ----------------------

        // creates index files for current BAM files
        bool CreateIndexes(const BamIndex::IndexType& type = BamIndex::STANDARD);
        // returns true if all BAM files have index data available
        bool HasIndexes(void) const;
        // looks for index files that match current BAM files
        bool LocateIndexes(const BamIndex::IndexType& preferredType = BamIndex::STANDARD);
        // opens index files for current BAM files.
        bool OpenIndexes(const std::vector<std::string>& indexFilenames);

        // ----------------------
        // error handling
        // ----------------------

        // returns a human-readable description of the last error that occurred
        std::string GetErrorString(void) const;

    // private implementation
    private:
        Internal::BamMultiReaderPrivate* d;
};

} // namespace BamTools

#endif // BAMMULTIREADER_H