changeset 1:31a21ba2c5ea draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/episcanpy/ commit bb79cb8cad3bc1433bff7caf9d7b45e7993dd470
author iuc
date Sat, 22 Apr 2023 12:14:00 +0000
parents 1bf008d6d54e
children
files build_matrix.xml macros.xml test-data/chrY.h5ad test-data/chrY_norm_peaks.h5ad test-data/chrY_with_transcript_annotation.h5ad
diffstat 5 files changed, 32 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/build_matrix.xml	Tue Apr 18 13:19:11 2023 +0000
+++ b/build_matrix.xml	Sat Apr 22 12:14:00 2023 +0000
@@ -18,7 +18,9 @@
         <configfile name="script_file"><![CDATA[
 @CMD_imports@
 peaks = esc.ct.load_peaks('$peaks_file')
-esc.ct.norm_peaks(peaks, extension=$extension)
+#if $peak_size.normalize == 'yes' 
+esc.ct.norm_peaks(peaks, extension=$peak_size.extension)
+#end if
 esc.ct.bld_mtx_bed(
     fragment_file='fragments.gz',
     feature_region=peaks,
@@ -34,7 +36,16 @@
     <inputs>
         <param name="fragment_file" type="data" format="bed" label="ATAC fragments file" />
         <param name="peaks_file" type="data" format="tabular" label="Features file" help="Peaks BED file or MACS2 narrowPeak file"/>
-        <param name="extension" type="integer" value="0" min="0" label="Number of bases to extend both sides of peaks" />
+        <conditional name="peak_size">
+            <param name="normalize" type="select" label="Normalize peak sizes?" >
+                <option value="no" selected="true">No, keep the peaks as they are</option>
+                <option value="yes">Yes, normalize the peaks to equal length from the center</option>
+            </param>
+            <when value="no" />
+            <when value="yes">
+                <param name="extension" type="integer" value="0" min="0" label="Number of bases to extend both sides from the center of the peak" help="All resulting peaks will have the same length"/>
+            </when>
+        </conditional>
         <conditional name="reference_chr">
             <param name="chr_select" type="select" label="Select the chromosomes of the species you are considering" >
                 <option value="human">Human chromosomes ['1', '2', '3', ... , '22', 'X', 'Y']</option>
@@ -59,7 +70,7 @@
     </outputs>
     <tests>
         <test expect_num_outputs="2">
-            <!-- count matrix -->
+            <!-- default params -->
             <param name="fragment_file" value="chrY.fragments.bed" />
             <param name="peaks_file" value="chrY.peaks.bed" />
             <conditional name="reference_chr">
@@ -71,6 +82,23 @@
             </section>
             <output name="anndata_out" file="chrY.h5ad" ftype="h5ad" compare="sim_size"/>
         </test>
+        <test expect_num_outputs="2">
+            <!-- normalized peaks -->
+            <param name="fragment_file" value="chrY.fragments.bed" />
+            <param name="peaks_file" value="chrY.peaks.bed" />
+            <conditional name="peak_size">
+                <param name="normalize" value="yes" />
+                <param name="extension" value="250" />
+            </conditional>
+            <conditional name="reference_chr">
+                <param name="chr_select" value="custom" />
+                <param name="chromosomes" value="Y" />
+            </conditional>
+            <section name="advanced_common">
+                <param name="show_log" value="true" />
+            </section>
+            <output name="anndata_out" file="chrY_norm_peaks.h5ad" ftype="h5ad" compare="sim_size"/>
+        </test>
     </tests>
   <help>
 .. class:: infomark
--- a/macros.xml	Tue Apr 18 13:19:11 2023 +0000
+++ b/macros.xml	Sat Apr 22 12:14:00 2023 +0000
@@ -1,6 +1,6 @@
 <macros>
     <token name="@TOOL_VERSION@">0.3.2</token>
-    <token name="@VERSION_SUFFIX@">0</token>
+    <token name="@VERSION_SUFFIX@">1</token>
     <token name="@PROFILE@">21.01</token>
     <xml name="requirements">
         <requirements>
Binary file test-data/chrY.h5ad has changed
Binary file test-data/chrY_norm_peaks.h5ad has changed
Binary file test-data/chrY_with_transcript_annotation.h5ad has changed