view facets_analysis.xml @ 3:d1914f4d9daf draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/main/tools/facets commit 64ac36125f04497dd51028f307e059fca9ec0503
author artbio
date Sun, 05 Oct 2025 00:55:34 +0000
parents 66a56502199d
children 3f62267c4be7
line wrap: on
line source

<tool id="facets_analysis" name="FACETS Analysis" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>Performs allele-specific copy number analysis from a pileup file</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <command detect_errors="exit_code"><![CDATA[
        Rscript '${__tool_directory__}/facets_analysis.R'
            --pileup '$pileup'
            --sample_id '$pileup.name'
            --output_seg '$output_seg'
            --output_summary '$output_summary'
            --output_spider '$output_spider'
            --output_plots '$output_plots'
            --cval $cval
            --min_nhet $min_nhet
            --snp_nbhd $snp_nbhd
            --gbuild '$gbuild'
    ]]></command>
    <inputs>
        <param name="pileup" type="data" format="tabular.gz" label="FACETS Pileup File" help="Output from the 'SNP Pileup for FACETS' tool."/>
        
        <param name="cval" type="float" value="150" label="Critical value for segmentation (cval)" help="Higher values lead to fewer segments (less sensitive). Lower values are more sensitive."/>
        <param name="min_nhet" type="integer" value="25" label="Minimum number of heterozygous SNPs per segment" help="Ensures that segments are supported by sufficient allelic information."/>
        
        <param name="gbuild" type="select" label="Genome Build">
            <option value="hg38" selected="true">Human (hg38)</option>
            <option value="hg19">Human (hg19)</option>
            <option value="hg18">Human (hg18)</option>
            <option value="mm10">Mouse (mm10)</option>
            <option value="mm9">Mouse (mm9)</option>
        </param>
        
        <param name="snp_nbhd" type="integer" value="300" label="SNP neighborhood size (snp.nbhd)" help="Should match the --pseudo-snps distance used to generate the pileup file. Default is 300."/>
    </inputs>
    <outputs>
        <data name="output_seg" format="tsv" label="FACETS Segmentation on ${on_string}"/>
        <data name="output_summary" format="tabular" label="FACETS Summary on ${on_string}"/>
        <data name="output_plots" format="png" label="FACETS Plots on ${on_string}"/>
        <data name="output_spider" format="png" label="FACETS Spider Plot on ${on_string}"/>

    </outputs>
    <tests>
        <test>
            <param name="pileup" value="Pileup.input_test_facets.csv.gz" ftype="tabular.gz"/>
            <output name="output_seg" file="test_sample_01.seg.tsv" ftype="tsv"/>
            <output name="output_summary" file="test_sample_01.summary.txt" ftype="tabular"/>
            <output name="output_plots" file="test_sample_01.plots.png" ftype="png" compare="sim_size" delta="20000"/>
            <output name="output_spider" file="test_sample_01.spider.png" ftype="png" compare="sim_size" delta="10000"/>
        </test>
    </tests>
    <help><![CDATA[
        **What it does**

        This tool runs the `FACETS` R package to perform allele-specific copy number and clonal heterogeneity analysis. It takes the compressed pileup file generated by the "SNP Pileup for FACETS" tool as its primary input.

        The main outputs are:
        - A **Segmentation file (TSV)** with the genomic coordinates of each segment and their associated copy number (TCN, LCN), purity, and ploidy.
        - A **Summary file** containing the main estimated parameters for the sample (purity, ploidy, etc.).
        - A **Plots file (PDF)** with standard FACETS visualizations for quality control and interpretation.
    ]]></help>
    <expand macro="citations"/>
</tool>