![refid bam file format refid bam file format](https://www.ncbi.nlm.nih.gov/core/assets/gbench/images/tutorila6_fig4_GSV_with_BAM_pile-up_graph.png)
Validate that the record is sorted compared to the previously read record if there is one, according to the specified sort order. ValidateSortOrder ( SamRecord &record, SamFileHeader &header) Init (const char *filename, OpenType mode, SamFileHeader *header) Return the bam index if one has been opened.ĪttemptRecoverySync (bool(*checkSignature)(void *data), int length) Whether or not statistics should be generated for this file. Returns the number of bases in the passed in read that overlap the region that is currently set. Get the number of unmapped reads in the specified reference name. GetNumUnMappedReadsFromIndex (const char *refName, SamFileHeader &header) Get the number of mapped reads in the specified reference name. GetNumMappedReadsFromIndex (const char *refName, SamFileHeader &header)
![refid bam file format refid bam file format](https://s3.manualzz.com/store/data/029174001_1-688ceae0efd4282bfb68579f20ccf9dd.png)
![refid bam file format refid bam file format](http://morganbranding.com/wp-content/uploads/2014/04/VersionControl2.jpg)
Get the number of unmapped reads in the specified reference id. GetNumUnMappedReadsFromIndex (int32_t refID) Get the number of mapped reads in the specified reference id. GetNumMappedReadsFromIndex (int32_t refID) SetReadSection (const char *refName, int32_t start, int32_t end, bool overlap=true) SetReadSection (int32_t refID, int32_t start, int32_t end, bool overlap=true) Sets what part of the BAM file should be read. Get the Status of the last call that sets status. Return the number of records that have been read/written so far. Set the flag to validate that the file is sorted as it is read/written. SetSortedValidation ( SortedType sortType) Writes the specified record into the file. WriteRecord ( SamFileHeader &header, SamRecord &record) Reads the next record from the file & stores it in the passed in record. ReadRecord ( SamFileHeader &header, SamRecord &record) Writes the specified header into the file. Reads the header section from the file and stores it in the passed in header. Returns whether or not the end of the file has been reached. Returns whether or not the file has been opened successfully. Set the type of sequence translation to use when writing the sequence. SetWriteSequenceTranslation ( SamRecord::SequenceTranslation translation) Set the type of sequence translation to use when reading the sequence. SetReadSequenceTranslation ( SamRecord::SequenceTranslation translation) Sets the reference to the specified genome sequence object. SetReference ( GenomeSequence *reference) Read the bam index file using the BAM filename as a base. Open a sam/bam file for writing with the specified filename. OpenForWrite (const char *filename, SamFileHeader *header=NULL) Open a sam/bam file for reading with the specified filename. OpenForRead (const char *filename, SamFileHeader *header=NULL) SamFile (const char *filename, OpenType mode, ErrorHandler::HandlingType errorHandlingType, SamFileHeader *header) SamFile (const char *filename, OpenType mode, SamFileHeader *header) SamFile (const char *filename, OpenType mode, ErrorHandler::HandlingType errorHandlingType)Ĭonstructor that opens the specified file based on the specified mode (READ/WRITE) and handles errors per the specified handleType. SamFile (const char *filename, OpenType mode)Ĭonstructor that opens the specified file based on the specified mode (READ/WRITE). SamFile (ErrorHandler::HandlingType errorHandlingType)Ĭonstructor that sets the error handling type. More.Įnum for indicating the type of sort for the file. Enum for indicating whether to open the file for read or write.