sequence-formats 1.6.1 → 1.6.3
raw patch · 8 files changed
+11/−8 lines, 8 filesdep ~base
Dependency ranges changed: base
Files
- Changelog.md +3/−0
- sequence-formats.cabal +1/−1
- src/SequenceFormats/FreqSum.hs +2/−2
- src/SequenceFormats/Pileup.hs +1/−1
- src/SequenceFormats/Plink.hs +1/−1
- src/SequenceFormats/RareAlleleHistogram.hs +1/−1
- src/SequenceFormats/Utils.hs +1/−1
- testDat/example.pileup +1/−1
Changelog.md view
@@ -1,3 +1,6 @@+V 1.6.3: Pileup reference-base is read as upper case, even if it's not in the file.+V 1.6.2: Made compatible with GHC 9 (thanks to github user sjakobi)+ V 1.6.0: Plink Output now supported. V 1.5.1.4: Plink BIM parsing now automatically converts from Numbers (0,1,2,3,4) to Letters (N,A,C,T,G).
sequence-formats.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name: sequence-formats-version: 1.6.1+version: 1.6.3 license: GPL-3 license-file: LICENSE maintainer: stephan.schiffels@mac.com
src/SequenceFormats/FreqSum.hs view
@@ -7,7 +7,7 @@ module SequenceFormats.FreqSum (readFreqSumStdIn, readFreqSumFile, FreqSumEntry(..), FreqSumHeader(..), printFreqSumStdOut, printFreqSumFile, freqSumEntryToText) where -import SequenceFormats.Utils (consumeProducer, Chrom(..))+import SequenceFormats.Utils (consumeProducer, Chrom(..), readFileProd) import Control.Applicative ((<|>)) import Control.Monad.Catch (MonadThrow, throwM)@@ -73,7 +73,7 @@ -- |A function to read a freqsum file from a file. Returns a pair of a freqSum Header and a Producer over all lines. readFreqSumFile :: (MonadSafe m) => FilePath -> m (FreqSumHeader, Producer FreqSumEntry m ())-readFreqSumFile file = readFreqSumProd $ withFile file ReadMode PB.fromHandle+readFreqSumFile = readFreqSumProd . readFileProd parseFreqSumHeader :: A.Parser FreqSumHeader parseFreqSumHeader = do
src/SequenceFormats/Pileup.hs view
@@ -41,7 +41,7 @@ _ <- A.space pos <- A.decimal _ <- A.space- refA <- A.satisfy (A.inClass "ACTGNactgnM")+ refA <- toUpper <$> A.satisfy (A.inClass "ACTGNactgnM") -- for some reason, there is an M in the human reference at -- position 3:60830534 (both in hs37d5 and in hg19) _ <- A.space
src/SequenceFormats/Plink.hs view
@@ -100,7 +100,7 @@ -- |A function to read a bed file from a file. Returns a Producer over all lines. readPlinkBedFile :: (MonadSafe m) => FilePath -> Int -> m (Producer GenoLine m ())-readPlinkBedFile file nrInds = readPlinkBedProd nrInds (PS.withFile file ReadMode PB.fromHandle)+readPlinkBedFile file nrInds = readPlinkBedProd nrInds (readFileProd file) -- |Function to read a Bim File from StdIn. Returns a Pipes-Producer over the EigenstratSnpEntries. readBimStdIn :: (MonadThrow m, MonadIO m) => Producer EigenstratSnpEntry m ()
src/SequenceFormats/RareAlleleHistogram.hs view
@@ -93,7 +93,7 @@ -- |Read a histogram from a File Handle. readHistogramFromHandle :: (MonadIO m) => Handle -> m RareAlleleHistogram readHistogramFromHandle handle = do- res <- evalStateT (parse parseHistogram) . PB.fromHandle $ handle+ res <- evalStateT (parse parseHistogram) (PB.fromHandle handle) case res of Nothing -> throw (SeqFormatException "histogram file exhausted too early") Just (Left err) -> throw (SeqFormatException ("Histogram parsing error: " <> show err))
src/SequenceFormats/Utils.hs view
@@ -73,7 +73,7 @@ consumeProducer parser prod = parsed parser prod >>= liftParsingErrors readFileProd :: (PS.MonadSafe m) => FilePath -> Producer B.ByteString m ()-readFileProd f = PS.withFile f ReadMode PB.fromHandle+readFileProd f = PS.withFile f ReadMode (\h -> PB.fromHandle h) word :: A.Parser B.ByteString word = A.takeTill isSpace
testDat/example.pileup view
@@ -1,3 +1,3 @@ 1 1000 A 4 ..,C*. IIII 3 ..ac* III 8 ,,.,ccAA-3acccA IIIIIIII-1 2000 C 4 ..C+4IIIIa IIII 3 ACt..* III 8 .a.a.C.C* IIIIIIII+1 2000 c 4 ..C+4IIIIa IIII 3 ACt..* III 8 .a.a.C.C* IIIIIIII 2 1000 G 4 ,,.,,..-3AccC*. IIII 3 .,,* III 8 .,,.,,* IIIIIIII