Mercurial > repos > iuc > snapatac2_plotting
comparison plotting.xml @ 6:1ac4a5f05f33 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/snapatac2 commit e0f59fae19e57f54ae0c351a16dd1805d12aba1d
| author | iuc |
|---|---|
| date | Tue, 25 Nov 2025 16:41:12 +0000 |
| parents | 05bd4db20227 |
| children |
comparison
equal
deleted
inserted
replaced
| 5:05bd4db20227 | 6:1ac4a5f05f33 |
|---|---|
| 5 <expand macro="xrefs"/> | 5 <expand macro="xrefs"/> |
| 6 <requirements> | 6 <requirements> |
| 7 <expand macro="requirements"/> | 7 <expand macro="requirements"/> |
| 8 </requirements> | 8 </requirements> |
| 9 <command detect_errors="exit_code"><![CDATA[ | 9 <command detect_errors="exit_code"><![CDATA[ |
| 10 @PREP_ADATA@ | 10 @CMD_PREP_ADATA@ |
| 11 @CMD@ | 11 @CMD@ |
| 12 ]]></command> | 12 ]]></command> |
| 13 <configfiles> | 13 <configfiles> |
| 14 <configfile name="script_file"><![CDATA[ | 14 <configfile name="script_file"><![CDATA[ |
| 15 @CMD_imports@ | 15 @CONF_IMPORTS@ |
| 16 @CMD_read_inputs@ | 16 @CONF_READ_INPUTS@ |
| 17 | 17 |
| 18 #if $method.method == 'pl.frag_size_distr' | 18 #if $method.method == 'pl.frag_size_distr' |
| 19 #if $method.log_scale | 19 #if $method.log_scale |
| 20 fig = sa.pl.frag_size_distr(adata, show=False) | 20 fig = snap.pl.frag_size_distr(adata, show=False) |
| 21 fig.update_yaxes(type="log") | 21 fig.update_yaxes(type="log") |
| 22 sa.pl.render_plot(fig, @CMD_params_render_plot@) | 22 snap.pl.render_plot(fig, @CONF_PARAMS_RENDER_PLOT@) |
| 23 #else | 23 #else |
| 24 sa.pl.frag_size_distr(adata, @CMD_params_render_plot@) | 24 snap.pl.frag_size_distr(adata, @CONF_PARAMS_RENDER_PLOT@) |
| 25 #end if | 25 #end if |
| 26 | |
| 26 #else if $method.method == 'pl.tsse' | 27 #else if $method.method == 'pl.tsse' |
| 27 sa.pl.tsse( | 28 snap.pl.tsse( |
| 28 adata, | 29 adata, |
| 29 min_fragment = $method.min_fragment, | 30 min_fragment = $method.min_fragment, |
| 30 @CMD_params_render_plot@ | 31 @CONF_PARAMS_RENDER_PLOT@ |
| 31 ) | 32 ) |
| 32 #else if $method.method == 'pl.umap' | 33 #else if $method.method == 'pl.umap' |
| 33 sa.pl.umap( | 34 snap.pl.umap( |
| 34 adata, | 35 adata, |
| 35 color = '$method.color', | 36 color = '$method.color', |
| 36 use_rep = '$method.use_rep', | 37 use_rep = '$method.use_rep', |
| 37 #if $method.marker_size | 38 #if $method.marker_size |
| 38 marker_size = $method.marker_size, | 39 marker_size = $method.marker_size, |
| 39 #end if | 40 #end if |
| 40 marker_opacity = $method.marker_opacity, | 41 marker_opacity = $method.marker_opacity, |
| 41 #if $method.sample_size | 42 #if $method.sample_size |
| 42 sample_size = $method.sample_size, | 43 sample_size = $method.sample_size, |
| 43 #end if | 44 #end if |
| 44 @CMD_params_render_plot@ | 45 @CONF_PARAMS_RENDER_PLOT@ |
| 45 ) | 46 ) |
| 46 #else if $method.method == 'pl.regions' | 47 |
| 47 sa.pl.regions( | 48 #else if $method.method == 'pl.spectral_eigenvalues' |
| 49 snap.pl.spectral_eigenvalues( | |
| 48 adata, | 50 adata, |
| 49 groupby = '$method.groupby', | 51 @CONF_PARAMS_RENDER_PLOT@ |
| 50 peaks = '$method.peaks', | |
| 51 @CMD_params_render_plot@ | |
| 52 ) | |
| 53 #else if $method.method == 'pl.spectral_eigenvalues' | |
| 54 sa.pl.spectral_eigenvalues( | |
| 55 adata, | |
| 56 @CMD_params_render_plot@ | |
| 57 ) | 52 ) |
| 58 #end if | 53 #end if |
| 59 ]]></configfile> | 54 ]]></configfile> |
| 60 </configfiles> | 55 </configfiles> |
| 61 <inputs> | 56 <inputs> |
| 65 <option value="pl.tsse">Plot the TSS enrichment vs. number of fragments density figure, using 'pl.tsse'</option> | 60 <option value="pl.tsse">Plot the TSS enrichment vs. number of fragments density figure, using 'pl.tsse'</option> |
| 66 <option value="pl.umap">Plot the UMAP embedding, using 'pl.umap'</option> | 61 <option value="pl.umap">Plot the UMAP embedding, using 'pl.umap'</option> |
| 67 <option value="pl.spectral_eigenvalues">Plot the eigenvalues of spectral embedding, using 'pl.spectral_eigenvalues'</option> | 62 <option value="pl.spectral_eigenvalues">Plot the eigenvalues of spectral embedding, using 'pl.spectral_eigenvalues'</option> |
| 68 </param> | 63 </param> |
| 69 <when value="pl.frag_size_distr"> | 64 <when value="pl.frag_size_distr"> |
| 70 <expand macro="inputs_anndata"/> | 65 <expand macro="param_inputs_anndata"/> |
| 66 <param argument="use_rep" type="text" value="frag_size_distr" label="Use the indicated representation in .obsm"/> | |
| 71 <param name="log_scale" type="boolean" checked="False" label="Change the y-axis (fragment counts) to log scale"/> | 67 <param name="log_scale" type="boolean" checked="False" label="Change the y-axis (fragment counts) to log scale"/> |
| 72 <expand macro="params_render_plot"/> | 68 <expand macro="param_render_plot"/> |
| 73 </when> | 69 </when> |
| 74 <when value="pl.tsse"> | 70 <when value="pl.tsse"> |
| 75 <expand macro="inputs_anndata"/> | 71 <expand macro="param_inputs_anndata"/> |
| 76 <param argument="min_fragment" type="integer" value="500" label="Minimum number of unique fragments"/> | 72 <param argument="min_fragment" type="integer" value="500" label="Minimum number of unique fragments"/> |
| 77 <expand macro="params_render_plot"/> | 73 <expand macro="param_render_plot"/> |
| 78 </when> | 74 </when> |
| 79 <when value="pl.umap"> | 75 <when value="pl.umap"> |
| 80 <expand macro="inputs_anndata"/> | 76 <expand macro="param_inputs_anndata"/> |
| 81 <param argument="color" type="text" value="" optional="true" label="Color"/> | 77 <param argument="color" type="text" value="" optional="true" label="Color" help="Color to use for the points. retrieved from .obs"/> |
| 82 <param argument="use_rep" type="text" value="X_umap" label="Use the indicated representation in .obsm"/> | 78 <param argument="use_rep" type="text" value="X_umap" label="Use the indicated representation in .obsm"/> |
| 83 <param argument="marker_size" type="float" value="" optional="true" label="Size of the dots"/> | 79 <param argument="marker_size" type="float" value="" optional="true" label="Size of the dots"/> |
| 84 <param argument="marker_opacity" type="float" value="1" label="Opactiy of the dots"/> | 80 <param argument="marker_opacity" type="float" value="1" label="Opacity of the dots"/> |
| 85 <param argument="sample_size" type="integer" value="" optional="true" label="Number of cells to use"/> | 81 <param argument="sample_size" type="integer" value="" optional="true" label="Number of cells to use"/> |
| 86 <expand macro="params_render_plot"/> | 82 <expand macro="param_render_plot"/> |
| 87 </when> | 83 </when> |
| 88 <when value="pl.spectral_eigenvalues"> | 84 <when value="pl.spectral_eigenvalues"> |
| 89 <expand macro="inputs_anndata"/> | 85 <expand macro="param_inputs_anndata"/> |
| 90 <expand macro="params_render_plot"/> | 86 <expand macro="param_render_plot"/> |
| 91 </when> | 87 </when> |
| 92 </conditional> | 88 </conditional> |
| 93 <expand macro="inputs_common_advanced"/> | 89 <expand macro="param_common_advanced"/> |
| 94 </inputs> | 90 </inputs> |
| 95 <outputs> | 91 <outputs> |
| 96 <data name="out_png" format="png" from_work_dir="plot.png" label="PNG plot from ${tool.name} (${method.method}) on ${on_string}"> | 92 <data name="out_png" format="png" from_work_dir="plot.png" label="PNG plot from ${tool.name} (${method.method}) on ${on_string}"> |
| 97 <filter>method['out_file'] == 'png'</filter> | 93 <filter>method['out_file'] == 'png'</filter> |
| 98 </data> | 94 </data> |
| 100 <filter>method['out_file'] == 'pdf'</filter> | 96 <filter>method['out_file'] == 'pdf'</filter> |
| 101 </data> | 97 </data> |
| 102 <data name="out_svg" format="svg" from_work_dir="plot.svg" label="SVG plot from ${tool.name} (${method.method}) on ${on_string}"> | 98 <data name="out_svg" format="svg" from_work_dir="plot.svg" label="SVG plot from ${tool.name} (${method.method}) on ${on_string}"> |
| 103 <filter>method['out_file'] == 'svg'</filter> | 99 <filter>method['out_file'] == 'svg'</filter> |
| 104 </data> | 100 </data> |
| 101 <data name="out_html" format="html" from_work_dir="plot.html" label="HTML plot from ${tool.name} (${method.method}) on ${on_string}"> | |
| 102 <filter>method['out_file'] == 'html'</filter> | |
| 103 </data> | |
| 105 <data name="hidden_output" format="txt" label="Log file" hidden="true"> | 104 <data name="hidden_output" format="txt" label="Log file" hidden="true"> |
| 106 <filter>advanced_common['show_log']</filter> | 105 <filter>advanced_common['show_log']</filter> |
| 107 </data> | 106 </data> |
| 108 </outputs> | 107 </outputs> |
| 109 <tests> | 108 <tests> |
| 110 <test expect_num_outputs="2"> | 109 <test expect_num_outputs="2"> |
| 111 <!-- pl.frag_size_distr --> | 110 <!-- pl.frag_size_distr --> |
| 112 <conditional name="method"> | 111 <conditional name="method"> |
| 113 <param name="method" value="pl.frag_size_distr"/> | 112 <param name="method" value="pl.frag_size_distr"/> |
| 114 <param name="adata" location="https://zenodo.org/records/11260316/files/pp.import_data.pbmc_500_chr21.h5ad"/> | 113 <param name="adata" location="https://zenodo.org/records/17512085/files/pp.import_data.pbmc_500_chr21.h5ad"/> |
| 115 <param name="log_scale" value="True"/> | 114 <param name="log_scale" value="True"/> |
| 116 <param name="out_file" value="pdf"/> | 115 <param name="out_file" value="pdf"/> |
| 117 <expand macro="render_plot_test"/> | 116 <expand macro="test_param_render_plot"/> |
| 118 </conditional> | 117 </conditional> |
| 119 <section name="advanced_common"> | 118 <section name="advanced_common"> |
| 120 <param name="show_log" value="true"/> | 119 <param name="show_log" value="true"/> |
| 121 </section> | 120 </section> |
| 122 <output name="out_pdf" location="https://zenodo.org/records/11260316/files/pl.frag_size_distr.pdf" ftype="pdf" compare="sim_size" delta_frac="0.1"/> | 121 <output name="out_pdf" location="https://zenodo.org/records/17512085/files/pl.frag_size_distr.pdf" ftype="pdf" compare="sim_size" delta_frac="0.1"/> |
| 123 <output name="hidden_output"> | 122 <output name="hidden_output"> |
| 124 <assert_contents> | 123 <assert_contents> |
| 125 <has_text_matching expression="sa.pl.frag_size_distr"/> | 124 <has_text_matching expression="snap.pl.frag_size_distr"/> |
| 126 <has_text_matching expression="fig.update_yaxes"/> | 125 <has_text_matching expression="fig.update_yaxes"/> |
| 127 <expand macro="render_plot_matching_text"/> | 126 <expand macro="test_render_plot_matching_text"/> |
| 128 </assert_contents> | 127 </assert_contents> |
| 129 </output> | 128 </output> |
| 130 </test> | 129 </test> |
| 131 <test expect_num_outputs="2"> | 130 <test expect_num_outputs="2"> |
| 132 <!-- pl.tsse --> | 131 <!-- pl.tsse --> |
| 133 <conditional name="method"> | 132 <conditional name="method"> |
| 134 <param name="method" value="pl.tsse"/> | 133 <param name="method" value="pl.tsse"/> |
| 135 <param name="adata" location="https://zenodo.org/records/11260316/files/metrics.tsse.pbmc_500_chr21.h5ad"/> | 134 <param name="adata" location="https://zenodo.org/records/17512085/files/metrics.tsse.pbmc_500_chr21.h5ad"/> |
| 136 <param name="min_fragment" value="500"/> | 135 <param name="min_fragment" value="500"/> |
| 137 <param name="out_file" value="png"/> | 136 <param name="out_file" value="png"/> |
| 138 <expand macro="render_plot_test"/> | 137 <expand macro="test_param_render_plot"/> |
| 139 </conditional> | 138 </conditional> |
| 140 <section name="advanced_common"> | 139 <section name="advanced_common"> |
| 141 <param name="show_log" value="true"/> | 140 <param name="show_log" value="true"/> |
| 142 </section> | 141 </section> |
| 143 <output name="hidden_output"> | 142 <output name="hidden_output"> |
| 144 <assert_contents> | 143 <assert_contents> |
| 145 <has_text_matching expression="sa.pl.tsse"/> | 144 <has_text_matching expression="snap.pl.tsse"/> |
| 146 <has_text_matching expression="min_fragment = 500"/> | 145 <has_text_matching expression="min_fragment = 500"/> |
| 147 <expand macro="render_plot_matching_text"/> | 146 <expand macro="test_render_plot_matching_text"/> |
| 148 </assert_contents> | 147 </assert_contents> |
| 149 </output> | 148 </output> |
| 150 <output name="out_png" location="https://zenodo.org/records/11260316/files/pl.tsse.png" ftype="png" compare="sim_size" delta_frac="0.1"/> | 149 <output name="out_png"> |
| 150 <assert_contents> | |
| 151 <has_image_center_of_mass center_of_mass="325,223" eps="30"/> | |
| 152 <has_image_channels channels="4"/> | |
| 153 <has_image_height height="450"/> | |
| 154 <has_image_width width="650"/> | |
| 155 </assert_contents> | |
| 156 </output> | |
| 151 </test> | 157 </test> |
| 152 <test expect_num_outputs="2"> | 158 <test expect_num_outputs="2"> |
| 153 <!-- pl.umap --> | 159 <!-- pl.umap --> |
| 154 <conditional name="method"> | 160 <conditional name="method"> |
| 155 <param name="method" value="pl.umap"/> | 161 <param name="method" value="pl.umap"/> |
| 156 <param name="adata" ftype="h5ad" location="https://zenodo.org/records/11260316/files/tl.leiden.modularity.pbmc_500_chr21.h5ad"/> | 162 <param name="adata" ftype="h5ad" location="https://zenodo.org/records/17512085/files/tl.leiden.modularity.pbmc_500_chr21.h5ad"/> |
| 157 <param name="color" value="leiden"/> | 163 <param name="color" value="leiden"/> |
| 158 <param name="use_rep" value="X_umap"/> | 164 <param name="use_rep" value="X_umap"/> |
| 159 <param name="marker_size" value="1"/> | 165 <param name="marker_size" value="1"/> |
| 160 <param name="marker_opacity" value="0.8"/> | 166 <param name="marker_opacity" value="0.8"/> |
| 161 <param name="sample_size" value="100"/> | 167 <param name="sample_size" value="100"/> |
| 162 <expand macro="render_plot_test"/> | 168 <expand macro="test_param_render_plot"/> |
| 163 <param name="out_file" value="svg"/> | 169 <param name="out_file" value="svg"/> |
| 164 </conditional> | 170 </conditional> |
| 165 <section name="advanced_common"> | 171 <section name="advanced_common"> |
| 166 <param name="show_log" value="true"/> | 172 <param name="show_log" value="true"/> |
| 167 </section> | 173 </section> |
| 168 <output name="hidden_output"> | 174 <output name="hidden_output"> |
| 169 <assert_contents> | 175 <assert_contents> |
| 170 <has_text_matching expression="sa.pl.umap"/> | 176 <has_text_matching expression="snap.pl.umap"/> |
| 171 <has_text_matching expression="color = 'leiden'"/> | 177 <has_text_matching expression="color = 'leiden'"/> |
| 172 <has_text_matching expression="use_rep = 'X_umap'"/> | 178 <has_text_matching expression="use_rep = 'X_umap'"/> |
| 173 <has_text_matching expression="marker_size = 1"/> | 179 <has_text_matching expression="marker_size = 1"/> |
| 174 <has_text_matching expression="marker_opacity = 0.8"/> | 180 <has_text_matching expression="marker_opacity = 0.8"/> |
| 175 <has_text_matching expression="sample_size = 100"/> | 181 <has_text_matching expression="sample_size = 100"/> |
| 176 <expand macro="render_plot_matching_text"/> | 182 <expand macro="test_render_plot_matching_text"/> |
| 177 </assert_contents> | 183 </assert_contents> |
| 178 </output> | 184 </output> |
| 179 <output name="out_svg" location="https://zenodo.org/records/11260316/files/pl.umap.svg" ftype="svg" compare="sim_size" delta_frac="0.1"/> | 185 <output name="out_svg" location="https://zenodo.org/records/17512085/files/pl.umap.svg" ftype="svg" compare="sim_size" delta_frac="0.1"/> |
| 180 </test> | 186 </test> |
| 181 <test expect_num_outputs="2"> | 187 <test expect_num_outputs="2"> |
| 182 <!-- pl.spectral_eigenvalues --> | 188 <!-- pl.spectral_eigenvalues --> |
| 183 <conditional name="method"> | 189 <conditional name="method"> |
| 184 <param name="method" value="pl.spectral_eigenvalues"/> | 190 <param name="method" value="pl.spectral_eigenvalues"/> |
| 185 <param name="adata" ftype="h5ad" location="https://zenodo.org/records/11260316/files/tl.spectral.pbmc_500_chr21.h5ad"/> | 191 <param name="adata" ftype="h5ad" location="https://zenodo.org/records/17512085/files/tl.spectral.pbmc_500_chr21.h5ad"/> |
| 186 <expand macro="render_plot_test"/> | 192 <expand macro="test_param_render_plot"/> |
| 187 <param name="out_file" value="pdf"/> | 193 <param name="out_file" value="pdf"/> |
| 188 </conditional> | 194 </conditional> |
| 189 <section name="advanced_common"> | 195 <section name="advanced_common"> |
| 190 <param name="show_log" value="true"/> | 196 <param name="show_log" value="true"/> |
| 191 </section> | 197 </section> |
| 192 <output name="hidden_output"> | 198 <output name="hidden_output"> |
| 193 <assert_contents> | 199 <assert_contents> |
| 194 <has_text_matching expression="sa.pl.spectral_eigenvalues"/> | 200 <has_text_matching expression="snap.pl.spectral_eigenvalues"/> |
| 195 <expand macro="render_plot_matching_text"/> | 201 <expand macro="test_render_plot_matching_text"/> |
| 196 </assert_contents> | 202 </assert_contents> |
| 197 </output> | 203 </output> |
| 198 <output name="out_pdf" location="https://zenodo.org/records/11260316/files/pl.spectral_eigenvalues.pdf" ftype="pdf" compare="sim_size" delta_frac="0.1"/> | 204 <output name="out_pdf" location="https://zenodo.org/records/17512085/files/pl.spectral_eigenvalues.pdf" ftype="pdf" compare="sim_size" delta_frac="0.1"/> |
| 199 </test> | 205 </test> |
| 200 </tests> | 206 </tests> |
| 201 <help><![CDATA[ | 207 <help><![CDATA[ |
| 202 Plot fragment size distribution, using `pl.frag_size_distr` | 208 Plot fragment size distribution, using `pl.frag_size_distr` |
| 203 =========================================================== | 209 =========================================================== |
| 210 =============================================================================== | 216 =============================================================================== |
| 211 | 217 |
| 212 Plot the TSS enrichment vs. number of fragments density figure. | 218 Plot the TSS enrichment vs. number of fragments density figure. |
| 213 | 219 |
| 214 More details on the `SnapATAC2 documentation | 220 More details on the `SnapATAC2 documentation |
| 215 <https://kzhang.org/SnapATAC2/api/_autosummary/snapatac2.pl.tsse.html>`__ | 221 <https://scverse.org/SnapATAC2/api/_autosummary/snapatac2.pl.tsse.html>`__ |
| 216 | 222 |
| 217 Plot the UMAP embedding, using `pl.umap` | 223 Plot the UMAP embedding, using `pl.umap` |
| 218 ======================================== | 224 ======================================== |
| 219 | 225 |
| 220 Plot the UMAP embedding. | 226 Plot the UMAP embedding. |
| 221 | 227 |
| 222 More details on the `SnapATAC2 documentation | 228 More details on the `SnapATAC2 documentation |
| 223 <https://kzhang.org/SnapATAC2/api/_autosummary/snapatac2.pl.umap.html>`__ | 229 <https://scverse.org/SnapATAC2/api/_autosummary/snapatac2.pl.umap.html>`__ |
| 224 | 230 |
| 225 Plot the eigenvalues of spectral embedding, using `pl.spectral_eigenvalues` | 231 Plot the eigenvalues of spectral embedding, using `pl.spectral_eigenvalues` |
| 226 =========================================================================== | 232 =========================================================================== |
| 227 | 233 |
| 228 Plot the eigenvalues of spectral embedding. | 234 Plot the eigenvalues of spectral embedding. |
| 229 | 235 |
| 230 More details on the `SnapATAC2 documentation | 236 More details on the `SnapATAC2 documentation |
| 231 <https://kzhang.org/SnapATAC2/api/_autosummary/snapatac2.pl.spectral_eigenvalues.html>`__ | 237 <https://scverse.org/SnapATAC2/api/_autosummary/snapatac2.pl.spectral_eigenvalues.html>`__ |
| 232 ]]></help> | 238 ]]></help> |
| 233 <expand macro="citations"/> | 239 <expand macro="citations"/> |
| 234 </tool> | 240 </tool> |
