view segment.xml @ 3:33be231ce128 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cnvkit commit 9d922676808c5f57e9c01b148eec6cc0a63c53e5
author iuc
date Fri, 13 Dec 2024 23:57:20 +0000
parents c4a22d0fdba5
children
line wrap: on
line source

<tool id="cnvkit_segment" name="CNVkit Segment" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
    <description>Infer copy number segments from the given coverage table</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="xrefs"/>
    <expand macro="creators"/>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[  
        ln -s '$filename' ./tumor.cnr &&
        #if $additional_SNP_allelic_process.vcf
            ln -s '$additional_SNP_allelic_process.vcf' ./vcf_file.vcf &&
        #end if
        #import os
        cnvkit.py segment
            ./tumor.cnr
            --output sample.cns
            --processes \${GALAXY_SLOTS:-4}
            #if $advanced_settings.dataframe
                --dataframe '$advanced_settings.dataframe'
            #end if
            #if $advanced_settings.method == "cbs"
                #set $method_val = "cbs"
                --method '$method_val'
            #else
                --method '$advanced_settings.method'
            #end if
            #if str($advanced_settings.threshold)
                --threshold $advanced_settings.threshold
            #end if
            $advanced_settings.drop_low_coverage
            #if str($advanced_settings.drop_outliers)
                 --drop-outliers $advanced_settings.drop_outliers
            #end if
            $advanced_settings.smooth_cbs
            #if $additional_SNP_allelic_process.vcf
                 --vcf ./vcf_file.vcf
            #end if
            #if $additional_SNP_allelic_process.sample_id
                --sample-id '$additional_SNP_allelic_process.sample_id'
            #end if
            #if $additional_SNP_allelic_process.normal_id
                 --normal-id '$additional_SNP_allelic_process.normal_id'
            #end if
            #if str($additional_SNP_allelic_process.min_variant_depth)
                 --min-variant-depth $additional_SNP_allelic_process.min_variant_depth
            #end if
            #if str($additional_SNP_allelic_process.zygosity_freq)
                 --zygosity-freq $additional_SNP_allelic_process.zygosity_freq
            #end if
    ]]></command>
    <inputs>
        <param name="filename" type="data" format="tabular" label="Bin-Level log2 Ratios/Coverages cnr file" help="Use the output of the CNVkit fix" />
        <section name="additional_SNP_allelic_process" title="additional process for SNP b_allele frequencies" expanded="false">
            <expand macro="additionally_SNP_process" />
        </section>
        <section name="advanced_settings" title="Advanced settings" expanded="false">
            <expand macro="segment_optional" />
        </section>
    </inputs>
    <outputs>
        <data name="out_sample_segment" format="tabular" label="${tool.name} on ${on_string}: Sample segment" from_work_dir="sample.cns" />
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="filename" ftype="tabular" value="tumor.cnr" />
            <section name="advanced_settings">
                <param name="method" value="hmm" />
                <param name="threshold" value="2" />
                <param name="drop_outliers" value="2" />
                <param name="drop_low_coverage" value="1" />
            </section>
            <output name="out_sample_segment">
                <assert_contents><has_text text="chromosome"/></assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
         Infer copy number segments from the given coverage table. Segmentation runs independently on
         each chromosome arm, and can be parallelized with the processes option (except for the HMM methods), similar to batch
         
         Segmented log2 ratios (.cns) output file contains those columns
          chromosome, Start, end, gene, log2, depth, weight and number of bins covered by the segment (probes)
    ]]></help>
    <expand macro="citations" />
</tool>