Repository 'anndata_import'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/anndata_import

Changeset 13:d330b3082107 (2024-09-14)
Previous changeset 12:93dd15e13e6a (2023-11-12) Next changeset 14:6f143dfe902a (2024-11-08)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/anndata/ commit 67b3808b56df343798263ff0c905df8cb789edfa
modified:
import.xml
macros.xml
test-data/addloomout1.loom
test-data/addloomout3.loom
test-data/converted.loom.test
test-data/export.krumsiek11.loom
test-data/import.csv.h5ad
test-data/krumsiek11.h5ad
test-data/pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad
test-data/pp.pca.krumsiek11.h5ad
test-data/tl.diffmap.h5ad
test-data/tl.draw_graph.h5ad
test-data/tl.paga.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad
test-data/tl.rank_genes_groups.krumsiek11.h5ad
test-data/tl.tsne.h5ad
test-data/tl.umap.h5ad
removed:
test-data/import.loom.krumsiek11.h5ad
test-data/import.mtx.legacy_10x.h5ad
test-data/import.mtx.no_10x.h5ad
test-data/import.mtx.v3_10x.h5ad
test-data/import.tsv.h5ad
test-data/import.umi_tools.h5ad
test-data/manipulate.add_annotation_obs.h5ad
test-data/manipulate.add_annotation_var.h5ad
test-data/manipulate.concatenate.h5ad
test-data/manipulate.filter_obs_key.h5ad
test-data/manipulate.filter_var_index.h5ad
test-data/manipulate.obs_names_make_unique.h5ad
test-data/manipulate.rename_categories.h5ad
test-data/manipulate.save_raw.h5ad
test-data/manipulate.strings_to_categoricals.h5ad
test-data/manipulate.transpose.h5ad
test-data/manipulate.var_names_make_unique.h5ad
b
diff -r 93dd15e13e6a -r d330b3082107 import.xml
--- a/import.xml Sun Nov 12 16:42:57 2023 +0000
+++ b/import.xml Sat Sep 14 19:58:24 2024 +0000
[
b'@@ -1,9 +1,9 @@\n-<tool id="anndata_import" name="Import Anndata and loom" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.09">\n-    <description>from different format</description>\n+<tool id="anndata_import" name="Import Anndata" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">\n+    <description>from different formats</description>\n     <macros>\n         <import>macros.xml</import>\n         <xml name="params_10x">\n-            <param name="barcodes" type="data" format="tabular,txt" label="Barcodes"/>\n+            <param name="barcodes" type="data" format="tabular,txt" label="Barcodes (whitelist) file with one barcode per line"/>\n             <param name="var_names" type="select" label="Variables index">\n                 <option value="gene_symbols">gene_symbols</option>\n                 <option value="gene_ids">gene_ids</option>\n@@ -13,164 +13,132 @@\n         </xml>\n     </macros>\n     <expand macro="requirements">\n-        <requirement type="package" version="1.9.6">scanpy</requirement>\n+        <requirement type="package" version="1.10.2">scanpy</requirement>\n     </expand>\n     <expand macro="version_command"/>\n     <command detect_errors="exit_code"><![CDATA[\n-#if $hd5_format.filetype == \'anndata\'\n-    #if $hd5_format.in.adata_format == \'mtx\'\n-        mkdir mtx\n-        #if $hd5_format.in.tenx.use == \'legacy_10x\'\n-            && cp \'$hd5_format.in.matrix\' \'mtx/matrix.mtx\'\n-            && cp \'$hd5_format.in.tenx.genes\' \'mtx/genes.tsv\'\n-            && cp \'$hd5_format.in.tenx.barcodes\' \'mtx/barcodes.tsv\'\n-        #else if $hd5_format.in.tenx.use == \'v3_10x\'\n-            && cp \'$hd5_format.in.matrix\' \'mtx/matrix.mtx\'\n-            && gzip \'mtx/matrix.mtx\'\n-            && cp \'$hd5_format.in.tenx.features\' \'mtx/features.tsv\'\n-            && gzip \'mtx/features.tsv\'\n-            && cp \'$hd5_format.in.tenx.barcodes\' \'mtx/barcodes.tsv\'\n-            && gzip \'mtx/barcodes.tsv\'\n-        #end if\n-        &&\n-    #else if $hd5_format.in.adata_format == \'umi_tools\'\n-        ## avoid gzipping in the inputdir\n-        gzip -c \'$hd5_format.in.input\' > umi_tools_input.gz\n-        &&\n+#if $in.adata_format == \'mtx\'\n+    mkdir mtx\n+    #if $in.tenx.use == \'legacy_10x\'\n+        && cp \'$in.matrix\' \'mtx/matrix.mtx\'\n+        && cp \'$in.tenx.genes\' \'mtx/genes.tsv\'\n+        && cp \'$in.tenx.barcodes\' \'mtx/barcodes.tsv\'\n+    #else if $in.tenx.use == \'v3_10x\'\n+        && cp \'$in.matrix\' \'mtx/matrix.mtx\'\n+        && gzip \'mtx/matrix.mtx\'\n+        && cp \'$in.tenx.features\' \'mtx/features.tsv\'\n+        && gzip \'mtx/features.tsv\'\n+        && cp \'$in.tenx.barcodes\' \'mtx/barcodes.tsv\'\n+        && gzip \'mtx/barcodes.tsv\'\n     #end if\n-\n-    @CMD@\n-\n-    #if $hd5_format.in.adata_format == \'mtx\'\n-        && rm -rf mtx\n-    #end if\n+    &&\n+#else if $in.adata_format == \'umi_tools\'\n+    ## avoid gzipping in the inputdir\n+    gzip -c \'$in.input\' > umi_tools_input.gz\n+    &&\n+#end if\n \n-#else:\n-        python \'$__tool_directory__/tsv_to_loompy.py\'\n-        -c \'${hd5_format.coldata}\'\n-        -r \'${hd5_format.rowdata}\'\n-        -f \'${hd5_format.mainmatrix}\'\n-        #if $hd5_format.other_files:\n-            \'${hd5_format.other_files}\'\n-        #end if\n-#end if\n+@CMD@\n       ]]></command>\n     <configfiles>\n         <configfile name="script_file"><![CDATA[\n @CMD_imports@\n-#if $hd5_format.filetype == \'anndata\'\n-    #if $hd5_format.in.adata_format == \'loom\'\n+#if $in.adata_format == \'loom\'\n adata = ad.read_loom(\n-    \'$hd5_format.in.input\',\n-    sparse=$hd5_format.in.sparse,\n-    cleanup=$hd5_format.in.cleanup,\n-    X_name=\'$hd5_format.in.x_name\',\n-    obs_names=\'$hd5_format.in.obs_names\',\n-    var_names=\'$hd5_format.in.var_names\')\n+    \'$in.input\',\n+    sparse=$in.sparse,\n+    cleanup=$in.cleanup,\n+    X_name=\'$in.x_name\',\n+    obs_names=\'$in.obs_names\',\n+    var_names=\'$in.var_names\')\n \n-    #else if $hd5_format.in.adata_format == \'tabular\'\n-        #set delimiter=$hd5_format.in.input.metadata.delimiter\n-        #if $delimiter != \',\'\n-    '..b't>\n-            <output name="anndata" value="import.tsv.h5ad" ftype="h5ad" compare="sim_size"/>\n         </test>\n         <test expect_num_outputs="1">\n             <conditional name="in">\n@@ -226,8 +200,10 @@\n                 <conditional name="tenx">\n                     <param name="use" value="no"/>\n                 </conditional>\n-                </conditional>\n-            <output name="anndata" value="import.mtx.no_10x.h5ad" ftype="h5ad" compare="sim_size"/>\n+            </conditional>\n+            <assert_stdout>\n+                <has_text_matching expression="343 \xc3\x97 12"/>\n+            </assert_stdout>\n         </test>\n         <test expect_num_outputs="1">\n             <conditional name="in">\n@@ -242,7 +218,14 @@\n                     <param name="gex_only" value="true"/>\n                 </conditional>\n             </conditional>\n-            <output name="anndata" value="import.mtx.legacy_10x.h5ad" ftype="h5ad" compare="sim_size"/>\n+            <assert_stdout>\n+                <has_text_matching expression="12 \xc3\x97 343"/>\n+            </assert_stdout>\n+            <output name="anndata" ftype="h5ad">\n+                <assert_contents>\n+                    <has_h5_keys keys="var/gene_ids"/>\n+                </assert_contents>\n+            </output>\n         </test>\n         <test expect_num_outputs="1">\n             <conditional name="in">\n@@ -257,31 +240,29 @@\n                     <param name="gex_only" value="true"/>\n                 </conditional>\n             </conditional>\n-            <output name="anndata" value="import.mtx.v3_10x.h5ad" ftype="h5ad" compare="sim_size"/>\n+            <assert_stdout>\n+                <has_text_matching expression="1107 \xc3\x97 507"/>\n+            </assert_stdout>\n+            <output name="anndata" ftype="h5ad">\n+                <assert_contents>\n+                    <has_h5_keys keys="var/gene_ids"/>\n+                    <has_h5_keys keys="var/feature_types"/>\n+                </assert_contents>\n+            </output>\n         </test>\n         <test expect_num_outputs="1">\n-            <param name="filetype" value="anndata"/>\n             <conditional name="in">\n                 <param name="adata_format" value="umi_tools"/>\n                 <param name="input" value="umi_tools.tsv"/>\n             </conditional>\n-            <output name="anndata" value="import.umi_tools.h5ad" ftype="h5ad" compare="sim_size"/>\n-        </test>\n-        <test expect_num_outputs="1">\n-            <param name="filetype" value="loom"/>\n-            <param name="mainmatrix" value="firstlayer.tsv"/>\n-            <param name="other_files" value="secondlayer.tsv"/>\n-            <param name="coldata" value="cols.tsv"/>\n-            <param name="rowdata" value="rows.tsv"/>\n-            <output name="loomdata" value="converted.loom.test" ftype="loom" compare="sim_size"/>\n+            <assert_stdout>\n+                <has_text_matching expression="2 \xc3\x97 13"/>\n+            </assert_stdout>\n         </test>\n         <test expect_num_outputs="1"><!-- 10x h5 test -->\n-            <conditional name="hd5_format">\n-                <param name="filetype" value="anndata"/>\n-                <conditional name="in">\n-                    <param name="adata_format" value="10x_h5"/>\n-                    <param name="input" value="dropletutils_input.h5"/>\n-                </conditional>\n+            <conditional name="in">\n+                <param name="adata_format" value="10x_h5"/>\n+                <param name="input" value="dropletutils_input.h5"/>\n             </conditional>\n             <output name="anndata">\n                 <assert_contents>\n@@ -296,7 +277,7 @@\n \n **What it does**\n \n-This tool creates an AnnData or loom dataset from several input types:\n+This tool creates an AnnData from several input types:\n \n - Loom (`read_loom method <https://anndata.readthedocs.io/en/latest/generated/anndata.read_loom.html>`__)\n - Tabular (`read_csv method <https://anndata.readthedocs.io/en/latest/generated/anndata.read_csv.html>`__)\n'
b
diff -r 93dd15e13e6a -r d330b3082107 macros.xml
--- a/macros.xml Sun Nov 12 16:42:57 2023 +0000
+++ b/macros.xml Sat Sep 14 19:58:24 2024 +0000
[
@@ -1,6 +1,7 @@
 <macros>
-    <token name="@TOOL_VERSION@">0.10.3</token>
+    <token name="@TOOL_VERSION@">0.10.9</token>
     <token name="@VERSION_SUFFIX@">0</token>
+    <token name="@PROFILE@">21.09</token>
     <xml name="requirements">
         <requirements>
             <requirement type="package" version="@TOOL_VERSION@">anndata</requirement>
@@ -21,12 +22,6 @@
 python '$script_file'
     ]]>
     </token>
-    <token name="@LOOMCMD@"><![CDATA[
-mkdir ./output &&
-mkdir ./attributes &&
-python '$__tool_directory__/loompy_to_tsv.py' -f '${hd5_format.input}'
-    ]]>
-    </token>
     <token name="@CMD_imports@"><![CDATA[
 import anndata as ad
     ]]>
@@ -76,4 +71,11 @@
             </when>
         </conditional>
     </xml>
+    <xml name="sanitize_query" token_validinitial="string.printable">
+        <sanitizer>
+            <valid initial="@VALIDINITIAL@">
+                <remove value="&apos;" />
+            </valid>
+       </sanitizer>
+    </xml>
 </macros>
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/addloomout1.loom
b
Binary file test-data/addloomout1.loom has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/addloomout3.loom
b
Binary file test-data/addloomout3.loom has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/converted.loom.test
b
Binary file test-data/converted.loom.test has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/export.krumsiek11.loom
b
Binary file test-data/export.krumsiek11.loom has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/import.csv.h5ad
b
Binary file test-data/import.csv.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/import.loom.krumsiek11.h5ad
b
Binary file test-data/import.loom.krumsiek11.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/import.mtx.legacy_10x.h5ad
b
Binary file test-data/import.mtx.legacy_10x.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/import.mtx.no_10x.h5ad
b
Binary file test-data/import.mtx.no_10x.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/import.mtx.v3_10x.h5ad
b
Binary file test-data/import.mtx.v3_10x.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/import.tsv.h5ad
b
Binary file test-data/import.tsv.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/import.umi_tools.h5ad
b
Binary file test-data/import.umi_tools.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/krumsiek11.h5ad
b
Binary file test-data/krumsiek11.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/manipulate.add_annotation_obs.h5ad
b
Binary file test-data/manipulate.add_annotation_obs.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/manipulate.add_annotation_var.h5ad
b
Binary file test-data/manipulate.add_annotation_var.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/manipulate.concatenate.h5ad
b
Binary file test-data/manipulate.concatenate.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/manipulate.filter_obs_key.h5ad
b
Binary file test-data/manipulate.filter_obs_key.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/manipulate.filter_var_index.h5ad
b
Binary file test-data/manipulate.filter_var_index.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/manipulate.obs_names_make_unique.h5ad
b
Binary file test-data/manipulate.obs_names_make_unique.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/manipulate.rename_categories.h5ad
b
Binary file test-data/manipulate.rename_categories.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/manipulate.save_raw.h5ad
b
Binary file test-data/manipulate.save_raw.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/manipulate.strings_to_categoricals.h5ad
b
Binary file test-data/manipulate.strings_to_categoricals.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/manipulate.transpose.h5ad
b
Binary file test-data/manipulate.transpose.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/manipulate.var_names_make_unique.h5ad
b
Binary file test-data/manipulate.var_names_make_unique.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad
b
Binary file test-data/pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/pp.pca.krumsiek11.h5ad
b
Binary file test-data/pp.pca.krumsiek11.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/tl.diffmap.h5ad
b
Binary file test-data/tl.diffmap.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/tl.draw_graph.h5ad
b
Binary file test-data/tl.draw_graph.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/tl.paga.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad
b
Binary file test-data/tl.paga.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/tl.rank_genes_groups.krumsiek11.h5ad
b
Binary file test-data/tl.rank_genes_groups.krumsiek11.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/tl.tsne.h5ad
b
Binary file test-data/tl.tsne.h5ad has changed
b
diff -r 93dd15e13e6a -r d330b3082107 test-data/tl.umap.h5ad
b
Binary file test-data/tl.umap.h5ad has changed