Mercurial > repos > iuc > scanpy_filter
changeset 11:2d02d9702d3a draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/scanpy/ commit aba2a85f5da6e1094f382d1f0d94c4b8f2544a7d
line wrap: on
line diff
--- a/filter.xml Wed Sep 22 21:11:51 2021 +0000 +++ b/filter.xml Wed Nov 08 14:44:39 2023 +0000 @@ -1,9 +1,9 @@ <tool id="scanpy_filter" name="Filter" version="@galaxy_version@" profile="@profile@"> <description>with scanpy</description> - <expand macro="bio_tools"/> <macros> <import>macros.xml</import> </macros> + <expand macro="bio_tools"/> <expand macro="requirements"/> <expand macro="version_command"/> <command detect_errors="exit_code"><![CDATA[ @@ -52,7 +52,6 @@ groupby='$method.groupby', #end if use_raw=$method.use_raw, - log=$method.log, key_added='$method.key_added', min_in_group_fraction=$method.min_in_group_fraction, max_out_group_fraction=$method.max_out_group_fraction, @@ -173,7 +172,6 @@ <expand macro="sanitize_query" /> </param> <expand macro="param_use_raw"/> - <expand macro="param_log"/> <param argument="key_added" type="text" value="rank_genes_groups_filtered" label="Key that will contain new values"> <expand macro="sanitize_query" /> </param> @@ -228,8 +226,8 @@ <expand macro="anndata_outputs"/> </outputs> <tests> - <test> - <!-- test 0 --> + <test expect_num_outputs="2"> + <!-- test 1 --> <param name="adata" value="krumsiek11.h5ad" /> <conditional name="method"> <param name="method" value="pp.filter_cells"/> @@ -252,8 +250,8 @@ </output> <output name="anndata_out" file="pp.filter_cells.krumsiek11-min_counts.h5ad" ftype="h5ad" compare="sim_size"/> </test> - <test> - <!-- test 1 --> + <test expect_num_outputs="2"> + <!-- test 2 --> <param name="adata" value="krumsiek11.h5ad" /> <conditional name="method"> <param name="method" value="pp.filter_cells"/> @@ -274,8 +272,8 @@ </output> <output name="anndata_out" file="pp.filter_cells.krumsiek11-max_genes.h5ad" ftype="h5ad" compare="sim_size"/> </test> - <test> - <!-- test 2 --> + <test expect_num_outputs="2"> + <!-- test 3 --> <param name="adata" value="krumsiek11.h5ad" /> <conditional name="method"> <param name="method" value="pp.filter_genes"/> @@ -295,36 +293,41 @@ </output> <output name="anndata_out" file="pp.filter_genes.krumsiek11-min_counts.h5ad" ftype="h5ad" compare="sim_size"/> </test> - <!-- <test> --> - <!-- <!-\- test 3 -\-> --> - <!-- <!-\- Input dataset appears to be missing rank_genes_groups key... -\-> --> - <!-- <param name="adata" value="tl.rank_genes_groups.krumsiek11.h5ad" /> --> - <!-- <conditional name="method"> --> - <!-- <param name="method" value="tl.filter_rank_genes_groups"/> --> - <!-- <param name="key" value="rank_genes_groups"/> --> - <!-- <param name="use_raw" value="False"/> --> - <!-- <param name="log" value="False"/> --> - <!-- <param name="key_added" value="rank_genes_groups_filtered"/> --> - <!-- <param name="min_in_group_fraction" value="0.25"/> --> - <!-- <param name="max_out_group_fraction" value="0.5"/> --> - <!-- <param name="min_fold_change" value="3"/> --> - <!-- </conditional> --> - <!-- <output name="hidden_output"> --> - <!-- <assert_contents> --> - <!-- <has_text_matching expression="tl.filter_rank_genes_groups"/> --> - <!-- <has_text_matching expression="key='rank_genes_groups'"/> --> - <!-- <has_text_matching expression="use_raw=False"/> --> - <!-- <has_text_matching expression="log=False"/> --> - <!-- <has_text_matching expression="key_added='rank_genes_groups_filtered'"/> --> - <!-- <has_text_matching expression="min_in_group_fraction=0.25"/> --> - <!-- <has_text_matching expression="max_out_group_fraction=0.5"/> --> - <!-- <has_text_matching expression="min_fold_change=3"/> --> - <!-- </assert_contents> --> - <!-- </output> --> - <!-- <output name="anndata_out" file="pp.filter_rank_genes_groups.h5ad" ftype="h5ad" compare="sim_size"/> --> - <!-- </test> --> - <test> - <!-- test 4 --> + + <!-- test 4 --> + <!-- Fails to write to anndata after tl.filter_rank_genes_groups + Issue has been reported here: https://github.com/scverse/anndata/issues/726 + The current fix is: del adata.uns['rank_genes_groups_filtered'] --> + <!--<test expect_num_outputs="2"> + <param name="adata" value="tl.rank_genes_groups.krumsiek11.h5ad" /> + <conditional name="method"> + <param name="method" value="tl.filter_rank_genes_groups"/> + <param name="key" value="rank_genes_groups"/> + <param name="use_raw" value="False"/> + <param name="key_added" value="rank_genes_groups_filtered"/> + <param name="min_in_group_fraction" value="0.25"/> + <param name="max_out_group_fraction" value="0.5"/> + <param name="min_fold_change" value="3"/> + </conditional> + <section name="advanced_common"> + <param name="show_log" value="true" /> + </section> + <output name="hidden_output"> + <assert_contents> + <has_text_matching expression="tl.filter_rank_genes_groups"/> + <has_text_matching expression="key='rank_genes_groups'"/> + <has_text_matching expression="use_raw=False"/> + <has_text_matching expression="log=False"/> + <has_text_matching expression="key_added='rank_genes_groups_filtered'"/> + <has_text_matching expression="min_in_group_fraction=0.25"/> + <has_text_matching expression="max_out_group_fraction=0.5"/> + <has_text_matching expression="min_fold_change=3"/> + </assert_contents> + </output> + <output name="anndata_out" file="pp.filter_rank_genes_groups.h5ad" ftype="h5ad" compare="sim_size"/> + </test>--> + <test expect_num_outputs="2"> + <!-- test 5 --> <param name="adata" value="blobs.h5ad"/> <conditional name="method"> <param name="method" value="pp.highly_variable_genes"/> @@ -353,8 +356,8 @@ </output> <output name="anndata_out" file="pp.highly_variable_genes.seurat.blobs.h5ad" ftype="h5ad" compare="sim_size" delta="100000" delta_frac="0.2"/> </test> - <test> - <!-- test 5 --> + <test expect_num_outputs="2"> + <!-- test 6 --> <param name="adata" value="krumsiek11.h5ad" /> <conditional name="method"> <param name="method" value="pp.highly_variable_genes"/> @@ -379,8 +382,8 @@ </output> <output name="anndata_out" file="pp.highly_variable_genes.krumsiek11-cell_ranger.h5ad" ftype="h5ad" compare="sim_size" delta="100000" delta_frac="0.9"/> </test> - <test> - <!-- test 6 --> + <test expect_num_outputs="2"> + <!-- test 7 --> <param name="adata" value="krumsiek11.h5ad" /> <conditional name="method"> <param name="method" value="pp.subsample"/> @@ -402,8 +405,8 @@ </output> <output name="anndata_out" file="pp.subsample.krumsiek11_fraction.h5ad" ftype="h5ad" compare="sim_size"/> </test> - <test> - <!-- test 7 --> + <test expect_num_outputs="2"> + <!-- test 8 --> <param name="adata" value="krumsiek11.h5ad" /> <conditional name="method"> <param name="method" value="pp.subsample"/> @@ -425,8 +428,8 @@ </output> <output name="anndata_out" file="pp.subsample.krumsiek11_n_obs.h5ad" ftype="h5ad" compare="sim_size"/> </test> - <test> - <!-- test 8 --> + <test expect_num_outputs="2"> + <!-- test 9 --> <param name="adata" value="random-randint.h5ad" /> <conditional name="method"> <param name="method" value="pp.downsample_counts"/> @@ -461,7 +464,7 @@ `max_counts`, `max_genes` per call. More details on the `scanpy documentation -<https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.pp.filter_cells.html>`__ +<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.pp.filter_cells.html>`__ Filter genes based on number of cells or counts (`pp.filter_genes`) @@ -475,14 +478,14 @@ `max_counts`, `max_cells` per call. More details on the `scanpy documentation -<https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.pp.filter_genes.html>`__ +<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.pp.filter_genes.html>`__ Filters out genes based on fold change and fraction of genes expressing the gene within and outside the groupby categories (`tl.filter_rank_genes_groups`) ========================================================================================================================================================== More details on the `scanpy documentation -<https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.tl.filter_rank_genes_groups.html>`__ +<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.tl.filter_rank_genes_groups.html>`__ Annotate highly variable genes (`pp.highly_variable_genes`) @@ -497,7 +500,7 @@ ====================================================================== More details on the `scanpy documentation -<https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.pp.subsample.html>`__ +<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.pp.subsample.html>`__ Downsample counts (`pp.downsample_counts`) ========================================== @@ -506,7 +509,7 @@ has been implemented by M. D. Luecken. More details on the `scanpy documentation -<https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.pp.downsample_counts.html>`__ +<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.pp.downsample_counts.html>`__ ]]></help>
--- a/macros.xml Wed Sep 22 21:11:51 2021 +0000 +++ b/macros.xml Wed Nov 08 14:44:39 2023 +0000 @@ -1,12 +1,16 @@ <macros> - <token name="@version@">1.7.1</token> - <token name="@profile@">19.01</token> + <token name="@version@">1.9.6</token> + <token name="@profile@">22.05</token> <token name="@galaxy_version@"><![CDATA[@version@+galaxy0]]></token> <xml name="requirements"> <requirements> <requirement type="package" version="@version@">scanpy</requirement> - <requirement type="package" version="2.0.17">loompy</requirement> - <requirement type="package" version="0.8.3">leidenalg</requirement> + <requirement type="package" version="3.0.6">loompy</requirement> + <requirement type="package" version="0.10.1">leidenalg</requirement> + <requirement type="package" version="0.8.1">louvain</requirement> + <requirement type="package" version="1.5.3">pandas</requirement> + <requirement type="package" version="3.7">matplotlib</requirement> + <requirement type="package" version="0.12.2">seaborn</requirement> <yield /> </requirements> </xml> @@ -15,9 +19,15 @@ <xref type="bio.tools">scanpy</xref> </xrefs> </xml> + <xml name="creators"> + <creator> + <organization name="European Galaxy Team" url="https://galaxyproject.org/eu/" /> + </creator> + </xml> <xml name="citations"> <citations> <citation type="doi">10.1186/s13059-017-1382-0</citation> + <citation type="doi">10.1093/gigascience/giaa102</citation> </citations> </xml> <xml name="version_command"> @@ -56,7 +66,7 @@ <param name="adata" type="data" format="h5ad" label="Annotated data matrix"/> </xml> <token name="@CMD_read_inputs@"><![CDATA[ -adata = sc.read('anndata.h5ad') +adata = sc.read_h5ad('anndata.h5ad') ]]> </token> <xml name="inputs_common_advanced"> @@ -66,12 +76,12 @@ </xml> <xml name="anndata_outputs"> <data name="anndata_out" format="h5ad" from_work_dir="anndata.h5ad" label="${tool.name} (${method.method}) on ${on_string}: Annotated data matrix"/> - <data name="hidden_output" format="txt" label="Log file" > + <data name="hidden_output" format="txt" label="Log file" > <filter>advanced_common['show_log']</filter> </data> </xml> <token name="@CMD_anndata_write_outputs@"><![CDATA[ -adata.write('anndata.h5ad') +adata.write_h5ad('anndata.h5ad') with open('anndata_info.txt','w', encoding='utf-8') as ainfo: print(adata, file=ainfo) ]]> @@ -875,7 +885,7 @@ </xml> <xml name="param_color_map"> <param argument="color_map" type="select" label="Color map to use for continous variables" help=""> - <option value="None">Default</option> + <option value="" >Default</option> <expand macro="matplotlib_pyplot_colormap"/> </param> </xml> @@ -979,7 +989,7 @@ @CMD_param_legend_fontsize@ legend_fontweight='$method.plot.legend_fontweight', @CMD_param_size@ - #if str($method.plot.color_map) != 'None' + #if str($method.plot.color_map) != '' color_map='$method.plot.color_map', #end if #if str($method.plot.palette) != ''
Binary file test-data/pl.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.png has changed
Binary file test-data/pl.dpt_groups_pseudotime.dpt.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.png has changed
Binary file test-data/pl.dpt_timeseries.dpt.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.png has changed
Binary file test-data/pl.highest_expr_genes.filter_genes_dispersion.krumsiek11-seurat.png has changed
Binary file test-data/pl.rank_genes_groups_stacked_violin.rank_genes_groups.krumsiek11.png has changed
Binary file test-data/pl.umap.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.png has changed
Binary file test-data/pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad has changed
Binary file test-data/pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad has changed
Binary file test-data/tl.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad has changed
Binary file test-data/tl.dpt.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad has changed
Binary file test-data/tl.draw_graph.pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad has changed
Binary file test-data/tl.embedding_density.umap.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad has changed
Binary file test-data/tl.leiden.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad has changed
Binary file test-data/tl.louvain.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad has changed