Safe Haskell | None |
---|---|
Language | Haskell2010 |
Printers for BAM and SAM. BAM is properly supported, SAM can be piped to standard output.
Synopsis
- class IsBamRec a where
- pushBam :: a -> BgzfTokens -> BgzfTokens
- unpackBamRec :: a -> BamRec
- encodeBamWith :: (IsBamRec a, MonadIO m) => Int -> BamMeta -> Stream (Of a) m r -> ByteStream m r
- packBam :: BamRec -> IO BamRaw
- writeBamFile :: (IsBamRec a, MonadIO m, MonadMask m) => FilePath -> BamMeta -> Stream (Of a) m r -> m r
- writeBamHandle :: (IsBamRec a, MonadIO m) => Handle -> BamMeta -> Stream (Of a) m r -> m r
- pipeBamOutput :: (IsBamRec a, MonadIO m) => BamMeta -> Stream (Of a) m r -> m r
- pipeSamOutput :: (IsBamRec a, MonadIO m) => BamMeta -> Stream (Of a) m r -> m r
Documentation
class IsBamRec a where Source #
pushBam :: a -> BgzfTokens -> BgzfTokens Source #
unpackBamRec :: a -> BamRec Source #
Instances
IsBamRec BamRaw Source # | |
Defined in Bio.Bam.Writer pushBam :: BamRaw -> BgzfTokens -> BgzfTokens Source # unpackBamRec :: BamRaw -> BamRec Source # | |
IsBamRec BamRec Source # | |
Defined in Bio.Bam.Writer pushBam :: BamRec -> BgzfTokens -> BgzfTokens Source # unpackBamRec :: BamRec -> BamRec Source # | |
(IsBamRec a, IsBamRec b) => IsBamRec (Either a b) Source # | |
Defined in Bio.Bam.Writer pushBam :: Either a b -> BgzfTokens -> BgzfTokens Source # unpackBamRec :: Either a b -> BamRec Source # |
encodeBamWith :: (IsBamRec a, MonadIO m) => Int -> BamMeta -> Stream (Of a) m r -> ByteStream m r Source #
Encodes BAM records straight into a dynamic buffer, then BGZF's it. Should be fairly direct and perform well.
writeBamFile :: (IsBamRec a, MonadIO m, MonadMask m) => FilePath -> BamMeta -> Stream (Of a) m r -> m r Source #
Writes BAM encoded stuff to a file. In reality, it cleverly writes to a temporary file and renames it when done.
writeBamHandle :: (IsBamRec a, MonadIO m) => Handle -> BamMeta -> Stream (Of a) m r -> m r Source #
Writes BAM encoded stuff to a Handle
.
pipeBamOutput :: (IsBamRec a, MonadIO m) => BamMeta -> Stream (Of a) m r -> m r Source #
Write BAM encoded stuff to stdout. This sends uncompressed(!) BAM to stdout. Useful for piping to other tools. The output is still wrapped in a BGZF stream, because that's what all tools expect; but the individuals blocks are not compressed.