diff endorspy.xml @ 0:c165db467de0 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/endorspy commit ac2a8c3523acfe6dd7299bbb4805233976f9d7d2
author iuc
date Wed, 18 Mar 2026 23:05:58 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/endorspy.xml	Wed Mar 18 23:05:58 2026 +0000
@@ -0,0 +1,95 @@
+<tool id="endorspy" name="EndorSpy" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+    <description>Calculate endogenous DNA percentage, clonality, and duplicates from flagstats</description>
+    <macros>
+        <token name="@TOOL_VERSION@">1.3</token>
+        <token name="@VERSION_SUFFIX@">0</token>
+        <token name="@PROFILE@">25.1</token>
+    </macros>
+
+    <requirements>
+        <requirement type="package" version="3.12">python</requirement>
+    </requirements>
+    <required_files>
+        <include path="endorS.py"/>
+    </required_files>
+    <command detect_errors="exit_code"><![CDATA[
+        ## 1. Links
+        ln -s '$pre_flagstat' raw.stats &&
+        #if $post_flagstat
+            ln -s '$post_flagstat' filtered.stats &&
+        #end if
+        #if $dedup_flagstat
+            ln -s '$dedup_flagstat' dedup.stats &&
+        #end if
+
+        ## 2. Run EndorS.py 
+        python '$__tool_directory__/endorS.py' 
+            -r raw.stats
+            #if $post_flagstat
+                -q filtered.stats 
+            #end if
+            #if $dedup_flagstat
+                -d dedup.stats 
+            #end if
+            -o json &&
+        
+        ## 3. Output
+        mv *.json '$output_json'
+    ]]></command>
+
+    <inputs>
+        <param argument="-r" name="pre_flagstat" type="data" format="txt" label="Raw Flagstat" help="Output of samtools flagstat before any filtering or deduplication." />        
+        <param argument="-q" name="post_flagstat" type="data" format="txt" optional="true" label="Quality-Filtered Flagstat" help="Output of samtools flagstat after quality filtering." /> 
+        <param argument="-d" name="dedup_flagstat" type="data" format="txt" optional="true" label="Deduplicated Flagstat" help="Output of samtools flagstat after duplicate removal." />
+    </inputs>
+
+    <outputs>
+        <data name="output_json" format="json" label="${tool.name} on ${on_string}: JSON Report" />
+    </outputs>
+    
+    <tests>
+        <test expect_num_outputs="1">
+            <param name="pre_flagstat" value="raw_flagstat.txt" ftype="txt" />
+            <param name="post_flagstat" value="filtered_flagstat.txt" ftype="txt" />
+            <output name="output_json">
+                <assert_contents>
+                    <has_text text="percent_on_target" />
+                    <has_text text="percent_on_target_quality_filtered" />
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+
+    <help><![CDATA[
+**EndorSpy: Endogenous DNA, Clonality, and Duplication Calculator**
+
+This tool calculates the percent on target (Endogenous DNA), cluster factor, and percent of duplicates in a sample from `samtools flagstat` outputs.
+
+**Inputs:**
+You can provide a combination of samtools flagstat files:
+* **Raw Flagstat**: Assumes no quality filtering nor duplicate removal performed.
+* **Quality-Filtered Flagstat**: Assumes some form of quality filtering has been performed.
+* **Deduplicated Flagstat**: Whereby duplicate removal has been performed on the input reads.
+
+*Note: You must provide at least the Raw flagstat, OR both the Quality-filtered and Deduplicated flagstats.*
+
+**Outputs:**
+A JSON file containing the calculated statistics.
+    ]]></help>
+
+    <citations>
+        <citation type="bibtex">
+@misc{githubendorspy,
+  author = {Andrades Valtuena, Aida},
+  title = {EndorSpy},
+  publisher = {GitHub},
+  journal = {GitHub repository},
+  url = {https://github.com/aidaanva/endorS.py}
+}
+        </citation>
+    </citations>
+    <creator>
+        <person givenName="Ali Mert" familyName="Aydin" url="https://github.com/mertydn"/>
+        <organization name="Galaxy Europe" url="https://galaxyproject.eu/" />
+    </creator>
+</tool>
\ No newline at end of file