Repository 'scanpy_normalise_data'
hg clone https://toolshed.g2.bx.psu.edu/repos/ebi-gxa/scanpy_normalise_data

Changeset 13:6aa97861fdfd (2020-09-07)
Previous changeset 12:47c747351d62 (2020-06-05) Next changeset 14:e81a4512a057 (2020-09-10)
Commit message:
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 62f47287c7e8449c59a1f1f454852ddc669b1b1e-dirty"
modified:
scanpy-normalise-data.xml
scanpy_macros2.xml
b
diff -r 47c747351d62 -r 6aa97861fdfd scanpy-normalise-data.xml
--- a/scanpy-normalise-data.xml Fri Jun 05 09:03:47 2020 -0400
+++ b/scanpy-normalise-data.xml Mon Sep 07 13:13:49 2020 +0000
[
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<tool id="scanpy_normalise_data" name="Scanpy NormaliseData" version="@TOOL_VERSION@+galaxy10" profile="@PROFILE@">
+<tool id="scanpy_normalise_data" name="Scanpy NormaliseData" version="@TOOL_VERSION@+galaxy0" profile="@PROFILE@">
   <description>to make all cells having the same total expression</description>
   <macros>
     <import>scanpy_macros2.xml</import>
@@ -8,10 +8,23 @@
   <command detect_errors="exit_code"><![CDATA[
 ln -s '${input_obj_file}' input.h5 &&
 PYTHONIOENCODING=utf-8 scanpy-normalise-data
-    --normalize-to ${scale_factor}
-    --fraction ${fraction}
-    --save-raw ${save_raw}
-    ${log_transform}
+    #if not $settings.default 
+        #if not $settings.log_transform
+            ${settings.log_transform}
+        #end if
+        #if $settings.scale_factor
+            --normalize-to '${settings.scale_factor}'
+        #end if
+        #if $settings.key_added
+            --key-added '${settings.key_added}'
+        #end if
+        #if $settings.exclude.exclude_highly_expressed
+            --exclude-highly-expressed --max-fraction '${settings.exclude.max_fraction}'
+        #end if
+        #if $settings.save_raw
+             --save-raw ${settings.save_raw}
+        #end if
+    #end if
     @INPUT_OPTS@
     @OUTPUT_OPTS@
     @EXPORT_MTX_OPTS@
@@ -20,16 +33,37 @@
   <inputs>
     <expand macro="input_object_params"/>
     <expand macro="output_object_params"/>
-    <param name="scale_factor" argument="--normalize-to" type="float" value="1e4" min="0"
-           label="Target number to normalise to" help="Aimed counts per cell after normalisation."/>
-    <param name="fraction" argument="--fraction" type="float" value="1" min="0" max="1"
-           label="Exclude top expressed genes until the remaining account for no greater than specified fraction of total counts"
-           help="Only non-excluded genes will sum up the target number."/>
-    <param name="log_transform" argument="--no-log-transform" type="boolean" truevalue="" falsevalue="--no-log-transform" checked="True"
-           label="Apply log transform?" help="If enabled, will apply a log transformation following normalisation."/>
-    <param name="save_raw" argument="--save-raw" type="boolean" truevalue="yes" falsevalue="no" checked="true"
-           label="Save normalised data in `.raw`" help="The saved normalised data are log1p transformed."/>
     <expand macro="export_mtx_params"/>
+     <conditional name="settings">
+      <param name="default" type="boolean" checked="true" label="Use programme defaults"/>
+      <when value="true"/>
+      <when value="false">
+        <param name="scale_factor" argument="--normalize-to" type="float" value="1e4" min="0" 
+            label="Target number to normalise to" help="Aimed counts per cell after normalisation."/>
+        <param name="log_transform" argument="--no-log-transform" type="boolean" truevalue="" falsevalue="--no-log-transform" checked="True"
+             label="Apply log transform?" help="If enabled, will apply a log transformation following normalisation."/>
+        <param name="save_raw" argument="--save-raw" type="boolean" truevalue="yes" falsevalue="no" checked="true"
+             label="Save normalised data in `.raw`" help="The saved normalised data are log1p transformed."/>
+        <conditional name="exclude">
+         <param name="exclude_highly_expressed" argument="--exclude-highly-expressed" type="boolean" checked="False" 
+             label="Exclude highly expressed genes?" help="Exclude (very) highly expressed genes for the computation of the normalization factor (size factor) for each cell. A gene is considered highly expressed, if it has more than max_fraction of the total counts in at least one cell. The not-excluded genes will sum up to the number specified by --normalize-to."/>
+           <when value="true">
+             <param name="max_fraction" argument="--max-fraction" type="float" value="0.05" min="0" max="1" 
+                 label="Consider cells as highly expressed that have more counts than max_fraction of the original total counts in at least one cell." />      
+            </when>
+        </conditional>
+        <param name="layers" argument="--layers" type="text" optional="true"
+             label="Comma-separated list of layers to normalize. Set to 'all' to normalize all layers."/>
+        <param name="layer_norm" type="select" label="How to normalise layers" help="If None, after normalization, for each layer in layers each cell has a total count equal to the median of the counts_per_cell before normalization of the layer. If 'after', for each layer in layers each cell has a total count equal to the value of --normalize-to. If 'X', for each layer in layers each cell has a total count equal to the median of total counts for observations (cells) of adata.X before normalization." >
+          <option value="" selected="true">None</option>
+          <option value="X">X</option>
+          <option value="after">after</option>
+        </param>

+        <param name="key_added" argument="--key-added" type="text" optional="true"
+             label="Name of the field in adata.obs where the normalization factor is stored. Default: don't store."/>
+      </when>
+    </conditional>
   </inputs>
 
   <outputs>
b
diff -r 47c747351d62 -r 6aa97861fdfd scanpy_macros2.xml
--- a/scanpy_macros2.xml Fri Jun 05 09:03:47 2020 -0400
+++ b/scanpy_macros2.xml Mon Sep 07 13:13:49 2020 +0000
[
@@ -1,10 +1,13 @@
 <macros>
-  <token name="@TOOL_VERSION@">1.4.3</token>
+  <token name="@TOOL_VERSION@">1.6.0</token>
   <token name="@HELP@">More information can be found at https://scanpy.readthedocs.io</token>
   <token name="@PROFILE@">18.01</token>
   <token name="@VERSION_HISTORY@"><![CDATA[
 **Version history**
 
+1.6.0+galaxy0: Update to scanpy-scripts 0.2.13 (running scanpy ==1.6.0) to incorporate new options, code simplifications, and batch integration methods. Jonathan Manning, Expression Atlas team https://www.ebi.ac.uk/gxa/home  at
+EMBL-EBI https://www.ebi.ac.uk/
+
 1.4.3+galaxy10: Update to scanpy-scripts 0.2.10 (running scanpy ==1.4.3) to address bugfixes in run-pca.
 
 1.4.3+galaxy10: Update to scanpy-scripts 0.2.9 (running scanpy ==1.4.3) to address bugfixes in find-variable-genes.
@@ -46,7 +49,7 @@
 
   <xml name="requirements">
     <requirements>
-      <requirement type="package" version="0.2.10">scanpy-scripts</requirement>
+      <requirement type="package" version="0.3.0">scanpy-scripts</requirement>
       <yield/>
     </requirements>
   </xml>