view vcf.xml @ 1:974b39eb89b6 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:55:26 +0000
parents 4cf5a2dd27dd
children
line wrap: on
line source

<tool id="cnvkit_export_vcf" name="CNVkit Export VCF" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
    <description>Converts the Segmented copy ratio data file (*.cns) file into VCF file</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="xrefs"/>
    <expand macro="creators"/>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[  
        ln -s '$input_segmented_file' ./sample.cns &&
        ln -s '$advanced_settings.cnr' ./sample.cnr &&
        cnvkit.py export vcf
            ./sample.cns
            #if $advanced_settings.cnr
              --cnr ./sample.cnr
            #end if
            #if $advanced_settings.sample_id
              --sample-id '$advanced_settings.sample_id'
            #end if
            #if $advanced_settings.ploidy
              --ploidy $advanced_settings.ploidy
            #end if
            #if str($advanced_settings.sample_sex) and $advanced_settings.sample_sex != ""
              --sample-sex '$advanced_settings.sample_sex'
            #end if
            $advanced_settings.male_reference  
            --output sample.cnv.vcf
            #if $advanced_settings.diploid_parx_genome
              --diploid-parx-genome '$advanced_settings.diploid_parx_genome'
            #end if
    ]]></command>
     <inputs>
        <param name="input_segmented_file" type="data" format="cns" label="Segmented Copy Ratio Data File (cns file)" help="" />
        <section name="advanced_settings" title="Advanced settings" expanded="false">
            <param argument="--cnr" optional="true" type="data" format="cnr" label="Bin-level copy ratios (cnr)" help="" />
            <param argument="--sample-id" type="text" label="Sample ID" help="Sample name to write in the genotype field of the output VCF file" />
            <param argument="--ploidy" optional="true" type="integer" label="Ploidy" min="1" value="2" help="Ploidy of the sample cells. [Default: 2]" />
            <expand macro="sample_sex"/>
            <param argument="--male-reference" type="boolean" checked="false" truevalue="--male-reference" falsevalue="" label="MALE REFERENCE" help="Assume inputs were normalized to a male reference" />
            <param argument="--diploid-parx-genome" type="text" label="Diploid Parx Genome" help="Considers the given human genome's PAR of chromosome X as autosomal. Example: 'grch38'" />
        </section>  
        </inputs>
    <outputs>
        <data name="CNVs_VCF" format="vcf" label="${tool.name} on ${on_string}: CNVs VCF file" from_work_dir="sample.cnv.vcf" />
    </outputs>
       <tests>
        <test expect_num_outputs="1">
            <param name="input_segmented_file" ftype="cns" value="sample.cns" />
            <param name="sample_id" value="SampleID" />
            <param name="sample_sex" value="Female" />
            <output name="CNVs_VCF" file="sample.cnv.vcf" ftype="vcf" lines_diff="2" />
        </test>
    </tests>
    <help><![CDATA[
Export the segmented copy number data (from a .cns file) to the standard VCF 4.2 format. 
The resulting VCF file describes copy number gains and losses across each segment and contains 
INFO fields for breakpoints (CIPOS, CIEND) if bin-level data (.cnr) is provided.

-----

**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>