changeset 0:87a0eb97d160 draft

planemo upload for repository https://github.com/thegenemyers/MERQURY.FK commit 5c9fd72ef5aa8b8694cdba75d1e54fbe4cda5d9d
author iuc
date Wed, 19 Feb 2025 11:21:46 +0000
parents
children 67d3299eaee4
files hapmaker.xml macros.xml test-data/child.tar test-data/maternal.hap.ktab test-data/maternal.tar test-data/paternal.hap.ktab test-data/paternal.tar
diffstat 5 files changed, 146 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hapmaker.xml	Wed Feb 19 11:21:46 2025 +0000
@@ -0,0 +1,64 @@
+<tool id="merquryfk_hapmaker" name="MerquryFK HAPmaker" version="@VERSION@+galaxy@VERSION_SUFFIX@" profile="24.2">
+    <description>Generates hap-mer tables from FastK k-mer data of maternal, paternal, and child sequences</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+    <command detect_errors="exit_code"><![CDATA[
+        mkdir -p input_files
+        && mkdir -p hapmaker_ktabs
+        && ln -s '$maternal_ktab_tar' maternal.tar
+        && tar -xf maternal.tar
+        && mv ktabfiles ktabfiles_maternal
+        && mv ktabfiles_maternal/output.ktab input_files/maternal.ktab
+        && mv "\$(find ktabfiles_maternal -type f -name '*.ktab.1')" "input_files/.maternal.ktab.1"
+        && ln -s '$paternal_ktab_tar' paternal.tar
+        && tar -xf paternal.tar
+        && mv ktabfiles ktabfiles_paternal
+        && mv ktabfiles_paternal/output.ktab input_files/paternal.ktab
+        && mv "\$(find ktabfiles_paternal -type f -name '*.ktab.1')" "input_files/.paternal.ktab.1"
+        && ln -s '$child_ktab_tar' child.tar
+        && tar -xf child.tar
+        && mv ktabfiles ktabfiles_child
+        && mv ktabfiles_child/output.ktab input_files/child.ktab
+        && mv "\$(find ktabfiles_child -type f -name '*.ktab.1')" "input_files/.child.ktab.1"
+        && HAPmaker -v 
+        -T\${GALAXY_SLOTS:-4}
+        input_files/maternal.ktab
+        input_files/paternal.ktab
+        input_files/child.ktab
+        && mv input_files/.*.hap* hapmaker_ktabs
+        && tar -czvf HapK_ktab_files.tar.gz hapmaker_ktabs
+    ]]></command>
+    <inputs>
+        <param name="maternal_ktab_tar" type="data" format="fastk_ktab_tar" label="Select the TAR file consisting of maternal ktab file from FastK"/>
+        <param name="paternal_ktab_tar" type="data" format="fastk_ktab_tar" label="Select the TAR file consisting of paternal ktab file from FastK"/>
+        <param name="child_ktab_tar" type="data" format="fastk_ktab_tar" label="Select the TAR file consisting of child ktab file from FastK"/>
+    </inputs>
+    <outputs>
+        <data name="paternal_out" format="fastk_ktab" from_work_dir="paternal.hap.ktab" label="${tool.name} on ${on_string}: paternal hap-mers"/>
+        <data name="maternal_out" format="fastk_ktab" from_work_dir="maternal.hap.ktab" label="${tool.name} on ${on_string}: maternal hap-mers"/>
+        <data name="intermediate_ktab" format="fastk_ktab_tar" from_work_dir="HapK_ktab_files.tar.gz" label="${tool.name} on ${on_string}: HapMaker Intermediate Ktab files"/>
+    </outputs>
+    <tests>
+        <test expect_num_outputs="3">
+            <param name="maternal_ktab_tar" ftype="fastk_ktab_tar" value="maternal.tar"/>
+            <param name="paternal_ktab_tar" ftype="fastk_ktab_tar" value="paternal.tar"/>
+            <param name="child_ktab_tar" ftype="fastk_ktab_tar" value="child.tar"/>
+            <output name="paternal_out" value="paternal.hap.ktab"/>
+            <output name="maternal_out" value="maternal.hap.ktab"/>
+            <output name="intermediate_ktab" ftype="fastk_ktab_tar">
+                <assert_contents>
+                    <has_archive_member path="hapmaker_ktabs/.maternal.hap.ktab.1"/>
+                    <has_archive_member path="hapmaker_ktabs/.paternal.hap.ktab.1"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+        HAPmaker generates hap-mer tables for parental datasets for merquryfk pipeline. Before running HAPplot or MerquryFK in trio mode, it is necessary to generate a table of hap-mers 
+        for both the mother and father, using FastK k-mer tables from the maternal, paternal, and child sequence data sets. 
+        The output of this process produces two k-mer tables: <mat>.hap.ktab for the maternal hap-mers and <pat>.hap.ktab for the paternal hap-mers.
+    ]]></help>
+    <expand macro="citation"/>
+</tool>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Wed Feb 19 11:21:46 2025 +0000
@@ -0,0 +1,82 @@
+<macros>
+    <token name="@VERSION@">1.1.1</token>
+    <token name="@VERSION_SUFFIX@">0</token>
+    <token name="@PLOTS@">
+        -w${width}
+        -h${height}
+    </token>
+    <token name="@MEASURE@">
+        #if $measure.measurement == "relative":
+            -x${max_x}
+            -y${max_y}
+        #else:
+            -X${max_x}
+            -Y${max_y} 
+        #end if 
+    </token>
+    <token name="@GRAPHS@">
+        #for $graph in $graphs:
+            $graph
+        #end for
+    </token>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="@VERSION@">merquryfk</requirement>
+        </requirements>
+    </xml>
+    <xml name="sizes">
+        <conditional name="measure">
+            <param name="measurement" type="select" label="How would you like to set max value?">
+                <option value="absolute">Absolute terms</option>
+                <option value="relative">Relative to peak</option>
+            </param>
+            <when value="absolute">
+                <param name="max_x" type="integer" min="0" label="Max X value" optional="true" value="2"/>
+                <param name="max_y" type="integer" min="0" label="Max Y value" optional="true" value="1"/>
+            </when>            
+            <when value="relative">
+                <param name="max_x" type="float" min="0" label="Max X multiplier" optional="true" value="2.1" help="Sets max value as assigned multiple of count 'peak' away from origin"/>
+                <param name="max_y" type="float" min="0" label="Max Y multiplier" optional="true" value="1.1" help="Sets max value as assigned multiple of count 'peak' away from origin"/>
+            </when>
+        </conditional>
+    </xml>
+    <xml name="plots">
+        <param name="width" label="Width of plots" type="float" optional="true" value="6.0" min="0"/>
+        <param name="height" label="Height of plots" type="float" optional="true" value="4.5" min="0"/>
+    </xml>
+    <xml name="graphs">
+        <param name="graphs" label="What graphs would you like to generate?" type="select" multiple="true" help="If none are selected, all will be generated">
+            <option value="-l">Line plot</option>
+            <option value="-f">Fill plot</option>
+            <option value="-s">Stack plot</option>
+            <option value="-z">K-mer counts unique to assembly</option>
+        </param>
+    </xml>
+    <xml name="graphs2">
+        <param name="graphs" label="What graphs would you like to generate?" type="select" multiple="true" help="If none are selected, all will be generated">
+            <option value="-l">Line plot</option>
+            <option value="-f">Fill plot</option>
+            <option value="-s">Stack plot</option>
+        </param>
+    </xml>
+    <xml name="pdf">
+        <param argument="-pdf" type="boolean" label="PDF Output" truevalue="-pdf" falsevalue="" help="Output in pdf format if true, png if false"/>
+    </xml>
+    <xml name="description">
+        <description>part of MERQURY.FK</description>
+    </xml>
+    <xml name="citation">
+        <citations>
+            <citation type="bibtex">
+                @misc{githubMERQURY.FK.
+                    author = {Eugene Myers},
+                    year = {2023},
+                    title = {MERQURY.FK},
+                    publisher = {GitHub},
+                    journal = {GitHub repository},
+                    url = {https://github.com/thegenemyers/MERQURY.FK},
+                }
+            </citation>
+        </citations>
+    </xml>
+</macros>
\ No newline at end of file
Binary file test-data/child.tar has changed
Binary file test-data/maternal.tar has changed
Binary file test-data/paternal.tar has changed