HsHTSLib-1.9.1: Bindings to htslib.

Safe HaskellNone
LanguageHaskell2010

Bio.HTS

Contents

Synopsis

Documentation

getSortOrder :: BAMHeader -> SortOrder Source #

Get the sort information.

streamBam :: MonadResource m => FilePath -> ConduitT i BAM m () Source #

Create a Bam stream from the file.

sinkBam :: MonadResource m => FilePath -> BAMHeader -> ConduitT BAM o m () Source #

Write Bam records to a file.

Field accessors

getChrId :: BAM -> Int Source #

Return the chromosome id.

getChr :: BAMHeader -> BAM -> Maybe ByteString Source #

Return the chromosome name given the bam file header.

startLoc :: BAM -> Int Source #

Return the 0-based starting location.

endLoc :: BAM -> Int Source #

For a mapped read, this is just position + cigar2rlen. For an unmapped read (either according to its flags or if it has no cigar string), we return position + 1 by convention.

readLen :: BAM -> Int Source #

Return the query length (read length).

isRev :: BAM -> Bool Source #

Whether the query is on the reverse strand.

flag :: BAM -> Word16 Source #

Return the flag.

mapq :: BAM -> Word8 Source #

MAPping Quality. It equals −10 log10 Pr{mapping position is wrong}, rounded to the nearest integer. A value 255 indicates that the mapping quality is not available.

getSeq :: BAM -> Maybe ByteString Source #

Return the DNA sequence.

seqName :: BAM -> ByteString Source #

Get the name of the query.

qualityS :: BAM -> Maybe ByteString Source #

Human readable quality score which is: Phred base quality + 33.

quality :: BAM -> Maybe ByteString Source #

Phred base quality (a sequence of 0xFF if absent).

mateStartLoc :: BAM -> Int Source #

0-based

bamToSam :: BAMHeader -> BAM -> SAM Source #

Convert Bam record to Sam record.

Modify BAM

appendAux Source #

Arguments

:: (Char, Char)

Tag

-> AuxiliaryData

Data

-> BAM 
-> IO () 

Append tag data to a bam record.

Flag interpretation

hasMultiSegments :: Word16 -> Bool Source #

Template having multiple segments in sequencing

isProperAligned :: Word16 -> Bool Source #

Each segment properly aligned according to the aligner

isUnmapped :: Word16 -> Bool Source #

Segment unmapped

isNextUnmapped :: Word16 -> Bool Source #

Next segment in the template unmapped

isRC :: Word16 -> Bool Source #

SEQ being reverse complemented

isNextRC :: Word16 -> Bool Source #

SEQ of the next segment in the template being reverse complemented

isFirstSegment :: Word16 -> Bool Source #

The first segment in the template

isLastSegment :: Word16 -> Bool Source #

The last segment in the template

isSecondary :: Word16 -> Bool Source #

Secondary alignment

isBadQual :: Word16 -> Bool Source #

Not passing filters, such as platform/vendor quality controls

isDup :: Word16 -> Bool Source #

PCR or optical duplicate

isSupplementary :: Word16 -> Bool Source #

Supplementary alignment