packages feed

sequence-formats 1.7.0 → 1.7.1

raw patch · 5 files changed

+68/−95 lines, 5 files

Files

Changelog.md view
@@ -1,5 +1,6 @@ # Changelog +- V 1.7.1: Made compatible with latest GHC - V 1.7.0: Bumped major version for breaking change (correct mistake from 1.6.7.0). Also correct lower pvp-bounds on hackage to be compatible with LTS-18.28. - V 1.6.7.0:     * Added an option to Plink output, which allows users to store the population mame in either the first or last column, or both
sequence-formats.cabal view
@@ -1,95 +1,65 @@-cabal-version:      >=1.10-name:               sequence-formats-version:            1.7.0-license:            GPL-3-license-file:       LICENSE-maintainer:         stephan.schiffels@mac.com-author:             Stephan Schiffels-homepage:           https://github.com/stschiff/sequence-formats-bug-reports:        https://github.com/stschiff/sequence-formats/issues-synopsis:-    A package with basic parsing utilities for several Bioinformatic data formats.--description:-    Contains utilities to parse and write Eigenstrat, Fasta, FreqSum, VCF, Plink and other file formats used in population genetics analyses.+name:                sequence-formats+version:             1.7.1+synopsis:            A package with basic parsing utilities for several Bioinformatic data formats.+description:         Contains utilities to parse and write Eigenstrat, Fasta, FreqSum, VCF, Plink and other file formats used in population genetics analyses.+license:             GPL-3+license-file:        LICENSE+author:              Stephan Schiffels+maintainer:          stephan.schiffels@mac.com+category:            Bioinformatics+build-type:          Simple+cabal-version:       >=1.10+Homepage:	           https://github.com/stschiff/sequence-formats+Bug-Reports:         https://github.com/stschiff/sequence-formats/issues -category:           Bioinformatics-build-type:         Simple-extra-source-files:-    README.md-    Changelog.md-    testDat/example.bim-    testDat/example.bed-    testDat/example.eigenstratgeno-    testDat/example.fasta-    testDat/example.freqsum-    testDat/example.histogram.txt-    testDat/example.ind-    testDat/example.snp-    testDat/example.vcf-    testDat/example.pileup-    testDat/example.fam-    testDat/example.plink.bed-    testDat/example.plink.fam-    testDat/example.plink.bim+extra-source-files:  README.md,+                     Changelog.md,+                     testDat/example.bim,+                     testDat/example.bed+                     testDat/example.eigenstratgeno,+                     testDat/example.fasta,+                     testDat/example.freqsum,+                     testDat/example.histogram.txt,+                     testDat/example.ind,+                     testDat/example.snp,+                     testDat/example.vcf,+                     testDat/example.pileup+                     testDat/example.fam+                     testDat/example.plink.bed+                     testDat/example.plink.fam+                     testDat/example.plink.bim  library-    exposed-modules:-        SequenceFormats.RareAlleleHistogram-        SequenceFormats.FreqSum-        SequenceFormats.Fasta-        SequenceFormats.VCF-        SequenceFormats.Eigenstrat-        SequenceFormats.Plink-        SequenceFormats.Utils-        SequenceFormats.Pileup-        SequenceFormats.Bed-        SequenceFormats.Genomic--    hs-source-dirs:   src-    default-language: Haskell2010-    build-depends:-        base >=4.7 && <5,-        containers,-        errors,-        attoparsec,-        pipes,-        transformers,-        bytestring,-        lens-family,-        pipes-bytestring,-        foldl,-        exceptions,-        pipes-safe,-        pipes-attoparsec,-        vector--test-suite sequenceFormatTests-    type:             exitcode-stdio-1.0-    main-is:          Spec.hs-    hs-source-dirs:   test-    other-modules:-        SequenceFormats.EigenstratSpec-        SequenceFormats.BedSpec-        SequenceFormats.FastaSpec-        SequenceFormats.FreqSumSpec-        SequenceFormats.RareAlleleHistogramSpec-        SequenceFormats.UtilsSpec-        SequenceFormats.PlinkSpec-        SequenceFormats.VCFSpec-        SequenceFormats.PileupSpec+  exposed-modules:     SequenceFormats.RareAlleleHistogram,+                       SequenceFormats.FreqSum,+                       SequenceFormats.Fasta,+                       SequenceFormats.VCF,+                       SequenceFormats.Eigenstrat,+                       SequenceFormats.Plink,+                       SequenceFormats.Utils,+                       SequenceFormats.Pileup,+                       SequenceFormats.Bed,+                       SequenceFormats.Genomic+  hs-source-dirs:      src+  build-depends:       base >= 4.7 && < 5, containers, errors, attoparsec, pipes,+                       transformers, bytestring, lens-family,+                       pipes-bytestring, foldl, exceptions, pipes-safe,+                       pipes-attoparsec, vector+  default-language:    Haskell2010 -    default-language: Haskell2010-    build-depends:-        base,-        sequence-formats,-        foldl,-        pipes,-        pipes-safe,-        tasty,-        vector,-        transformers,-        tasty-hunit,-        bytestring,-        containers,-        hspec+Test-Suite sequenceFormatTests+  type:                exitcode-stdio-1.0+  main-is:             Spec.hs+  hs-source-dirs:      test+  build-depends:       base, sequence-formats, foldl, pipes, pipes-safe, tasty, vector,+                       transformers, tasty-hunit, bytestring, containers, hspec+  other-modules:       SequenceFormats.EigenstratSpec,+                       SequenceFormats.BedSpec,+                       SequenceFormats.FastaSpec,+                       SequenceFormats.FreqSumSpec,+                       SequenceFormats.RareAlleleHistogramSpec,+                       SequenceFormats.UtilsSpec,+                       SequenceFormats.PlinkSpec,+                       SequenceFormats.VCFSpec,+                       SequenceFormats.PileupSpec+  default-language:    Haskell2010
src/SequenceFormats/Pileup.hs view
@@ -71,6 +71,8 @@         | x `elem` ("$*#<>" :: String) = go xs         | x == '^' = go (drop 1 xs) -- skip the next character, which is the mapping quality          | x == '+' || x == '-' =  -- insertions or deletions, followed by a decimal number-            let [(num, rest)] = reads xs in go (drop num rest)+            case reads xs of+                [(num, rest)] -> go (drop num rest)+                _ -> error $ "cannot parse read base string: " ++ (x:xs)         | otherwise = error $ "cannot parse read base string: " ++ (x:xs)     go [] = []
src/SequenceFormats/RareAlleleHistogram.hs view
@@ -65,7 +65,7 @@             case raJackknifeEstimates hist of                 Nothing -> [B.intercalate " " [B.pack . showSitePattern $ k, B.pack . show $ v]]                 Just jkHist -> do-                    let Just (jkMean, jkSE) = k `Map.lookup` jkHist+                    let (jkMean, jkSE) = jkHist Map.! k                     return $ B.intercalate " " [B.pack . showSitePattern $ k, B.pack . show $ v,                                                 B.pack . show $ jkMean, B.pack . show $ jkSE]     return $ B.unlines (head0:head1:head2:head3:body)
src/SequenceFormats/Utils.hs view
@@ -37,8 +37,8 @@ -- |Ord instance for Chrom instance Ord Chrom where     compare (Chrom c1) (Chrom c2) = -        let [c1NoChr, c2NoChr] = map removeChr [c1, c2]-            [c1XYMTconvert, c2XYMTconvert] = map convertXYMT [c1NoChr, c2NoChr]+        let (c1NoChr, c2NoChr) = (removeChr c1, removeChr c2)+            (c1XYMTconvert, c2XYMTconvert) = (convertXYMT c1NoChr, convertXYMT c2NoChr)         in  case (,) <$> readChrom c1XYMTconvert <*> readChrom c2XYMTconvert of                 Left e -> throw e                 Right (cn1, cn2) -> cn1 `compare` cn2