view segmetrics.xml @ 4:046b04fc7284 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cnvkit commit fc1282ec68b346988203ead860e9b9d6a47e9efb
author iuc
date Sat, 01 Mar 2025 11:59:23 +0000
parents 86392285203a
children
line wrap: on
line source

<tool id="cnvkit_segmetrics" name="CNVkit Segmetrics" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
    <description>calculate summary statistics</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="xrefs"/>
    <expand macro="creators_and_zahra"/>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[  
       ln -s '$input_filename_file' ./sample.cnr &&
       #if $segments
            ln -s '$segments' ./sample.cns &&
       #end if
       cnvkit.py segmetrics
            ./sample.cnr              
            --output gene_segmetrics.cns   
            #if $segments
                --segments ./sample.cns
            #end if                
            $advanced_settings.mean
            $advanced_settings.median
            $advanced_settings.mode
            $advanced_settings.ttest
            $advanced_settings.stdev
            $advanced_settings.sem
            $advanced_settings.mad
            $advanced_settings.mse
            $advanced_settings.iqr
            $advanced_settings.bivar
            $advanced_settings.ci
            $advanced_settings.pi
            $advanced_settings.alpha
            $advanced_settings.bootstrap                   
    ]]></command>
    <inputs>
        <param name="input_filename_file" type="data" format="cnn,cnr" label="Bin-Level log2 Ratios/Coverages cnn/cnr file" help="" />
        <param argument="--segments" optional="true" type="data" format="cns" label="CN segmentation calls cns file" help="" />  
        <param argument="--drop-low-coverage" type="boolean" checked="false" truevalue="--drop-low-coverage" falsevalue="" label="Drop very-low-coverage bins before segmentation" help="To avoid false-positive deletions in poor-quality tumor samples" />
        <section name="advanced_settings" title="Statistical settings" expanded="false">
            <expand macro="genemetrics_segmetrics_statistics" />
        </section>
    </inputs>
    <outputs>
        <data name="gene_segmetrics" format="cns" label="${tool.name} on ${on_string}: bin-level log2 ratio" from_work_dir="gene_segmetrics.cns" />
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="input_filename_file" ftype="cnr" value="sample.cnr" />
            <param name="segments" ftype="cns" value="sample.cns" />
            <param name="drop_low_coverage" value="1" />
            <section name="advanced_settings">
                <param name="mean" value="1" />
                <param name="median" value="1" />
                <param name="mode" value="0" />
            </section>
            <output name="gene_segmetrics">
                <assert_contents><has_text text="chromosome"/></assert_contents>
            </output> 
        </test>
    </tests>
    <help><![CDATA[
        Calculate summary statistics of the residual bin-level log2 ratio estimates from the segment means, similar to 
        the existing metrics command, but for each segment individually. Results are output in the same format as the 
        CNVkit segmentation file (.cns), with the stat names and calculated values printed in additional columns.
    
-----

**Bin-level log2 ratios (.cnr)**

Tabular file containing normalized log2 ratios for small genomic bins (divided regions of the genome). Used to detect raw copy number variations (CNVs) before segmentation.

.. csv-table::
   :header-rows: 0

    "chromosome","Genomic chromosome (e.g., chr1, chrX)"
    "start","Start position of the bin."
    "end","End position of the bin."
    "gene","Gene name(s) overlapping the bin (if applicable)."
    "log2","Normalized log2 ratio (sample coverage / reference coverage)."
    "depth","Average read depth in the bin."
    "weight","Reliability weight of the bin (higher = more reliable)."

-----

**Segmented log2 ratios (.cns)**

Tabular file with smoothed, merged segments of stable copy number, derived from the .cnr file. Represents final CNV calls.

.. csv-table::
   :header-rows: 0

    "chromosome","start, end: Genomic coordinates of the segment"
    "gene","Gene(s) overlapping the segment."
    "log2","Mean log2 ratio of the segment."
    "probes","Mean log2 ratio of the segment."
    "depth","Average read depth."
    "weight","Reliability weight."
    "p_value","Statistical confidence (lower = more significant)."

    ]]></help>
    <expand macro="citations" />
</tool>