SAMRecord and SAMFile are wrappers for htslib functions relating to SAM/BAM/CRAM* files
SAMRecord is a structured representation of a SAM/BAM/CRAM* record,
backed internally by htslib's bam1_t, but with convenient getters and setters
for record attributes, including functions not included in vanilla htslib
like returning the sequence or the qscore string (NB: actually char*)
SAMFile is a structured representation of SAM/BAM/CRAM* file,
backed internally by htslib's htsFile and bam_hdr_t,
but with convenient getters and setters for file and header attributes,
as well as query functions accessible explicitly (query("chr1:999-9999")
and by indexing (samfile["chr1", 999 .. 9999]).
The file object can be iterated as an InputRange to obtain every record in the file.
SAMRecord and SAMFile are wrappers for htslib functions relating to SAM/BAM/CRAM* files
SAMRecord is a structured representation of a SAM/BAM/CRAM* record, backed internally by htslib's bam1_t, but with convenient getters and setters for record attributes, including functions not included in vanilla htslib like returning the sequence or the qscore string (NB: actually char*)
SAMFile is a structured representation of SAM/BAM/CRAM* file, backed internally by htslib's htsFile and bam_hdr_t, but with convenient getters and setters for file and header attributes, as well as query functions accessible explicitly (query("chr1:999-9999") and by indexing (samfile["chr1", 999 .. 9999]). The file object can be iterated as an InputRange to obtain every record in the file.