comparison macros.xml @ 0:af821711b356 draft

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