Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- getBamHeader :: FilePath -> IO BAMHeader
- getSortOrder :: BAMHeader -> SortOrder
- streamBam :: MonadResource m => FilePath -> ConduitT i BAM m ()
- sinkBam :: MonadResource m => FilePath -> BAMHeader -> ConduitT BAM o m ()
- getChrId :: BAM -> Int
- getChr :: BAMHeader -> BAM -> Maybe ByteString
- startLoc :: BAM -> Int
- endLoc :: BAM -> Int
- readLen :: BAM -> Int
- isRev :: BAM -> Bool
- flag :: BAM -> Word16
- mapq :: BAM -> Word8
- getSeq :: BAM -> Maybe ByteString
- seqName :: BAM -> ByteString
- qualityS :: BAM -> Maybe ByteString
- quality :: BAM -> Maybe ByteString
- cigar :: BAM -> Maybe [(Int, Char)]
- mateChr :: BAMHeader -> BAM -> Maybe ByteString
- mateChrId :: BAM -> Int
- mateStartLoc :: BAM -> Int
- tLen :: BAM -> Int
- auxData :: BAM -> [((Char, Char), AuxiliaryData)]
- queryAuxData :: (Char, Char) -> BAM -> Maybe AuxiliaryData
- bamToSam :: BAMHeader -> BAM -> SAM
- appendAux :: (Char, Char) -> AuxiliaryData -> BAM -> IO ()
- hasMultiSegments :: Word16 -> Bool
- isProperAligned :: Word16 -> Bool
- isUnmapped :: Word16 -> Bool
- isNextUnmapped :: Word16 -> Bool
- isRC :: Word16 -> Bool
- isNextRC :: Word16 -> Bool
- isFirstSegment :: Word16 -> Bool
- isLastSegment :: Word16 -> Bool
- isSecondary :: Word16 -> Bool
- isBadQual :: Word16 -> Bool
- isDup :: Word16 -> Bool
- isSupplementary :: Word16 -> Bool
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
getChr :: BAMHeader -> BAM -> Maybe ByteString Source #
Return the chromosome name given the bam file header.
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.
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.
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.
mateStartLoc :: BAM -> Int Source #
0-based
queryAuxData :: (Char, Char) -> BAM -> Maybe AuxiliaryData Source #
Modify BAM
:: (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
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
isSupplementary :: Word16 -> Bool Source #
Supplementary alignment