packages feed

differential 0.1.1.0 → 0.1.2.0

raw patch · 4 files changed

+11/−5 lines, 4 files

Files

differential.cabal view
@@ -1,13 +1,13 @@ name:                differential-version:             0.1.1.0+version:             0.1.2.0 synopsis:            Finds out whether an entity comes from different distributions (statuses). description:         Uses statistical tests to find whether an entity comes from one or two distributions. homepage:            http://github.com/GregorySchwartz/differential#readme license:             GPL-3 license-file:        LICENSE author:              Gregory W. Schwartz-maintainer:          gsch@mail.med.upenn.edu-copyright:           Copyright: (c) 2018 Gregory W. Schwartz+maintainer:          gsch@pennmedicine.upenn.edu+copyright:           Copyright: (c) 2019 Gregory W. Schwartz category:            Bioinformatics build-type:          Simple -- extra-source-files:
src/Load.hs view
@@ -6,6 +6,7 @@  {-# LANGUAGE BangPatterns #-} {-# LANGUAGE QuasiQuotes #-}+{-# LANGUAGE OverloadedStrings #-}  module Load     ( toEntity@@ -32,6 +33,7 @@     Entity { _name   = Name . lookupWithErr nameCol $ m            , _status = Status . lookupWithErr statusCol $ m            , _value  = either error fst . T.double . lookupWithErr valueCol $ m+           , _id = Id ""            }   where     lookupWithErr k =
src/Plot.hs view
@@ -51,7 +51,8 @@  -- | Plot the difference between groups for all features. Here, Name refers -- to the feature while Status refers to the differential group. Choose whether--- to normalize by the maximum value for a name.+-- to normalize by the maximum value for a name. Returns a list where the first+-- entry is the plot and the second entry is a data frame of the values. plotSingleDiff :: Bool -> [Entity] -> R.R s (R.SomeSEXP s) plotSingleDiff normalizeBool vals = do     let jsonR = B.unpack $ A.encode vals@@ -87,5 +88,5 @@           p = p + ylab("Abundance")         } -        return(p)+        return(list(p, df))     |]
src/Types.hs view
@@ -41,6 +41,7 @@     { unFDR :: Double     } deriving (Eq,Ord,Read,Show,Generic) newtype Name       = Name { unName :: T.Text } deriving (Eq, Ord, Read, Show, A.ToJSON,Generic)+newtype Id         = Id { unId :: T.Text } deriving (Eq, Ord, Read, Show, A.ToJSON,Generic) newtype Status = Status     { unStatus :: T.Text     } deriving (Eq,Ord,Read,Show, A.ToJSON)@@ -52,10 +53,12 @@ instance NFData PValue instance NFData FDR instance NFData Name+instance NFData Id  -- Advanced data Entity = Entity { _name   :: Name                      , _status :: Status+                     , _id     :: Id                      , _value  :: Double                      }               deriving (Read, Show, Generic)