packages feed

birch-beer 0.2.1.0 → 0.2.2.0

raw patch · 6 files changed

+12/−1 lines, 6 files

Files

app/Main.hs view
@@ -61,6 +61,7 @@         minDistanceSearch' = fmap MinDistanceSearch . unHelpful . minDistanceSearch $ opts         smartCutoff'      = fmap SmartCutoff . unHelpful . smartCutoff $ opts         customCut'        = CustomCut . Set.fromList . unHelpful . customCut $ opts+        rootCut'          = fmap RootCut . unHelpful . rootCut $ opts         order'            = fmap Order . unHelpful . order $ opts         drawLeaf'            =             maybe@@ -178,6 +179,7 @@                         , _birchMinDistanceSearch   = minDistanceSearch'                         , _birchSmartCutoff         = smartCutoff'                         , _birchCustomCut           = customCut'+                        , _birchRootCut             = rootCut'                         , _birchOrder               = order'                         , _birchDrawLeaf            = drawLeaf'                         , _birchDrawCollection      = drawCollection'
birch-beer.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name: birch-beer-version: 0.2.1.0+version: 0.2.2.0 license: GPL-3 license-file: LICENSE copyright: 2019 Gregory W. Schwartz
src/BirchBeer/Interactive.hs view
@@ -105,6 +105,7 @@                             , _birchMinDistanceSearch   = Nothing                             , _birchSmartCutoff         = Nothing                             , _birchCustomCut           = CustomCut Set.empty+                            , _birchRootCut             = Nothing                             , _birchOrder               = Nothing                             , _birchDrawLeaf            = drawLeaf'                             , _birchDrawCollection      = drawCollection'
src/BirchBeer/MainDiagram.hs view
@@ -44,6 +44,7 @@         labelMap'         = _birchLabelMap config         smartCutoff'      = _birchSmartCutoff config         customCut'        = _birchCustomCut config+        rootCut'          = _birchRootCut config         maxStep'          = _birchMaxStep config         minSize'          =             case (fmap unSmartCutoff smartCutoff', _birchMinSize config) of@@ -98,6 +99,7 @@                        . unCustomCut                        $ customCut'                   )+                , (\x -> maybe x (clusterGraphToTree (treeToGraph x) . unRootCut) rootCut')                 , (\x -> maybe x (flip proportionCut x . unMaxProportion) maxProportion')                 , (\x -> maybe x (flip distanceCut x . unMinDistance) minDistance')                 , (\x -> maybe x (flip distanceSearchCut x . unMinDistanceSearch) minDistanceSearch')
src/BirchBeer/Options.hs view
@@ -29,6 +29,7 @@     , minDistanceSearch :: Maybe Double <?> "([Nothing] | DOUBLE) Similar to --min-distance, but searches from the leaves to the root -- if a path from a subtree contains a distance of at least DOUBLE, keep that path, otherwise prune it. This argument assists in finding distant nodes."     , smartCutoff :: Maybe Double <?> "([Nothing] | DOUBLE) Whether to set the cutoffs for --min-size, --max-proportion, --min-distance, and --min-distance-search based off of the distributions (median + (DOUBLE * MAD)) of all nodes. To use smart cutoffs, use this argument and then set one of the three arguments to an arbitrary number, whichever cutoff type you want to use. --min-size distribution is log2 transformed."     , customCut :: [Int] <?> "([Nothing] | NODE) List of nodes to prune (make these nodes leaves). Invoked by --custom-cut 34 --custom-cut 65 etc."+    , rootCut :: Maybe Int <?> "([Nothing] | NODE) Assign a new root to the tree, removing all nodes outside of the subtree."     , order :: Maybe Double <?> "([1] | DOUBLE) The order of diversity for DrawItem DrawDiversity."     , drawLeaf :: Maybe String <?> "([DrawText] | DrawItem DrawItemType) How to draw leaves in the dendrogram. DrawText is the number of items in that leaf. DrawItem is the collection of items represented by circles, consisting of: DrawItem DrawLabel, where each item is colored by its label, DrawItem (DrawContinuous [FEATURE]), where each item is colored by the expression of FEATURE (corresponding to a feature name in the input matrix, [FEATURE] is a list, so if more than one FEATURE is listed, uses the average of the feature values), DrawItem (DrawThresholdContinuous [(FEATURE, DOUBLE)]), where each item is colored by the binary high / low expression of FEATURE based on DOUBLE and multiple FEATUREs can be used to combinatorically label items (FEATURE1 high / FEATURE2 low, etc.), DrawItem DrawSumContinuous, where each item is colored by the sum of the post-normalized columns (use --normalization NoneNorm for UMI counts, default), and DrawItem DrawDiversity, where each node is colored by the diversity based on the labels of each item and the color is normalized separately for the leaves and the inner nodes. The default is DrawText, unless --labels-file is provided, in which DrawItem DrawLabel is the default. If the label or feature cannot be found, the default color will be black (check your spelling!)."     , drawCollection :: Maybe String <?> "([PieChart] | PieRing | PieNone | CollectionGraph MAXWEIGHT THRESHOLD [NODE]) How to draw item leaves in the dendrogram. PieRing draws a pie chart ring around the items. PieChart only draws a pie chart instead of items. PieNone only draws items, no pie rings or charts. (CollectionGraph MAXWEIGHT THRESHOLD [NODE]) draws the nodes and edges within leaves that are descendents of NODE (empty list [] indicates draw all leaf networks) based on the input matrix, normalizes edges based on the MAXWEIGHT, and removes edges for display less than THRESHOLD (after normalization, so for CollectionGraph 2 0.5 [26], draw the leaf graphs for all leaves under node 26, then a edge of 0.7 would be removed because (0.7 / 2) < 0.5). For CollectionGraph with no colors, use --draw-leaf \"DrawItem DrawLabel\" and all nodes will be black. If you don't specify this option, DrawText from --draw-leaf overrides this argument and only the number of cells will be plotted."@@ -73,6 +74,7 @@     short "minDistanceSearch"    = Nothing     short "minSize"              = Just 'M'     short "order"                = Just 'O'+    short "rootCut"              = Nothing     short x                      = firstLetter x  instance ParseRecord Options where
src/BirchBeer/Types.hs view
@@ -113,6 +113,9 @@ newtype CustomCut = CustomCut     { unCustomCut :: Set.Set Int     } deriving (Read,Show)+newtype RootCut = RootCut+    { unRootCut :: Int+    } deriving (Read,Show) newtype SmartCutoff = SmartCutoff     { unSmartCutoff :: Double     } deriving (Read,Show)@@ -223,6 +226,7 @@     { _birchLabelMap            :: Maybe LabelMap     , _birchSmartCutoff         :: Maybe SmartCutoff     , _birchCustomCut           :: CustomCut+    , _birchRootCut             :: Maybe RootCut     , _birchMinSize             :: Maybe MinClusterSize     , _birchMaxStep             :: Maybe MaxStep     , _birchMaxProportion       :: Maybe MaxProportion