changeset 5:cdf4443d5625 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dropletutils/ commit ea9a67b5711b53fb911a0c50b6b49eb9db2366a7"
author iuc
date Wed, 29 Jan 2020 15:07:38 -0500
parents 1797cbe967d1
children 8855361fcfc5
files dropletutils.xml scripts/dropletutils.Rscript test-data/defs_defaultdrops.h5 test-data/defs_defaultdrops.h5ad test-data/defs_emptydrops_150_0002.h5 test-data/defs_emptydrops_150_0002.h5ad test-data/defs_emptydrops_150_0002a.h5 test-data/defs_emptydrops_150_0002a.h5ad test-data/in_matrix.h5 test-data/in_matrix.h5ad
diffstat 10 files changed, 22 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/dropletutils.xml	Thu Dec 05 01:32:29 2019 -0500
+++ b/dropletutils.xml	Wed Jan 29 15:07:38 2020 -0500
@@ -3,7 +3,7 @@
     <description>Utilities for handling droplet-based single-cell RNA-seq data</description>
     <macros>
         <token name="@PACKAGE_VERSION@" >1.2.1</token>
-        <token name="@GALAXY_VERSION@" >5</token>
+        <token name="@GALAXY_VERSION@" >galaxy6</token>
         <token name="@TXIN@">tenx.input</token>
         <token name="@TXOUT@">tenx.output</token>
         <xml name="test_dirin" >
@@ -80,8 +80,8 @@
 out.type='$operation.outformat'
     #if str($operation.outformat) == 'directory':
 files\$out='@TXOUT@'
-    #else if str($operation.outformat) == 'h5ad':
-files\$out='$fileout_h5ad'
+    #else if str($operation.outformat) == 'h5':
+files\$out='$fileout_h5'
     #else if str($operation.outformat) == 'tsv':
 files\$out='$fileout_tsv'
     #end if
@@ -99,7 +99,7 @@
         <conditional name="tenx_format">
             <param name="use" type="select" label="Format for the input matrix">
                 <option value="directory" >Bundled (barcodes.tsv, genes.tsv, matrix.mtx)</option>
-                <option value="h5ad" selected="true" >AnnData/H5</option>
+                <option value="h5" selected="true" >H5</option>
                 <option value="tsv">Tabular</option>
             </param>
             <when value="directory">
@@ -107,8 +107,8 @@
                 <param name="input_genes" type="data" format="tabular,tsv,txt" label="Genes List"/>
                 <param name="input_barcodes" type="data" format="tabular,tsv,txt" label="Barcodes List"/>
             </when>
-            <when value="h5ad">
-                <param name="input" type="data" format="h5ad" label="Count Data"/>
+            <when value="h5">
+                <param name="input" type="data" format="h5" label="Count Data"/>
             </when>
             <when value="tsv">
                 <param name="input" type="data" format="tabular,tsv" label="Count Data" help="The first column must contain gene names, and the first row must contain barcode identifiers." />
@@ -137,7 +137,7 @@
                 </conditional>
                 <param name="outformat" type="select" label="Format for output matrices">
                     <option value="directory" >Bundled (barcodes.tsv, genes.tsv, matrix.mtx)</option>
-                    <option value="h5ad" selected="true" >AnnData/H5</option>
+                    <option value="h5" selected="true" >H5</option>
                     <option value="tsv">Tabular</option>
                 </param>
             </when>
@@ -151,8 +151,8 @@
         <data name="fileout_tsv" format="tsv" label="${tool.name} Count Matrix on ${on_string}">
             <filter>operation['use']=='filter' and operation['outformat'] == 'tsv' </filter>
         </data>
-        <data name="fileout_h5ad" format="h5ad" label="${tool.name} AnnData on ${on_string}">
-            <filter>operation['use']=='filter' and operation['outformat'] == 'h5ad'</filter>
+        <data name="fileout_h5" format="h5" label="${tool.name} H5 Matrix on ${on_string}">
+            <filter>operation['use']=='filter' and operation['outformat'] == 'h5'</filter>
         </data>
         <data name="barcodes_out" format="tsv" from_work_dir="@TXOUT@/barcodes.tsv" label="${tool.name} 10X Barcodes on ${on_string}" >
             <filter>operation['use']=='filter' and operation['outformat'] == 'directory'</filter>
@@ -177,9 +177,9 @@
             <expand macro="test_dirin" />
             <conditional name="operation">
                 <param name="use" value="filter" />
-                <param name="outformat" value="h5ad" /><!-- H5AD -->
+                <param name="outformat" value="h5" /><!-- H5 -->
             </conditional>
-            <output name="fileout_h5ad" value="defs_defaultdrops.h5ad" compare="sim_size" delta="10" />
+            <output name="fileout_h5" value="defs_defaultdrops.h5" compare="sim_size" delta="10" />
         </test>
         <test expect_num_outputs="1">
             <expand macro="test_dirin" />
@@ -210,14 +210,14 @@
             <expand macro="test_dirin" />
             <conditional name="operation">
                 <param name="use" value="filter" />
-                <param name="outformat" value="h5ad" />
+                <param name="outformat" value="h5" />
                 <conditional name="method">
                     <param name="use" value="emptydrops" />
                     <param name="lower" value="150" />
                     <param name="fdr_thresh" value="0.02" />
                 </conditional>
             </conditional>
-            <output name="fileout_h5ad" value="defs_emptydrops_150_0002.h5ad" compare="sim_size" delta="10" />
+            <output name="fileout_h5" value="defs_emptydrops_150_0002.h5" compare="sim_size" delta="10" />
             <output name="table" >
                 <assert_contents>
                     <has_n_columns n="9" />
@@ -229,22 +229,22 @@
             <output name="plot" value="defs_emptydrops_150_0002.png" compare="sim_size" delta="400" />
         </test>
         <!-- Other format input tests -->
-        <!-- ::: Empty Drops, same as above but input is h5ad -->
+        <!-- ::: Empty Drops, same as above but input is h5 -->
         <test expect_num_outputs="3">
             <conditional name="tenx_format" >
-                <param name="use" value="h5ad" />
-                <param name="input" value="in_matrix.h5ad" />
+                <param name="use" value="h5" />
+                <param name="input" value="in_matrix.h5" />
             </conditional>
             <conditional name="operation">
                 <param name="use" value="filter" />
-                <param name="outformat" value="h5ad" />
+                <param name="outformat" value="h5" />
                 <conditional name="method">
                     <param name="use" value="emptydrops" />
                     <param name="lower" value="150" />
                     <param name="fdr_thresh" value="0.02" />
                 </conditional>
             </conditional>
-            <output name="fileout_h5ad" value="defs_emptydrops_150_0002a.h5ad" compare="sim_size" delta="400" />
+            <output name="fileout_h5" value="defs_emptydrops_150_0002a.h5" compare="sim_size" delta="400" />
             <output name="table" >
                 <assert_contents>
                     <has_n_columns n="9" />
--- a/scripts/dropletutils.Rscript	Thu Dec 05 01:32:29 2019 -0500
+++ b/scripts/dropletutils.Rscript	Wed Jan 29 15:07:38 2020 -0500
@@ -34,7 +34,7 @@
     if (typeout == "tsv"){
         writeTSV(fileout, getCounts(object))
     }
-    else if (typeout == "h5ad"){
+    else if (typeout == "h5"){
         write10xCounts(fileout, getCounts(object),
                        type="HDF5",
                        gene.symbol=determineGeneIDs(object),
@@ -55,7 +55,7 @@
         ## - solution is to use the readSparseCounts function from scater
         sce <- SingleCellExperiment(assays = list(counts = readSparseCounts(filein)))
     }
-    else if (typein == "h5ad"){
+    else if (typein == "h5"){
         sce <- read10xCounts(filein, col.names=T, type="HDF5")   # use barcodes.tsv as column names
     }
     else if (typein == "directory"){
@@ -69,7 +69,7 @@
 ## Methods
 
 
-doEmptyDrops <- function(files, eparams, in.type="directory", out.type="h5ad", fdr_threshold = 0.01){
+doEmptyDrops <- function(files, eparams, in.type="directory", out.type="h5", fdr_threshold = 0.01){
     sce <- read10xFiles(files$infile, in.type)
 
     eparams$... <- NULL ## hack
@@ -115,7 +115,7 @@
 }
 
 
-doDefaultDrops <- function(files, dparams, in.type="directory", out.type="h5ad"){
+doDefaultDrops <- function(files, dparams, in.type="directory", out.type="h5"){
     sce <- read10xFiles(files$infile, in.type)
 
     dparams$m = counts(sce)
Binary file test-data/defs_defaultdrops.h5 has changed
Binary file test-data/defs_defaultdrops.h5ad has changed
Binary file test-data/defs_emptydrops_150_0002.h5 has changed
Binary file test-data/defs_emptydrops_150_0002.h5ad has changed
Binary file test-data/defs_emptydrops_150_0002a.h5 has changed
Binary file test-data/defs_emptydrops_150_0002a.h5ad has changed
Binary file test-data/in_matrix.h5 has changed
Binary file test-data/in_matrix.h5ad has changed