Previous changeset 0:0ef28c0963c8 (2019-04-10) Next changeset 2:a56baceb1900 (2019-12-12) |
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/anndata/ commit 8ef5f7c6f8728608a3f05bb51e11b642b84a05f5" |
modified:
macros.xml manipulate.xml |
added:
test-data/manipulate.add_annotation_obs.h5ad test-data/manipulate.add_annotation_var.h5ad test-data/manipulate.filter_obs_key.h5ad test-data/manipulate.filter_var_index.h5ad test-data/obs_add_annotation.tabular 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 test-data/var_add_annotation.tabular |
b |
diff -r 0ef28c0963c8 -r 19592ec717ef macros.xml --- a/macros.xml Wed Apr 10 03:25:05 2019 -0400 +++ b/macros.xml Wed Oct 16 06:26:45 2019 -0400 |
b |
@@ -1,11 +1,11 @@ <macros> - <token name="@VERSION@">0.6.19</token> + <token name="@VERSION@">0.6.22.post1</token> <token name="@GALAXY_VERSION@">galaxy0</token> <xml name="requirements"> <requirements> <requirement type="package" version="@VERSION@">anndata</requirement> - <requirement type="package" version="1.4">scanpy</requirement> <requirement type="package" version="2.0.17">loompy</requirement> + <requirement type="package" version="2.9.0">h5py</requirement> <yield /> </requirements> </xml> |
b |
diff -r 0ef28c0963c8 -r 19592ec717ef manipulate.xml --- a/manipulate.xml Wed Apr 10 03:25:05 2019 -0400 +++ b/manipulate.xml Wed Oct 16 06:26:45 2019 -0400 |
[ |
b'@@ -50,11 +50,76 @@\n key=\'$manipulate.key\',\n categories=$categories)\n \n-#else if $manipulate.function == \'transpose\'\n-adata.transpose()\n-\n #else if $manipulate.function == \'strings_to_categoricals\'\n adata.strings_to_categoricals()\n+\n+#else if $manipulate.function == \'transpose\'\n+adata = adata.transpose()\n+\n+#else if $manipulate.function == \'add_annotation\'\n+import pandas as pd\n+extra_annot_t = pd.read_csv(\'$manipulate.new_annot\', sep=\'\\t\').reset_index(drop=True)\n+ #if $manipulate.var_obs == \'var\'\n+var_index = adata.var_names\n+var = pd.concat([adata.var.reset_index(drop=True), extra_annot_t], axis=1)\n+var.index = var_index\n+adata.var = var\n+ #else if $manipulate.var_obs == \'obs\'\n+obs_index = adata.obs.index\n+obs = pd.concat([adata.obs.reset_index(drop=True), extra_annot_t], axis=1)\n+obs.index = obs_index\n+adata.obs = obs\n+ #end if\n+\n+#else if $manipulate.function == \'filter\'\n+ #if $manipulate.filter.filter == \'key\'\n+ #if $manipulate.var_obs == \'var\'\n+filtered = adata.var[\'$manipulate.filter.key\']\n+ #else if $manipulate.var_obs == \'obs\'\n+filtered = adata.obs[\'$manipulate.filter.key\']\n+ #end if\n+\n+ #if $manipulate.filter.filter_key.type == \'number\'\n+ #if $manipulate.filter.filter_key.filter == \'equal\'\n+filtered = filtered == $manipulate.filter.filter_key.value\n+ #else if $manipulate.filter.filter_key.filter == \'equal\'\n+filtered = filtered != $manipulate.filter.filter_key.value\n+ #else if $manipulate.filter.filter_key.filter == \'less\'\n+filtered = filtered < $manipulate.filter.filter_key.value\n+ #else if $manipulate.filter.filter_key.filter == \'less_or_equal\'\n+filtered = filtered <= $manipulate.filter.filter_key.value\n+ #else if $manipulate.filter.filter_key.filter == \'greater\'\n+filtered = filtered > $manipulate.filter.filter_key.value\n+ #else if $manipulate.filter.filter_key.filter == \'greater_or_equal\'\n+filtered = filtered >= $manipulate.filter.filter_key.value\n+ #end if\n+ #else if $manipulate.filter.filter_key.type == \'text\'\n+ #if $manipulate.filter.filter_key.filter == \'equal\'\n+filtered = filtered == \'$manipulate.filter.filter_key.value\'\n+ #else\n+filtered = filtered != \'$manipulate.filter.filter_key.value\'\n+ #end if\n+ #else if $manipulate.filter.filter_key.type == \'boolean\'\n+filtered = filtered == $manipulate.filter.filter_key.value\n+ #end if\n+\n+ #else if $manipulate.filter.filter == \'index\'\n+ #if str($manipulate.filter.index.format) == \'file\'\n+with open(\'$manipulate.filter.index.file\', \'r\') as filter_f:\n+ filters = [str(x.strip()) for x in filter_f.readlines()]\n+filtered = filters\n+ #else\n+ #set $filters = [str(x.strip()) for x in $manipulate.filter.index.text.split(\',\')]\n+filtered = $filters\n+ #end if\n+ #end if\n+print(filtered)\n+\n+ #if $manipulate.var_obs == \'var\'\n+adata = adata[:,filtered]\n+ #else if $manipulate.var_obs == \'obs\'\n+adata = adata[filtered, :]\n+ #end if\n #end if\n \n adata.write(\'anndata.h5ad\')\n@@ -70,6 +135,8 @@\n <option value="rename_categories">Rename categories of annotation</option>\n <option value="strings_to_categoricals">Transform string annotations to categoricals</option>\n <option value="transpose">Transpose the data matrix, leaving observations and variables interchanged</option>\n+ <option value="add_annotation">Add new annotation(s) for observations or variables</option>\n+ <option value="filter">Filter observations or variables</option>\n </param>\n <when value="concatenate">\n <param name="other_adatas" type="data" format="h5ad" multiple="true" label="Annotated data matrix to add"/>\n@@ -97,13 +164,78 @@\n </when>\n <when value="strings_to_categoricals"/>\n <when value="transpose"/>\n+ <when value="add_annotation">\n+ '..b'5ad"/>\n <conditional name="manipulate">\n <param name="function" value="rename_categories"/>\n@@ -158,6 +293,7 @@\n <output name="anndata" value="manipulate.rename_categories.h5ad" ftype="h5ad" compare="sim_size"/>\n </test>\n <test>\n+ <!-- test 5 -->\n <param name="input" value="krumsiek11.h5ad"/>\n <conditional name="manipulate">\n <param name="function" value="strings_to_categoricals"/>\n@@ -168,6 +304,7 @@\n <output name="anndata" value="manipulate.strings_to_categoricals.h5ad" ftype="h5ad" compare="sim_size"/>\n </test>\n <test>\n+ <!-- test 6 -->\n <param name="input" value="krumsiek11.h5ad"/>\n <conditional name="manipulate">\n <param name="function" value="transpose"/>\n@@ -177,6 +314,60 @@\n </assert_stdout>\n <output name="anndata" value="manipulate.transpose.h5ad" ftype="h5ad" compare="sim_size"/>\n </test>\n+ <test>\n+ <!-- test 7 -->\n+ <param name="input" value="krumsiek11.h5ad"/>\n+ <conditional name="manipulate">\n+ <param name="function" value="add_annotation"/>\n+ <param name="var_obs" value="var"/>\n+ <param name="new_annot" value="var_add_annotation.tabular"/>\n+ </conditional>\n+ <output name="anndata" value="manipulate.add_annotation_var.h5ad" ftype="h5ad" compare="sim_size"/>\n+ </test>\n+ <test>\n+ <!-- test 8 -->\n+ <param name="input" value="krumsiek11.h5ad"/>\n+ <conditional name="manipulate">\n+ <param name="function" value="add_annotation"/>\n+ <param name="var_obs" value="obs"/>\n+ <param name="new_annot" value="obs_add_annotation.tabular"/>\n+ </conditional>\n+ <output name="anndata" value="manipulate.add_annotation_obs.h5ad" ftype="h5ad" compare="sim_size"/>\n+ </test>\n+ <test>\n+ <!-- test 9 -->\n+ <param name="input" value="krumsiek11.h5ad"/>\n+ <conditional name="manipulate">\n+ <param name="function" value="filter"/>\n+ <param name="var_obs" value="var"/>\n+ <conditional name="filter">\n+ <param name="filter" value="index"/>\n+ <conditional name="index">\n+ <param name="format" value="text"/>\n+ <param name="text" value="Gata2,EKLF"/>\n+ </conditional>\n+ </conditional>\n+ </conditional>\n+ <output name="anndata" value="manipulate.filter_var_index.h5ad" ftype="h5ad" compare="sim_size"/>\n+ </test>\n+ <test>\n+ <!-- test 10 -->\n+ <param name="input" value="krumsiek11.h5ad"/>\n+ <conditional name="manipulate">\n+ <param name="function" value="filter"/>\n+ <param name="var_obs" value="obs"/>\n+ <conditional name="filter">\n+ <param name="filter" value="key"/>\n+ <param name="key" value="cell_type"/>\n+ <conditional name="filter_key">\n+ <param name="type" value="text"/>\n+ <param name="filter" value="equal"/>\n+ <param name="value" value="progenitor"/>\n+ </conditional>\n+ </conditional>\n+ </conditional>\n+ <output name="anndata" value="manipulate.filter_obs_key.h5ad" ftype="h5ad" compare="sim_size"/>\n+ </test>\n </tests>\n <help><![CDATA[\n **What it does**\n@@ -211,6 +402,10 @@\n \n Data matrix is transposed, observations and variables are interchanged.\n \n+- Add annotation for variables or observations \n+\n+- Filter data variables or observations, by index or key\n+\n @HELP@\n ]]></help>\n <expand macro="citations"/>\n' |
b |
diff -r 0ef28c0963c8 -r 19592ec717ef test-data/manipulate.add_annotation_obs.h5ad |
b |
Binary file test-data/manipulate.add_annotation_obs.h5ad has changed |
b |
diff -r 0ef28c0963c8 -r 19592ec717ef test-data/manipulate.add_annotation_var.h5ad |
b |
Binary file test-data/manipulate.add_annotation_var.h5ad has changed |
b |
diff -r 0ef28c0963c8 -r 19592ec717ef test-data/manipulate.filter_obs_key.h5ad |
b |
Binary file test-data/manipulate.filter_obs_key.h5ad has changed |
b |
diff -r 0ef28c0963c8 -r 19592ec717ef test-data/manipulate.filter_var_index.h5ad |
b |
Binary file test-data/manipulate.filter_var_index.h5ad has changed |
b |
diff -r 0ef28c0963c8 -r 19592ec717ef test-data/obs_add_annotation.tabular --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/obs_add_annotation.tabular Wed Oct 16 06:26:45 2019 -0400 |
b |
@@ -0,0 +1,641 @@ +annot1 annot2 +0 progenitor +1 progenitor +2 progenitor +3 progenitor +4 progenitor +5 progenitor +6 progenitor +7 progenitor +8 progenitor +9 progenitor +10 progenitor +11 progenitor +12 progenitor +13 progenitor +14 progenitor +15 progenitor +16 progenitor +17 progenitor +18 progenitor +19 progenitor +20 progenitor +21 progenitor +22 progenitor +23 progenitor +24 progenitor +25 progenitor +26 progenitor +27 progenitor +28 progenitor +29 progenitor +30 progenitor +31 progenitor +32 progenitor +33 progenitor +34 progenitor +35 progenitor +36 progenitor +37 progenitor +38 progenitor +39 progenitor +40 progenitor +41 progenitor +42 progenitor +43 progenitor +44 progenitor +45 progenitor +46 progenitor +47 progenitor +48 progenitor +49 progenitor +50 progenitor +51 progenitor +52 progenitor +53 progenitor +54 progenitor +55 progenitor +56 progenitor +57 progenitor +58 progenitor +59 progenitor +60 progenitor +61 progenitor +62 progenitor +63 progenitor +64 progenitor +65 progenitor +66 progenitor +67 progenitor +68 progenitor +69 progenitor +70 progenitor +71 progenitor +72 progenitor +73 progenitor +74 progenitor +75 progenitor +76 progenitor +77 progenitor +78 progenitor +79 progenitor +80 Mo +81 Mo +82 Mo +83 Mo +84 Mo +85 Mo +86 Mo +87 Mo +88 Mo +89 Mo +90 Mo +91 Mo +92 Mo +93 Mo +94 Mo +95 Mo +96 Mo +97 Mo +98 Mo +99 Mo +100 Mo +101 Mo +102 Mo +103 Mo +104 Mo +105 Mo +106 Mo +107 Mo +108 Mo +109 Mo +110 Mo +111 Mo +112 Mo +113 Mo +114 Mo +115 Mo +116 Mo +117 Mo +118 Mo +119 Mo +120 Mo +121 Mo +122 Mo +123 Mo +124 Mo +125 Mo +126 Mo +127 Mo +128 Mo +129 Mo +130 Mo +131 Mo +132 Mo +133 Mo +134 Mo +135 Mo +136 Mo +137 Mo +138 Mo +139 Mo +140 Mo +141 Mo +142 Mo +143 Mo +144 Mo +145 Mo +146 Mo +147 Mo +148 Mo +149 Mo +150 Mo +151 Mo +152 Mo +153 Mo +154 Mo +155 Mo +156 Mo +157 Mo +158 Mo +159 Mo +0 progenitor +1 progenitor +2 progenitor +3 progenitor +4 progenitor +5 progenitor +6 progenitor +7 progenitor +8 progenitor +9 progenitor +10 progenitor +11 progenitor +12 progenitor +13 progenitor +14 progenitor +15 progenitor +16 progenitor +17 progenitor +18 progenitor +19 progenitor +20 progenitor +21 progenitor +22 progenitor +23 progenitor +24 progenitor +25 progenitor +26 progenitor +27 progenitor +28 progenitor +29 progenitor +30 progenitor +31 progenitor +32 progenitor +33 progenitor +34 progenitor +35 progenitor +36 progenitor +37 progenitor +38 progenitor +39 progenitor +40 progenitor +41 progenitor +42 progenitor +43 progenitor +44 progenitor +45 progenitor +46 progenitor +47 progenitor +48 progenitor +49 progenitor +50 progenitor +51 progenitor +52 progenitor +53 progenitor +54 progenitor +55 progenitor +56 progenitor +57 progenitor +58 progenitor +59 progenitor +60 progenitor +61 progenitor +62 progenitor +63 progenitor +64 progenitor +65 progenitor +66 progenitor +67 progenitor +68 progenitor +69 progenitor +70 progenitor +71 progenitor +72 progenitor +73 progenitor +74 progenitor +75 progenitor +76 progenitor +77 progenitor +78 progenitor +79 progenitor +80 Ery +81 Ery +82 Ery +83 Ery +84 Ery +85 Ery +86 Ery +87 Ery +88 Ery +89 Ery +90 Ery +91 Ery +92 Ery +93 Ery +94 Ery +95 Ery +96 Ery +97 Ery +98 Ery +99 Ery +100 Ery +101 Ery +102 Ery +103 Ery +104 Ery +105 Ery +106 Ery +107 Ery +108 Ery +109 Ery +110 Ery +111 Ery +112 Ery +113 Ery +114 Ery +115 Ery +116 Ery +117 Ery +118 Ery +119 Ery +120 Ery +121 Ery +122 Ery +123 Ery +124 Ery +125 Ery +126 Ery +127 Ery +128 Ery +129 Ery +130 Ery +131 Ery +132 Ery +133 Ery +134 Ery +135 Ery +136 Ery +137 Ery +138 Ery +139 Ery +140 Ery +141 Ery +142 Ery +143 Ery +144 Ery +145 Ery +146 Ery +147 Ery +148 Ery +149 Ery +150 Ery +151 Ery +152 Ery +153 Ery +154 Ery +155 Ery +156 Ery +157 Ery +158 Ery +159 Ery +0 progenitor +1 progenitor +2 progenitor +3 progenitor +4 progenitor +5 progenitor +6 progenitor +7 progenitor +8 progenitor +9 progenitor +10 progenitor +11 progenitor +12 progenitor +13 progenitor +14 progenitor +15 progenitor +16 progenitor +17 progenitor +18 progenitor +19 progenitor +20 progenitor +21 progenitor +22 progenitor +23 progenitor +24 progenitor +25 progenitor +26 progenitor +27 progenitor +28 progenitor +29 progenitor +30 progenitor +31 progenitor +32 progenitor +33 progenitor +34 progenitor +35 progenitor +36 progenitor +37 progenitor +38 progenitor +39 progenitor +40 progenitor +41 progenitor +42 progenitor +43 progenitor +44 progenitor +45 progenitor +46 progenitor +47 progenitor +48 progenitor +49 progenitor +50 progenitor +51 progenitor +52 progenitor +53 progenitor +54 progenitor +55 progenitor +56 progenitor +57 progenitor +58 progenitor +59 progenitor +60 progenitor +61 progenitor +62 progenitor +63 progenitor +64 progenitor +65 progenitor +66 progenitor +67 progenitor +68 progenitor +69 progenitor +70 progenitor +71 progenitor +72 progenitor +73 progenitor +74 progenitor +75 progenitor +76 progenitor +77 progenitor +78 progenitor +79 progenitor +80 Mk +81 Mk +82 Mk +83 Mk +84 Mk +85 Mk +86 Mk +87 Mk +88 Mk +89 Mk +90 Mk +91 Mk +92 Mk +93 Mk +94 Mk +95 Mk +96 Mk +97 Mk +98 Mk +99 Mk +100 Mk +101 Mk +102 Mk +103 Mk +104 Mk +105 Mk +106 Mk +107 Mk +108 Mk +109 Mk +110 Mk +111 Mk +112 Mk +113 Mk +114 Mk +115 Mk +116 Mk +117 Mk +118 Mk +119 Mk +120 Mk +121 Mk +122 Mk +123 Mk +124 Mk +125 Mk +126 Mk +127 Mk +128 Mk +129 Mk +130 Mk +131 Mk +132 Mk +133 Mk +134 Mk +135 Mk +136 Mk +137 Mk +138 Mk +139 Mk +140 Mk +141 Mk +142 Mk +143 Mk +144 Mk +145 Mk +146 Mk +147 Mk +148 Mk +149 Mk +150 Mk +151 Mk +152 Mk +153 Mk +154 Mk +155 Mk +156 Mk +157 Mk +158 Mk +159 Mk +0 progenitor +1 progenitor +2 progenitor +3 progenitor +4 progenitor +5 progenitor +6 progenitor +7 progenitor +8 progenitor +9 progenitor +10 progenitor +11 progenitor +12 progenitor +13 progenitor +14 progenitor +15 progenitor +16 progenitor +17 progenitor +18 progenitor +19 progenitor +20 progenitor +21 progenitor +22 progenitor +23 progenitor +24 progenitor +25 progenitor +26 progenitor +27 progenitor +28 progenitor +29 progenitor +30 progenitor +31 progenitor +32 progenitor +33 progenitor +34 progenitor +35 progenitor +36 progenitor +37 progenitor +38 progenitor +39 progenitor +40 progenitor +41 progenitor +42 progenitor +43 progenitor +44 progenitor +45 progenitor +46 progenitor +47 progenitor +48 progenitor +49 progenitor +50 progenitor +51 progenitor +52 progenitor +53 progenitor +54 progenitor +55 progenitor +56 progenitor +57 progenitor +58 progenitor +59 progenitor +60 progenitor +61 progenitor +62 progenitor +63 progenitor +64 progenitor +65 progenitor +66 progenitor +67 progenitor +68 progenitor +69 progenitor +70 progenitor +71 progenitor +72 progenitor +73 progenitor +74 progenitor +75 progenitor +76 progenitor +77 progenitor +78 progenitor +79 progenitor +80 Neu +81 Neu +82 Neu +83 Neu +84 Neu +85 Neu +86 Neu +87 Neu +88 Neu +89 Neu +90 Neu +91 Neu +92 Neu +93 Neu +94 Neu +95 Neu +96 Neu +97 Neu +98 Neu +99 Neu +100 Neu +101 Neu +102 Neu +103 Neu +104 Neu +105 Neu +106 Neu +107 Neu +108 Neu +109 Neu +110 Neu +111 Neu +112 Neu +113 Neu +114 Neu +115 Neu +116 Neu +117 Neu +118 Neu +119 Neu +120 Neu +121 Neu +122 Neu +123 Neu +124 Neu +125 Neu +126 Neu +127 Neu +128 Neu +129 Neu +130 Neu +131 Neu +132 Neu +133 Neu +134 Neu +135 Neu +136 Neu +137 Neu +138 Neu +139 Neu +140 Neu +141 Neu +142 Neu +143 Neu +144 Neu +145 Neu +146 Neu +147 Neu +148 Neu +149 Neu +150 Neu +151 Neu +152 Neu +153 Neu +154 Neu +155 Neu +156 Neu +157 Neu +158 Neu +159 Neu |
b |
diff -r 0ef28c0963c8 -r 19592ec717ef 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 0ef28c0963c8 -r 19592ec717ef test-data/pp.pca.krumsiek11.h5ad |
b |
Binary file test-data/pp.pca.krumsiek11.h5ad has changed |
b |
diff -r 0ef28c0963c8 -r 19592ec717ef test-data/tl.diffmap.h5ad |
b |
Binary file test-data/tl.diffmap.h5ad has changed |
b |
diff -r 0ef28c0963c8 -r 19592ec717ef test-data/tl.draw_graph.h5ad |
b |
Binary file test-data/tl.draw_graph.h5ad has changed |
b |
diff -r 0ef28c0963c8 -r 19592ec717ef 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 0ef28c0963c8 -r 19592ec717ef test-data/tl.rank_genes_groups.krumsiek11.h5ad |
b |
Binary file test-data/tl.rank_genes_groups.krumsiek11.h5ad has changed |
b |
diff -r 0ef28c0963c8 -r 19592ec717ef test-data/tl.tsne.h5ad |
b |
Binary file test-data/tl.tsne.h5ad has changed |
b |
diff -r 0ef28c0963c8 -r 19592ec717ef test-data/tl.umap.h5ad |
b |
Binary file test-data/tl.umap.h5ad has changed |
b |
diff -r 0ef28c0963c8 -r 19592ec717ef test-data/var_add_annotation.tabular --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/var_add_annotation.tabular Wed Oct 16 06:26:45 2019 -0400 |
b |
@@ -0,0 +1,12 @@ +annot1 annot2 +1 a +2 b +3 c +4 d +5 e +6 f +7 g +8 h +9 i +10 j +11 k |