Mercurial > repos > iuc > snapatac2_preprocessing
comparison macros.xml @ 0:b2844c6efb72 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/snapatac2 commit df9c285dddde7d901823c608c8d7dab971224b5b
| author | iuc |
|---|---|
| date | Fri, 05 Jul 2024 11:05:36 +0000 |
| parents | |
| children | e3b85e48487b |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:b2844c6efb72 |
|---|---|
| 1 <macros> | |
| 2 <token name="@TOOL_VERSION@">2.5.3</token> | |
| 3 <token name="@VERSION_SUFFIX@">2</token> | |
| 4 <token name="@PROFILE@">23.0</token> | |
| 5 <xml name="requirements"> | |
| 6 <requirement type="package" version="@TOOL_VERSION@">snapatac2</requirement> | |
| 7 <requirement type="package" version="5.18.0">plotly</requirement> | |
| 8 <requirement type="package" version="0.2.1">python-kaleido</requirement> | |
| 9 <requirement type="package" version="0.19.19">polars</requirement> | |
| 10 <requirement type="package" version="14.0.1">pyarrow</requirement> | |
| 11 <requirement type="package" version="0.11.3">python-igraph</requirement> | |
| 12 <requirement type="package" version="0.8.33">hdbscan</requirement> | |
| 13 <requirement type="package" version="0.0.9">harmonypy</requirement> | |
| 14 <requirement type="package" version="1.7.4">scanorama</requirement> | |
| 15 <requirement type="package" version="3.0.1">macs3</requirement> | |
| 16 <requirement type="package" version="0.70.16">multiprocess</requirement> | |
| 17 <requirement type="package" version="0.10.2">leidenalg</requirement> | |
| 18 <yield /> | |
| 19 </xml> | |
| 20 | |
| 21 <token name="@PREP_ADATA@"><![CDATA[ | |
| 22 cp '$method.adata' 'anndata.h5ad' && | |
| 23 ]]> | |
| 24 </token> | |
| 25 | |
| 26 <token name="@CMD@"><![CDATA[ | |
| 27 cat '$script_file' > '$hidden_output' && | |
| 28 python '$script_file' >> '$hidden_output' && | |
| 29 touch 'anndata_info.txt' && | |
| 30 cat 'anndata_info.txt' @CMD_prettify_stdout@ | |
| 31 ]]> | |
| 32 </token> | |
| 33 | |
| 34 <token name="@CMD_prettify_stdout@"><![CDATA[ | sed -r '1 s|AnnData object with (.+) = (.*)\s*|\1: \2|g' | sed "s|'||g" | sed -r 's|^\s*(.*):\s(.*)|[\1]\n- \2|g' | sed 's|, |\n- |g' | |
| 35 ]]></token> | |
| 36 | |
| 37 <token name="@CMD_imports@"><![CDATA[ | |
| 38 import snapatac2 as sa | |
| 39 import os | |
| 40 ]]> | |
| 41 </token> | |
| 42 <xml name="sanitize_query" token_validinitial="string.printable"> | |
| 43 <sanitizer> | |
| 44 <valid initial="@VALIDINITIAL@"> | |
| 45 <remove value="'" /> | |
| 46 </valid> | |
| 47 </sanitizer> | |
| 48 </xml> | |
| 49 | |
| 50 <xml name="inputs_anndata"> | |
| 51 <param name="adata" type="data" format="h5ad" label="Annotated data matrix"/> | |
| 52 </xml> | |
| 53 | |
| 54 <token name="@CMD_read_inputs@"><![CDATA[ | |
| 55 | |
| 56 adata = sa.read('anndata.h5ad', backed = None) | |
| 57 ]]> | |
| 58 </token> | |
| 59 | |
| 60 <xml name="dimentions_plot"> | |
| 61 <param argument="width" type="integer" value="500" label="Width of the plot"/> | |
| 62 <param argument="height" type="integer" value="400" label="Height of the plot"/> | |
| 63 </xml> | |
| 64 | |
| 65 <xml name="param_groupby"> | |
| 66 <param argument="groupby" type="text" label="The key of the observation grouping to consider"> | |
| 67 <expand macro="sanitize_query" /> | |
| 68 </param> | |
| 69 </xml> | |
| 70 | |
| 71 <xml name="out_file"> | |
| 72 <param name="out_file" type="select" optional="true" label="Type of output plot"> | |
| 73 <option value="png" selected="true">PNG</option> | |
| 74 <option value="svg">SVG</option> | |
| 75 <option value="pdf">PDF</option> | |
| 76 </param> | |
| 77 </xml> | |
| 78 <token name="@CMD_anndata_write_outputs@"><![CDATA[ | |
| 79 adata.write('anndata.h5ad') | |
| 80 with open('anndata_info.txt','w', encoding='utf-8') as ainfo: | |
| 81 print(adata, file=ainfo) | |
| 82 ]]> | |
| 83 </token> | |
| 84 <xml name="inputs_common_advanced"> | |
| 85 <section name="advanced_common" title="Advanced Options" expanded="false"> | |
| 86 <param name="show_log" type="boolean" checked="false" label="Output Log?" /> | |
| 87 </section> | |
| 88 </xml> | |
| 89 <xml name="params_render_plot"> | |
| 90 <param argument="width" type="integer" value="600" label="Width of the plot"/> | |
| 91 <param argument="height" type="integer" value="400" label="Height of the plot"/> | |
| 92 <expand macro="out_file"/> | |
| 93 </xml> | |
| 94 <xml name="param_shift"> | |
| 95 <param argument="shift_left" type="integer" value="4" label="Insertion site correction for the left end" help="Note this has no effect on single-end reads"/> | |
| 96 <param argument="shift_right" type="integer" value="-5" label="Insertion site correction for the right end" help="Note this has no effect on single-end reads"/> | |
| 97 </xml> | |
| 98 <xml name="param_chunk_size" tokens="size"> | |
| 99 <param argument="chunk_size" type="integer" value="@SIZE@" label="chunk size"/> | |
| 100 </xml> | |
| 101 <xml name="min_max_frag_size"> | |
| 102 <param argument="min_frag_size" type="integer" optional="true" value="" label="Minimum fragment size to include"/> | |
| 103 <param argument="max_frag_size" type="integer" optional="true" value="" label="Maximum fragment size to include"/> | |
| 104 </xml> | |
| 105 <xml name="params_data_integration"> | |
| 106 <param argument="use_rep" type="text" value="X_spectral" label="The key for the matrix"/> | |
| 107 <param argument="use_dims" type="text" optional="true" value="" label="The dimensions used for computation"> | |
| 108 <expand macro="sanitize_query"/> | |
| 109 </param> | |
| 110 <param argument="groupby" type="text" optional="true" value="" label="The key of the observation grouping to consider"> | |
| 111 <expand macro="sanitize_query" /> | |
| 112 </param> | |
| 113 <param argument="key_added" type="text" optional="true" value="" label="If specified, add the result to adata.obsm with this key"/> | |
| 114 </xml> | |
| 115 <xml name="param_n_comps"> | |
| 116 <param argument="n_comps" type="integer" value="30" label="Number of dimensions to keep" help="The result is insensitive to this parameter when `weighted_by_sd` is set, as long as it is large enough, e.g. 30."/> | |
| 117 </xml> | |
| 118 <xml name="param_random_state"> | |
| 119 <param argument="random_state" type="integer" value="0" label="Seed of the random state generator"/> | |
| 120 </xml> | |
| 121 <xml name="param_key_added" tokens="key_added"> | |
| 122 <param argument="key_added" type="text" value="@KEY_ADDED@" label="`adata.obs` key under which t add cluster labels"/> | |
| 123 </xml> | |
| 124 <xml name="param_use_rep"> | |
| 125 <param argument="use_rep" type="text" value="X_spectral" label="Use the indicated representation in `.obsm`"/> | |
| 126 </xml> | |
| 127 <xml name="genome_fasta"> | |
| 128 <param argument="genome_fasta" type="text" label="A fasta file containing the genome sequences or a Genome object"/> | |
| 129 </xml> | |
| 130 <xml name="background"> | |
| 131 <param argument="background" type="text" optional="true" value="" label="A list of regions to be used as the background"> | |
| 132 <expand macro="sanitize_query"/> | |
| 133 </param> | |
| 134 </xml> | |
| 135 <xml name="mat"> | |
| 136 <param argument="peak_mat" type="data" format="h5ad" optional="true" label="AnnData or AnnDataSet object storing the cell by peak count matrix"/> | |
| 137 <param argument="gene_mat" type="data" format="h5ad" optional="true" label="AnnData or AnnDataSet object storing the cell by gene count matrix"/> | |
| 138 </xml> | |
| 139 <xml name="param_network"> | |
| 140 <param argument="network" type="text" label="network"/> | |
| 141 </xml> | |
| 142 <xml name="param_n_iterations"> | |
| 143 <param argument="n_iterations" type="integer" value="-1" label="How many iterations of the Leiden clustering algorithm to perform" | |
| 144 help="Positive values above 2 define the total number of iterations to perform, -1 has the algorithm run until it reaches its optimal clustering."/> | |
| 145 </xml> | |
| 146 | |
| 147 <xml name="citations"> | |
| 148 <citations> | |
| 149 <citation type="doi">10.1038/s41592-023-02139-9</citation> | |
| 150 </citations> | |
| 151 </xml> | |
| 152 <xml name="render_plot_test"> | |
| 153 <param name="width" value="650"/> | |
| 154 <param name="height" value="450"/> | |
| 155 </xml> | |
| 156 <xml name="render_plot_matching_text"> | |
| 157 <has_text_matching expression="width = 650"/> | |
| 158 <has_text_matching expression="height = 450"/> | |
| 159 </xml> | |
| 160 <xml name="param_counting_strategy"> | |
| 161 <param argument="counting_strategy" type="select" label="he strategy to compute feature counts"> | |
| 162 <option value="fragment">fragment</option> | |
| 163 <option value="insertion" selected="true">insertion</option> | |
| 164 <option value="paired-insertion">paired-insertion</option> | |
| 165 </param> | |
| 166 </xml> | |
| 167 | |
| 168 <token name="@CMD_params_data_integration@"><![CDATA[ | |
| 169 use_rep = '$method.use_rep', | |
| 170 #if $method.use_dims != '' | |
| 171 #set $dims = ([x.strip() for x in str($method.use_dims).split(',')]) | |
| 172 use_dims=$dims, | |
| 173 #end if | |
| 174 #if $method.groupby != '' | |
| 175 #set $groupby = ([x.strip() for x in str($method.groupby).split(',')]) | |
| 176 groupby=$groupby, | |
| 177 #end if | |
| 178 #if $method.key_added != '' | |
| 179 key_added = '$method.key_added', | |
| 180 #end if | |
| 181 ]]> | |
| 182 </token> | |
| 183 | |
| 184 <token name="@CMD_params_render_plot@"><![CDATA[ | |
| 185 width = $method.width, | |
| 186 height = $method.height, | |
| 187 out_file = 'plot.$method.out_file', | |
| 188 ]]> | |
| 189 </token> | |
| 190 </macros> |
