module Bio.SamTools.LowLevel ( TamFilePtr
, samOpen, samClose
, BamFilePtr, BamFileInt
, bamOpen, bamClose
, BamHeaderPtr, BamHeaderInt
, getNTargets, getTargetName, getTargetLen, bamGetTid
, bamHeaderInit, bamHeaderDestroy, bamHeaderDestroyPtr, bamInitHeaderHash
, setNTargets, setTargetName, setTargetLen
, samHeaderRead, samHeaderRead2
, samRead1
, bamHeaderRead, bamHeaderWrite
, bamRead1, bamWrite1
, BamCigar(..)
, cigarMatch, cigarIns, cigarDel, cigarRefSkip, cigarSoftClip, cigarHardClip, cigarPad
, cigarOp, cigarLength
, BamFlag(..)
, flagPaired, flagProperPair, flagUnmap, flagMUnmap, flagReverse, flagMReverse
, flagRead1, flagRead2, flagSecondary, flagQCFail, flagDup, flagSupplementary
, Bam1Ptr, Bam1Int
, getTID, getPos, getFlag, getNCigar, getLQSeq, getMTID, getMPos, getISize
, bam1Strand, bam1MStrand, bam1Cigar, bam1QName, bam1Seq, bam1Qual, bam1Seqi
, bamAuxGet, bamAux2Z, bamAux2i, bamAux2f, bamAux2d, bamAux2A
, bamInit1, bamDestroy1, bamDestroy1Ptr, bamDup1, bamFormat1
, bamAuxAppend
, BamIndexInt, BamIndexPtr
, bamIndexLoad, bamIndexDestroy
, BamIterInt, BamIterPtr
, bamIterQuery, bamIterRead, bamIterDestroy
, BamFetchFPtr, mkBamFetchFPtr, bamFetch
, SamFilePtr, SamFileInt
, sbamOpen, sbamClose, getSbamHeader, sbamRead, sbamWrite
, FaIdxPtr, FaIdxInt
, faiLoad, faiDestroy, faiFetchSeq
)
where
import qualified Data.Bits as C2HSImp
import qualified Foreign.C.String as C2HSImp
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.Marshal.Utils as C2HSImp
import qualified Foreign.Ptr as C2HSImp
import qualified Foreign.Storable as C2HSImp
import qualified System.IO.Unsafe as C2HSImp
import System.IO.Unsafe (unsafePerformIO)
import Foreign hiding (Word, unsafePerformIO)
import Foreign.C
import Control.Monad
import qualified Data.ByteString.Char8 as BS
data TamFileInt
type TamFilePtr = C2HSImp.Ptr (TamFileInt)
data BamFileInt
type BamFilePtr = C2HSImp.Ptr (BamFileInt)
bamOpen :: (String) -> (String) -> IO ((BamFilePtr))
bamOpen a1 a2 =
C2HSImp.withCString a1 $ \a1' ->
C2HSImp.withCString a2 $ \a2' ->
bamOpen'_ a1' a2' >>= \res ->
let {res' = id res} in
return (res')
bamClose :: (BamFilePtr) -> IO ((CInt))
bamClose a1 =
let {a1' = id a1} in
bamClose'_ a1' >>= \res ->
let {res' = id res} in
return (res')
data BamHeaderInt
type BamHeaderPtr = C2HSImp.Ptr (BamHeaderInt)
getNTargets :: BamHeaderPtr -> IO CInt
getNTargets = (\ptr -> do {C2HSImp.peekByteOff ptr 0 :: IO C2HSImp.CInt})
setNTargets :: BamHeaderPtr -> CInt -> IO ()
setNTargets = (\ptr val -> do {C2HSImp.pokeByteOff ptr 0 (val :: C2HSImp.CInt)})
getTargetName :: BamHeaderPtr -> IO (Ptr CString)
getTargetName = (\ptr -> do {C2HSImp.peekByteOff ptr 8 :: IO (C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar))})
setTargetName :: BamHeaderPtr -> Ptr CString -> IO ()
setTargetName = (\ptr val -> do {C2HSImp.pokeByteOff ptr 8 (val :: (C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)))})
getTargetLen :: BamHeaderPtr -> IO (Ptr CUInt)
getTargetLen = (\ptr -> do {C2HSImp.peekByteOff ptr 16 :: IO (C2HSImp.Ptr C2HSImp.CUInt)})
setTargetLen :: BamHeaderPtr -> Ptr CUInt -> IO ()
setTargetLen = (\ptr val -> do {C2HSImp.pokeByteOff ptr 16 (val :: (C2HSImp.Ptr C2HSImp.CUInt))})
newtype BamFlag = BamFlag { unBamFlag :: CUInt }
deriving (Eq, Show, Ord, Num, Bits)
flagPaired :: BamFlag
flagPaired = BamFlag (C2HSImp.unsafePerformIO bam_fpaired)
flagProperPair :: BamFlag
flagProperPair = BamFlag (C2HSImp.unsafePerformIO bam_fproper_pair)
flagUnmap :: BamFlag
flagUnmap = BamFlag (C2HSImp.unsafePerformIO bam_funmap)
flagMUnmap :: BamFlag
flagMUnmap = BamFlag (C2HSImp.unsafePerformIO bam_fmunmap)
flagReverse :: BamFlag
flagReverse = BamFlag (C2HSImp.unsafePerformIO bam_freverse)
flagMReverse :: BamFlag
flagMReverse = BamFlag (C2HSImp.unsafePerformIO bam_fmreverse)
flagRead1 :: BamFlag
flagRead1 = BamFlag (C2HSImp.unsafePerformIO bam_fread1)
flagRead2 :: BamFlag
flagRead2 = BamFlag (C2HSImp.unsafePerformIO bam_fread2)
flagSecondary :: BamFlag
flagSecondary = BamFlag (C2HSImp.unsafePerformIO bam_fsecondary)
flagQCFail :: BamFlag
flagQCFail = BamFlag (C2HSImp.unsafePerformIO bam_fqcfail)
flagDup :: BamFlag
flagDup = BamFlag (C2HSImp.unsafePerformIO bam_fdup)
flagSupplementary :: BamFlag
flagSupplementary = BamFlag (C2HSImp.unsafePerformIO bam_fsupplementary)
newtype BamCigar = BamCigar { unBamCigar :: CUInt }
deriving (Eq, Show, Ord)
cigarMatch :: BamCigar
cigarMatch = BamCigar (C2HSImp.unsafePerformIO bam_cmatch)
cigarIns :: BamCigar
cigarIns = BamCigar (C2HSImp.unsafePerformIO bam_cins)
cigarDel :: BamCigar
cigarDel = BamCigar (C2HSImp.unsafePerformIO bam_cdel)
cigarRefSkip :: BamCigar
cigarRefSkip = BamCigar (C2HSImp.unsafePerformIO bam_cref_skip)
cigarSoftClip :: BamCigar
cigarSoftClip = BamCigar (C2HSImp.unsafePerformIO bam_csoft_clip)
cigarHardClip :: BamCigar
cigarHardClip = BamCigar (C2HSImp.unsafePerformIO bam_chard_clip)
cigarPad :: BamCigar
cigarPad = BamCigar (C2HSImp.unsafePerformIO bam_cpad)
cigarOp :: CUInt -> BamCigar
cigarOp = BamCigar . (\ x1 -> C2HSImp.unsafePerformIO (bam_cigar_op x1))
cigarLength :: CUInt -> CUInt
cigarLength = (\ x1 -> C2HSImp.unsafePerformIO (bam_cigar_length x1))
data Bam1Int
type Bam1Ptr = C2HSImp.Ptr (Bam1Int)
getTID :: Bam1Ptr -> IO CInt
getTID = (\ptr -> do {C2HSImp.peekByteOff ptr 0 :: IO C2HSImp.CInt})
getPos :: Bam1Ptr -> IO CInt
getPos = (\ptr -> do {C2HSImp.peekByteOff ptr 4 :: IO C2HSImp.CInt})
getFlag :: Bam1Ptr -> IO BamFlag
getFlag = liftM BamFlag . (\ptr -> do {val <- C2HSImp.peekByteOff ptr 20 :: IO C2HSImp.CUInt; return $ (val `C2HSImp.shiftL` (32 16)) `C2HSImp.shiftR` (32 16)})
getNCigar :: Bam1Ptr -> IO Int
getNCigar = liftM fromIntegral . (\ptr -> do {val <- C2HSImp.peekByteOff ptr 24 :: IO C2HSImp.CUInt; return $ (val `C2HSImp.shiftL` (32 16)) `C2HSImp.shiftR` (32 16)})
getLQSeq :: Bam1Ptr -> IO CInt
getLQSeq = (\ptr -> do {C2HSImp.peekByteOff ptr 28 :: IO C2HSImp.CInt})
getMTID :: Bam1Ptr -> IO CInt
getMTID = (\ptr -> do {C2HSImp.peekByteOff ptr 32 :: IO C2HSImp.CInt})
getMPos :: Bam1Ptr -> IO CInt
getMPos = (\ptr -> do {C2HSImp.peekByteOff ptr 36 :: IO C2HSImp.CInt})
getISize :: Bam1Ptr -> IO CInt
getISize = (\ptr -> do {C2HSImp.peekByteOff ptr 40 :: IO C2HSImp.CInt})
bam1Strand :: (Bam1Ptr) -> (Bool)
bam1Strand a1 =
C2HSImp.unsafePerformIO $
let {a1' = id a1} in
bam1Strand'_ a1' >>= \res ->
let {res' = C2HSImp.toBool res} in
return (res')
bam1MStrand :: (Bam1Ptr) -> (Bool)
bam1MStrand a1 =
C2HSImp.unsafePerformIO $
let {a1' = id a1} in
bam1MStrand'_ a1' >>= \res ->
let {res' = C2HSImp.toBool res} in
return (res')
bam1Cigar :: (Bam1Ptr) -> (Ptr CUInt)
bam1Cigar a1 =
C2HSImp.unsafePerformIO $
let {a1' = id a1} in
bam1Cigar'_ a1' >>= \res ->
let {res' = id res} in
return (res')
bam1QName :: (Bam1Ptr) -> (BS.ByteString)
bam1QName a1 =
C2HSImp.unsafePerformIO $
let {a1' = id a1} in
bam1QName'_ a1' >>= \res ->
packCString res >>= \res' ->
return (res')
bam1Seq :: (Bam1Ptr) -> (Ptr CUChar)
bam1Seq a1 =
C2HSImp.unsafePerformIO $
let {a1' = id a1} in
bam1Seq'_ a1' >>= \res ->
let {res' = id res} in
return (res')
bam1Qual :: (Bam1Ptr) -> (Ptr CUChar)
bam1Qual a1 =
C2HSImp.unsafePerformIO $
let {a1' = id a1} in
bam1Qual'_ a1' >>= \res ->
let {res' = id res} in
return (res')
bam1Seqi :: (Ptr CUChar) -> (CInt) -> (CUChar)
bam1Seqi a1 a2 =
C2HSImp.unsafePerformIO $
let {a1' = id a1} in
let {a2' = id a2} in
bam1Seqi'_ a1' a2' >>= \res ->
let {res' = id res} in
return (res')
samOpen :: (String) -> IO ((TamFilePtr))
samOpen a1 =
C2HSImp.withCString a1 $ \a1' ->
samOpen'_ a1' >>= \res ->
let {res' = id res} in
return (res')
samClose :: (TamFilePtr) -> IO ()
samClose a1 =
let {a1' = id a1} in
samClose'_ a1' >>
return ()
samRead1 :: (TamFilePtr) -> (BamHeaderPtr) -> (Bam1Ptr) -> IO ((Int))
samRead1 a1 a2 a3 =
let {a1' = id a1} in
let {a2' = id a2} in
let {a3' = id a3} in
samRead1'_ a1' a2' a3' >>= \res ->
let {res' = fromIntegral res} in
return (res')
samHeaderRead2 :: (String) -> IO ((BamHeaderPtr))
samHeaderRead2 a1 =
C2HSImp.withCString a1 $ \a1' ->
samHeaderRead2'_ a1' >>= \res ->
let {res' = id res} in
return (res')
samHeaderRead :: (TamFilePtr) -> IO ((BamHeaderPtr))
samHeaderRead a1 =
let {a1' = id a1} in
samHeaderRead'_ a1' >>= \res ->
let {res' = id res} in
return (res')
bamGetTid :: (BamHeaderPtr) -> (BS.ByteString) -> IO ((CInt))
bamGetTid a1 a2 =
let {a1' = id a1} in
useAsCString a2 $ \a2' ->
bamGetTid'_ a1' a2' >>= \res ->
let {res' = id res} in
return (res')
bamHeaderInit :: IO ((BamHeaderPtr))
bamHeaderInit =
bamHeaderInit'_ >>= \res ->
let {res' = id res} in
return (res')
bamHeaderDestroy :: (BamHeaderPtr) -> IO ()
bamHeaderDestroy a1 =
let {a1' = id a1} in
bamHeaderDestroy'_ a1' >>
return ()
foreign import ccall unsafe "bam.h &bam_header_destroy" bamHeaderDestroyPtr :: FunPtr (Ptr BamHeaderInt -> IO ())
bamHeaderRead :: (BamFilePtr) -> IO ((BamHeaderPtr))
bamHeaderRead a1 =
let {a1' = id a1} in
bamHeaderRead'_ a1' >>= \res ->
let {res' = id res} in
return (res')
bamHeaderWrite :: (BamFilePtr) -> (BamHeaderPtr) -> IO ((CInt))
bamHeaderWrite a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
bamHeaderWrite'_ a1' a2' >>= \res ->
let {res' = id res} in
return (res')
bamInitHeaderHash :: (BamHeaderPtr) -> IO ((()))
bamInitHeaderHash a1 =
let {a1' = id a1} in
bamInitHeaderHash'_ a1' >>= \res ->
let {res' = id res} in
return (res')
bamRead1 :: (BamFilePtr) -> (Bam1Ptr) -> IO ((CInt))
bamRead1 a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
bamRead1'_ a1' a2' >>= \res ->
let {res' = id res} in
return (res')
bamWrite1 :: (BamFilePtr) -> (Bam1Ptr) -> IO ((CInt))
bamWrite1 a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
bamWrite1'_ a1' a2' >>= \res ->
let {res' = id res} in
return (res')
bamAuxGet :: (Bam1Ptr) -> (CString) -> IO ((Ptr CUChar))
bamAuxGet a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
bamAuxGet'_ a1' a2' >>= \res ->
let {res' = id res} in
return (res')
bamAux2Z :: (Ptr CUChar) -> IO ((CString))
bamAux2Z a1 =
let {a1' = id a1} in
bamAux2Z'_ a1' >>= \res ->
let {res' = id res} in
return (res')
bamAux2i :: (Ptr CUChar) -> IO ((CInt))
bamAux2i a1 =
let {a1' = id a1} in
bamAux2i'_ a1' >>= \res ->
let {res' = id res} in
return (res')
bamAux2f :: (Ptr CUChar) -> IO ((CFloat))
bamAux2f a1 =
let {a1' = id a1} in
bamAux2f'_ a1' >>= \res ->
let {res' = id res} in
return (res')
bamAux2d :: (Ptr CUChar) -> IO ((CDouble))
bamAux2d a1 =
let {a1' = id a1} in
bamAux2d'_ a1' >>= \res ->
let {res' = id res} in
return (res')
bamAux2A :: (Ptr CUChar) -> IO ((CChar))
bamAux2A a1 =
let {a1' = id a1} in
bamAux2A'_ a1' >>= \res ->
let {res' = id res} in
return (res')
bamInit1 :: IO ((Bam1Ptr))
bamInit1 =
bamInit1'_ >>= \res ->
let {res' = id res} in
return (res')
bamDestroy1 :: (Bam1Ptr) -> IO ()
bamDestroy1 a1 =
let {a1' = id a1} in
bamDestroy1'_ a1' >>
return ()
foreign import ccall unsafe "samtools.h &bam_destroy1_" bamDestroy1Ptr :: FunPtr (Ptr Bam1Int -> IO ())
bamDup1 :: (Bam1Ptr) -> IO ((Bam1Ptr))
bamDup1 a1 =
let {a1' = id a1} in
bamDup1'_ a1' >>= \res ->
let {res' = id res} in
return (res')
bamFormat1 :: (BamHeaderPtr) -> (Bam1Ptr) -> IO ((CString))
bamFormat1 a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
bamFormat1'_ a1' a2' >>= \res ->
let {res' = id res} in
return (res')
bamAuxAppend :: (Bam1Ptr) -> (Ptr CChar) -> (CChar) -> (CInt) -> (Ptr CUChar) -> IO ()
bamAuxAppend a1 a2 a3 a4 a5 =
let {a1' = id a1} in
let {a2' = id a2} in
let {a3' = id a3} in
let {a4' = id a4} in
let {a5' = id a5} in
bamAuxAppend'_ a1' a2' a3' a4' a5' >>
return ()
data BamIndexInt
type BamIndexPtr = C2HSImp.Ptr (BamIndexInt)
bamIndexLoad :: (String) -> IO ((BamIndexPtr))
bamIndexLoad a1 =
C2HSImp.withCString a1 $ \a1' ->
bamIndexLoad'_ a1' >>= \res ->
let {res' = id res} in
return (res')
bamIndexDestroy :: (BamIndexPtr) -> IO ()
bamIndexDestroy a1 =
let {a1' = id a1} in
bamIndexDestroy'_ a1' >>
return ()
type BamFetchFPtr = C2HSImp.FunPtr (((Bam1Ptr) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))))
foreign import ccall "wrapper"
mkBamFetchFPtr :: (Bam1Ptr -> Ptr () -> IO CInt) -> IO (FunPtr (Bam1Ptr ->Ptr () -> IO CInt))
bamFetch :: (BamFilePtr) -> (BamIndexPtr) -> (CInt) -> (CInt) -> (CInt) -> (Ptr ()) -> (BamFetchFPtr) -> IO ((CInt))
bamFetch a1 a2 a3 a4 a5 a6 a7 =
let {a1' = id a1} in
let {a2' = id a2} in
let {a3' = id a3} in
let {a4' = id a4} in
let {a5' = id a5} in
let {a6' = id a6} in
let {a7' = id a7} in
bamFetch'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
let {res' = id res} in
return (res')
data BamIterInt
type BamIterPtr = C2HSImp.Ptr (BamIterInt)
bamIterQuery :: (BamIndexPtr) -> (CInt) -> (CInt) -> (CInt) -> IO ((BamIterPtr))
bamIterQuery a1 a2 a3 a4 =
let {a1' = id a1} in
let {a2' = id a2} in
let {a3' = id a3} in
let {a4' = id a4} in
bamIterQuery'_ a1' a2' a3' a4' >>= \res ->
let {res' = id res} in
return (res')
bamIterRead :: (BamFilePtr) -> (BamIterPtr) -> (Bam1Ptr) -> IO ((CInt))
bamIterRead a1 a2 a3 =
let {a1' = id a1} in
let {a2' = id a2} in
let {a3' = id a3} in
bamIterRead'_ a1' a2' a3' >>= \res ->
let {res' = id res} in
return (res')
bamIterDestroy :: (BamIterPtr) -> IO ((()))
bamIterDestroy a1 =
let {a1' = id a1} in
bamIterDestroy'_ a1' >>= \res ->
let {res' = id res} in
return (res')
data SamFileInt
type SamFilePtr = C2HSImp.Ptr (SamFileInt)
getSbamHeader :: SamFilePtr -> IO BamHeaderPtr
getSbamHeader = (\ptr -> do {C2HSImp.peekByteOff ptr 16 :: IO (BamHeaderPtr)})
sbamOpen :: (String) -> (String) -> (Ptr ()) -> IO ((SamFilePtr))
sbamOpen a1 a2 a3 =
C2HSImp.withCString a1 $ \a1' ->
C2HSImp.withCString a2 $ \a2' ->
let {a3' = id a3} in
sbamOpen'_ a1' a2' a3' >>= \res ->
let {res' = id res} in
return (res')
sbamClose :: (SamFilePtr) -> IO ()
sbamClose a1 =
let {a1' = id a1} in
sbamClose'_ a1' >>
return ()
sbamRead :: (SamFilePtr) -> (Bam1Ptr) -> IO ((CInt))
sbamRead a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
sbamRead'_ a1' a2' >>= \res ->
let {res' = id res} in
return (res')
sbamWrite :: (SamFilePtr) -> (Bam1Ptr) -> IO ((CInt))
sbamWrite a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
sbamWrite'_ a1' a2' >>= \res ->
let {res' = id res} in
return (res')
data FaIdxInt
type FaIdxPtr = C2HSImp.Ptr (FaIdxInt)
faiLoad :: (String) -> IO ((FaIdxPtr))
faiLoad a1 =
C2HSImp.withCString a1 $ \a1' ->
faiLoad'_ a1' >>= \res ->
let {res' = id res} in
return (res')
faiDestroy :: (FaIdxPtr) -> IO ()
faiDestroy a1 =
let {a1' = id a1} in
faiDestroy'_ a1' >>
return ()
faiFetchSeq :: (FaIdxPtr) -> (CString) -> (CInt) -> (CInt) -> (Ptr CInt) -> IO ((CString))
faiFetchSeq a1 a2 a3 a4 a5 =
let {a1' = id a1} in
let {a2' = id a2} in
let {a3' = id a3} in
let {a4' = id a4} in
let {a5' = id a5} in
faiFetchSeq'_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = id res} in
return (res')
packCString :: CString -> IO BS.ByteString
packCString = BS.packCString
useAsCString :: BS.ByteString -> (CString -> IO a) -> IO a
useAsCString = BS.useAsCString
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_open_"
bamOpen'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (BamFilePtr))))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_close_"
bamClose'_ :: ((BamFilePtr) -> (IO C2HSImp.CInt))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_fpaired"
bam_fpaired :: (IO C2HSImp.CUInt)
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_fproper_pair"
bam_fproper_pair :: (IO C2HSImp.CUInt)
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_funmap"
bam_funmap :: (IO C2HSImp.CUInt)
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_fmunmap"
bam_fmunmap :: (IO C2HSImp.CUInt)
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_freverse"
bam_freverse :: (IO C2HSImp.CUInt)
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_fmreverse"
bam_fmreverse :: (IO C2HSImp.CUInt)
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_fread1"
bam_fread1 :: (IO C2HSImp.CUInt)
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_fread2"
bam_fread2 :: (IO C2HSImp.CUInt)
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_fsecondary"
bam_fsecondary :: (IO C2HSImp.CUInt)
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_fqcfail"
bam_fqcfail :: (IO C2HSImp.CUInt)
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_fdup"
bam_fdup :: (IO C2HSImp.CUInt)
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_fsupplementary"
bam_fsupplementary :: (IO C2HSImp.CUInt)
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_cmatch"
bam_cmatch :: (IO C2HSImp.CUInt)
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_cins"
bam_cins :: (IO C2HSImp.CUInt)
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_cdel"
bam_cdel :: (IO C2HSImp.CUInt)
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_cref_skip"
bam_cref_skip :: (IO C2HSImp.CUInt)
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_csoft_clip"
bam_csoft_clip :: (IO C2HSImp.CUInt)
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_chard_clip"
bam_chard_clip :: (IO C2HSImp.CUInt)
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_cpad"
bam_cpad :: (IO C2HSImp.CUInt)
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_cigar_op"
bam_cigar_op :: (C2HSImp.CUInt -> (IO C2HSImp.CUInt))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_cigar_length"
bam_cigar_length :: (C2HSImp.CUInt -> (IO C2HSImp.CUInt))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam1_strand_"
bam1Strand'_ :: ((Bam1Ptr) -> (IO C2HSImp.CInt))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam1_mstrand_"
bam1MStrand'_ :: ((Bam1Ptr) -> (IO C2HSImp.CInt))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam1_cigar_"
bam1Cigar'_ :: ((Bam1Ptr) -> (IO (C2HSImp.Ptr C2HSImp.CUInt)))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam1_qname_"
bam1QName'_ :: ((Bam1Ptr) -> (IO (C2HSImp.Ptr C2HSImp.CChar)))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam1_seq_"
bam1Seq'_ :: ((Bam1Ptr) -> (IO (C2HSImp.Ptr C2HSImp.CUChar)))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam1_qual_"
bam1Qual'_ :: ((Bam1Ptr) -> (IO (C2HSImp.Ptr C2HSImp.CUChar)))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam1_seqi_"
bam1Seqi'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CInt -> (IO C2HSImp.CUChar)))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h sam_open"
samOpen'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (TamFilePtr)))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h sam_close"
samClose'_ :: ((TamFilePtr) -> (IO ()))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h sam_read1"
samRead1'_ :: ((TamFilePtr) -> ((BamHeaderPtr) -> ((Bam1Ptr) -> (IO C2HSImp.CInt))))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h sam_header_read2"
samHeaderRead2'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (BamHeaderPtr)))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h sam_header_read"
samHeaderRead'_ :: ((TamFilePtr) -> (IO (BamHeaderPtr)))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_get_tid"
bamGetTid'_ :: ((BamHeaderPtr) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_header_init"
bamHeaderInit'_ :: (IO (BamHeaderPtr))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_header_destroy"
bamHeaderDestroy'_ :: ((BamHeaderPtr) -> (IO ()))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_header_read"
bamHeaderRead'_ :: ((BamFilePtr) -> (IO (BamHeaderPtr)))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_header_write"
bamHeaderWrite'_ :: ((BamFilePtr) -> ((BamHeaderPtr) -> (IO C2HSImp.CInt)))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_init_header_hash"
bamInitHeaderHash'_ :: ((BamHeaderPtr) -> (IO ()))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_read1"
bamRead1'_ :: ((BamFilePtr) -> ((Bam1Ptr) -> (IO C2HSImp.CInt)))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_write1"
bamWrite1'_ :: ((BamFilePtr) -> ((Bam1Ptr) -> (IO C2HSImp.CInt)))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_aux_get"
bamAuxGet'_ :: ((Bam1Ptr) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (C2HSImp.Ptr C2HSImp.CUChar))))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_aux2Z"
bamAux2Z'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO (C2HSImp.Ptr C2HSImp.CChar)))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_aux2i"
bamAux2i'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_aux2f"
bamAux2f'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CFloat))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_aux2d"
bamAux2d'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CDouble))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_aux2A"
bamAux2A'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CChar))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_init1_"
bamInit1'_ :: (IO (Bam1Ptr))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_destroy1_"
bamDestroy1'_ :: ((Bam1Ptr) -> (IO ()))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_dup1_"
bamDup1'_ :: ((Bam1Ptr) -> (IO (Bam1Ptr)))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_format1"
bamFormat1'_ :: ((BamHeaderPtr) -> ((Bam1Ptr) -> (IO (C2HSImp.Ptr C2HSImp.CChar))))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_aux_append"
bamAuxAppend'_ :: ((Bam1Ptr) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CChar -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))))))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_index_load"
bamIndexLoad'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (BamIndexPtr)))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_index_destroy"
bamIndexDestroy'_ :: ((BamIndexPtr) -> (IO ()))
foreign import ccall safe "Bio/SamTools/LowLevel.chs.h bam_fetch"
bamFetch'_ :: ((BamFilePtr) -> ((BamIndexPtr) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr ()) -> ((BamFetchFPtr) -> (IO C2HSImp.CInt))))))))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_iter_query"
bamIterQuery'_ :: ((BamIndexPtr) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO (BamIterPtr))))))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_iter_read"
bamIterRead'_ :: ((BamFilePtr) -> ((BamIterPtr) -> ((Bam1Ptr) -> (IO C2HSImp.CInt))))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h bam_iter_destroy"
bamIterDestroy'_ :: ((BamIterPtr) -> (IO ()))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h samopen"
sbamOpen'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr ()) -> (IO (SamFilePtr)))))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h samclose"
sbamClose'_ :: ((SamFilePtr) -> (IO ()))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h samread"
sbamRead'_ :: ((SamFilePtr) -> ((Bam1Ptr) -> (IO C2HSImp.CInt)))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h samwrite"
sbamWrite'_ :: ((SamFilePtr) -> ((Bam1Ptr) -> (IO C2HSImp.CInt)))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h fai_load"
faiLoad'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (FaIdxPtr)))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h fai_destroy"
faiDestroy'_ :: ((FaIdxPtr) -> (IO ()))
foreign import ccall unsafe "Bio/SamTools/LowLevel.chs.h faidx_fetch_seq"
faiFetchSeq'_ :: ((FaIdxPtr) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CInt) -> (IO (C2HSImp.Ptr C2HSImp.CChar)))))))