Skip to content

Commit

Permalink
linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mtekman committed Apr 18, 2024
1 parent 8f4b2e7 commit d539cfa
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions tools/anndata/anndata_ops.xml
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ for field_value in adata.obs["${split_on_obs.key}"].unique():
</configfiles>
<inputs>
<param name="input_obj_file" argument="input-object-file" type="data" format="h5,h5ad" label="Input object in hdf5 AnnData format"/>
<param name="output_format" argument="--output-format" type="select" label="Format of output object" help="Legacy 'h5' datatypes are useful for interacting with older tools. Choosing 'No packaged matrix output' is useful for cases where auxiliary files are generated (like in marker genes). Do not use when there are no other output files, as the tool will generate no output in Galaxy then.">
<param argument="--output-format" type="select" label="Format of output object" help="Legacy 'h5' datatypes are useful for interacting with older tools. Choosing 'No packaged matrix output' is useful for cases where auxiliary files are generated (like in marker genes). Do not use when there are no other output files, as the tool will generate no output in Galaxy then.">
<option value="anndata_h5ad" selected="true">
AnnData format
</option>
Expand All @@ -333,14 +333,14 @@ for field_value in adata.obs["${split_on_obs.key}"].unique():
<param name="layer" type="text" value="" label="Name of layer to swap to X" help="This layer name needs to exist within ad.layers or this will fail."/>
<param name="new_name_x" type="text" value="old_X" label="Name of the new slot for X within layers" help="Leave empty and the old X will be lost."/>
</when>
<when value="false"/>
<when value="false"></when>
</conditional>
<conditional name="add_cell_metadata">
<param name="default" type="boolean" checked="false" label="Merge additional cell metadata"/>
<when value="true">
<param name="file" type="data" label="Cell metadata with headers" help="A tabular file with headers, where the first column contains cell barcodes. Will be merged via a left join, so not all cells in the obs need to be in the metadata. Currently duplicated column headers will be ignored and the originals in the AnnData will be kept." format="tsv,tabular"/>
</when>
<when value="false"/>
<when value="false"></when>
</conditional>
<param name="copy_adata_to_raw" type="boolean" label="Copy AnnData to .raw" help="If activated, it will do 'adata.raw = adata'" checked="false"/>
<repeat name="modifications" title="Change field names in AnnData observations" min="0">
Expand Down Expand Up @@ -375,7 +375,7 @@ for field_value in adata.obs["${split_on_obs.key}"].unique():
<when value="true">
<param name="r_source" type="data" label="AnnData object .X with to copy to .raw" help="Copies adata (subset to matching obs) from this AnnData object into the main input as .raw. Make sure to use an AnnData object containing all .obs in the main input." format="h5,h5ad"/>
</when>
<when value="false"/>
<when value="false"></when>
</conditional>
<conditional name="copy_x">
<param name="default" type="boolean" checked="false" label="Copy .X to layers"/>
Expand All @@ -385,7 +385,7 @@ for field_value in adata.obs["${split_on_obs.key}"].unique():
<param name="dest" type="text" label="Destination layer"/>
</repeat>
</when>
<when value="false"/>
<when value="false"></when>
</conditional>
<conditional name="copy_l">
<param name="default" type="boolean" checked="false" label="Copy layers"/>
Expand All @@ -395,7 +395,7 @@ for field_value in adata.obs["${split_on_obs.key}"].unique():
</repeat>
<param name="layer_sources" type="data" label="AnnData objects with layers to copy" help="Extracts layers from these AnnData objects and merges them into the main input. Make sure to use AnnData objects that are compatible in terms of genes, cells and expression data." format="h5,h5ad" multiple="true"/>
</when>
<when value="false"/>
<when value="false"></when>
</conditional>
<conditional name="copy_o">
<param name="default" type="boolean" checked="false" label="Copy observations (such as clusters)"/>
Expand All @@ -405,7 +405,7 @@ for field_value in adata.obs["${split_on_obs.key}"].unique():
</repeat>
<param name="obs_sources" type="data" label="AnnData objects with obs to copy" help="Extracts obs (such as clusters) from these AnnData objects and merges them into the main input. Make sure to use AnnData objects that are compatible in terms of genes, cells and expression data." format="h5,h5ad" multiple="true"/>
</when>
<when value="false"/>
<when value="false"></when>
</conditional>
<conditional name="copy_e">
<param name="default" type="boolean" checked="false" label="Copy embeddings (such as UMAP, tSNE)"/>
Expand All @@ -415,7 +415,7 @@ for field_value in adata.obs["${split_on_obs.key}"].unique():
</repeat>
<param name="embedding_sources" type="data" label="AnnData objects with embeddings to copy" help="Extracts embeddings (tSNE, UMAP) from these AnnData objects and merges them into the main input. Make sure to use AnnData objects that are compatible in terms of genes, cells and expression data." format="h5,h5ad" multiple="true"/>
</when>
<when value="false"/>
<when value="false"></when>
</conditional>
<conditional name="copy_u">
<param name="default" type="boolean" checked="false" label="Copy uns"/>
Expand All @@ -425,6 +425,7 @@ for field_value in adata.obs["${split_on_obs.key}"].unique():
</repeat>
<param name="uns_sources" type="data" label="AnnData objects with uns to copy" help="Extracts uns (such as ranked_genes_groups) from these AnnData objects and merges them into the main input. Make sure to use AnnData objects that are compatible in terms of genes, cells and expression data." format="h5,h5ad" multiple="true"/>
</when>
<when value="false"></when>
</conditional>
<param name="sanitize_varm" type="boolean" checked="false" label="Sanitise any null raw.varm objects if any" help="This might be relevant for interfacing with newer versions of AnnData, that might complain if .raw includes a varm null object."/>
<conditional name="split_on_obs">
Expand All @@ -433,7 +434,7 @@ for field_value in adata.obs["${split_on_obs.key}"].unique():
<param name="key" type="text" label="Obs key to split on" help="The obs key to split on. For example, if you want to split on cluster annotation, you can use the key 'louvain'."/>
<param name="output_main" type="boolean" checked="true" label="Output main AnnData object" help="If checked, the main AnnData object will be outputted as well."/>
</when>
<when value="false"/>
<when value="false"></when>
</conditional>
</inputs>
<outputs>
Expand All @@ -455,15 +456,15 @@ for field_value in adata.obs["${split_on_obs.key}"].unique():
</collection>
</outputs>
<tests>
<test>
<test expect_num_outputs="1">
<param name="input_obj_file" value="find_cluster.h5"/>
<output name="output_h5ad" ftype="h5ad">
<assert_contents>
<has_h5_keys keys="var/gene_symbols"/>
</assert_contents>
</output>
</test>
<test>
<test expect_num_outputs="1">
<param name="input_obj_file" value="mnn.h5"/>
<conditional name="swap_layer_to_x">
<param name="default" value="true"/>
Expand All @@ -476,7 +477,7 @@ for field_value in adata.obs["${split_on_obs.key}"].unique():
</assert_contents>
</output>
</test>
<test>
<test expect_num_outputs="1">
<param name="input_obj_file" value="anndata_ops.h5"/>
<param name="from_var" value="gene_symbols"/>
<param name="to_var" value="hello_all"/>
Expand All @@ -486,7 +487,7 @@ for field_value in adata.obs["${split_on_obs.key}"].unique():
</assert_contents>
</output>
</test>
<test>
<test expect_num_outputs="1">
<param name="input_obj_file" value="anndata_ops.h5"/>
<conditional name="add_cell_metadata">
<param name="default" value="true"/>
Expand All @@ -498,7 +499,7 @@ for field_value in adata.obs["${split_on_obs.key}"].unique():
</assert_contents>
</output>
</test>
<test>
<test expect_num_outputs="1">
<param name="input_obj_file" value="anndata_ops.h5"/>
<repeat name="var_modifications">
<param name="from_var" value="gene_symbols"/>
Expand All @@ -511,7 +512,7 @@ for field_value in adata.obs["${split_on_obs.key}"].unique():
</assert_contents>
</output>
</test>
<test>
<test expect_num_outputs="1">
<param name="input_obj_file" value="anndata_ops.h5"/>
<param name="field_unique" value="gene_symbols"/>
<output name="output_h5ad" ftype="h5ad">
Expand All @@ -520,7 +521,7 @@ for field_value in adata.obs["${split_on_obs.key}"].unique():
</assert_contents>
</output>
</test>
<test>
<test expect_num_outputs="1">
<param name="input_obj_file" value="find_cluster.h5"/>
<conditional name="copy_r">
<param name="default" value="true"/>
Expand All @@ -532,7 +533,7 @@ for field_value in adata.obs["${split_on_obs.key}"].unique():
</assert_contents>
</output>
</test>
<test>
<test expect_num_outputs="1">
<param name="input_obj_file" value="normalise_data.h5"/>
<conditional name="copy_x">
<param name="default" value="true"/>
Expand All @@ -547,7 +548,7 @@ for field_value in adata.obs["${split_on_obs.key}"].unique():
</assert_contents>
</output>
</test>
<test>
<test expect_num_outputs="1">
<param name="input_obj_file" value="find_cluster.h5"/>
<conditional name="copy_l">
<param name="default" value="true"/>
Expand All @@ -562,7 +563,7 @@ for field_value in adata.obs["${split_on_obs.key}"].unique():
</assert_contents>
</output>
</test>
<test>
<test expect_num_outputs="2">
<param name="input_obj_file" value="find_cluster.h5"/>
<conditional name="split_on_obs">
<param name="default" value="true"/>
Expand All @@ -584,7 +585,7 @@ for field_value in adata.obs["${split_on_obs.key}"].unique():
</test>
</tests>
<help>
=============================
=============================
Operations on AnnData objects
=============================

Expand Down

0 comments on commit d539cfa

Please sign in to comment.