Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type Bam = ForeignPtr Bam'
- type HeaderState = ResourceT (ReaderT * FileHeader IO)
- withBamFile :: FilePath -> (BamFileHandle -> HeaderState a) -> IO a
- readBam :: BamFileHandle -> ConduitT () Bam HeaderState ()
- writeBam :: FilePath -> ConduitT Bam o HeaderState ()
- bamToBed :: Conduit Bam HeaderState BED
- sortedBamToBedPE :: Conduit Bam HeaderState (BED, BED)
Documentation
type Bam = ForeignPtr Bam' #
type HeaderState = ResourceT (ReaderT * FileHeader IO) #
withBamFile :: FilePath -> (BamFileHandle -> HeaderState a) -> IO a #
readBam :: BamFileHandle -> ConduitT () Bam HeaderState () #
bamToBed :: Conduit Bam HeaderState BED Source #
Convert bam record to bed record. Unmapped reads will be discarded.
sortedBamToBedPE :: Conduit Bam HeaderState (BED, BED) Source #
Convert pairedend bam file to bed. the bam file must be sorted by names, e.g., using "samtools sort -n". This condition is checked from Bam header.