view seq2hla.xml @ 2:86d0ce0560a1 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/seq2hla commit 3a6a342d9b5e0dd2774629079e315c8f33be7d29
author iuc
date Tue, 07 Mar 2023 13:10:18 +0000
parents 5a7cd6c39085
children
line wrap: on
line source

<tool id="seq2hla" name="seq2HLA" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
    <description>HLA genotype and expression from RNA-seq</description>
    <macros>
        <token name="@TOOL_VERSION@">2.3</token>
        <token name="@VERSION_SUFFIX@">0</token>
    </macros>
    <xrefs>
        <xref type="bio.tools">seq2hla</xref>
    </xrefs>
    <requirements>
        <requirement type="package" version="@TOOL_VERSION@">seq2hla</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        seq2HLA --runName='$run_name'
        #if str( $fastq_input.fastq_input_selector ) == "paired":
            -1 '${fastq_input.fastq_input1}'
            -2 '${fastq_input.fastq_input2}'
        #elif str( $fastq_input.fastq_input_selector ) == "paired_collection":
            -1 '${fastq_input.fastq_input1.forward}'
            -2 '${fastq_input.fastq_input1.reverse}'
        #end if
        #if str($trim) != '':
            --trim3=$trim
        #end if
        -p \${GALAXY_SLOTS:-1} >> '$seq2hla_log'
        && cp -p '${run_name}-ClassI-class.HLAgenotype2digits' '${c1_genotype2digits}'
        && cp -p '${run_name}-ClassI-class.HLAgenotype4digits' '${c1_genotype4digits}'
        && echo '#Locus_RPKM' | cat - '${run_name}-ClassI-class.expression' | sed 's/^\(.*\): \([0-9.]*\).*$/\1_\2/' | tr '_' '\t' > '${c1_expression}'
        && cp -p '${run_name}-ClassII.HLAgenotype4digits' '${c2_genotype4digits}'
        && echo '#Locus_RPKM' | cat - '${run_name}-ClassII.expression' | sed 's/^\(.*\): \([0-9.]*\).*$/\1_\2/' | tr '_' '\t' > '${c2_expression}'
        && cp -p '${run_name}.ambiguity' '${ambiguity}'
    ]]></command>
    <inputs>
        <param name="run_name" type="text" value="sample1" label="Name prefix for this analysis">
            <validator type="regex" message="Use letters,digits,_.-">^[A-Za-z0-9_\-+.]+$</validator>
        </param>
        <conditional name="fastq_input">
            <param name="fastq_input_selector" type="select" label="Paired-end reads" help="Select between paired and paired-collection data">
                <option value="paired">Paired</option>
                <option value="paired_collection">Paired Collection</option>
            </param>
            <when value="paired">
                <param name="fastq_input1" type="data" format="fastqsanger,fastqsanger.gz" label="Select first set of reads" help="Specify dataset with forward reads"/>
                <param name="fastq_input2" type="data" format="fastqsanger,fastqsanger.gz" label="Select second set of reads" help="Specify dataset with reverse reads"/>
            </when>
            <when value="paired_collection">
                <param name="fastq_input1" format="fastqsanger,fastqsanger.gz" type="data_collection" collection_type="paired" label="Select a collection of paired-end reads"/>
            </when>
        </conditional>
        <param name="trim" type="integer" value="" min="0" optional="true" label="Trim bases from 3 prime" 
               help="trim this many bases from the low-quality end of each read" />
    </inputs>
    <outputs>
        <data format="txt" name="seq2hla_log" label="${tool.name} on ${on_string}: ${run_name} logfile"/>
        <data format="tabular" name="c1_genotype2digits" label="${tool.name} on ${on_string}: ${run_name}-ClassI.HLAgenotype2digits"/>
        <data format="tabular" name="c1_genotype4digits" label="${tool.name} on ${on_string}: ${run_name}-ClassI.HLAgenotype4digits"/>
        <data format="tabular" name="c2_genotype4digits" label="${tool.name} on ${on_string}: ${run_name}-ClassII.HLAgenotype4digits"/>
        <data format="tabular" name="c1_expression" label="${tool.name} on ${on_string}: ${run_name}-ClassI.expression"/>
        <data format="tabular" name="c2_expression" label="${tool.name} on ${on_string}: ${run_name}-ClassII.expression"/>
        <data format="txt" name="ambiguity" label="${tool.name} on ${on_string}: ${run_name}.ambiguity"/>
    </outputs>
    <tests>
        <test>
            <param name="run_name" value="test"/>
            <conditional name="fastq_input">
                <param name="fastq_input_selector" value="paired"/>
                <param name="fastq_input1" ftype="fastqsanger" value="reads1.fastq"/>
                <param name="fastq_input2" ftype="fastqsanger" value="reads2.fastq"/>
            </conditional>
            <output name="c1_genotype4digits">
                <assert_contents>
                    <has_text text="A*24:02" />
                </assert_contents>
            </output>
        </test>
        <test>
            <param name="run_name" value="test_collection"/>
            <conditional name="fastq_input">
                <param name="fastq_input_selector" value="paired_collection"/>
                <param name="fastq_input1">
                    <collection type="paired">
                        <element name="forward" ftype="fastqsanger" value="reads1.fastq" />
                        <element name="reverse" ftype="fastqsanger" value="reads2.fastq" />
                    </collection>
                </param>
            </conditional>
            <output name="c1_genotype4digits">
                <assert_contents>
                    <has_text text="A*24:02" />
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[

**seq2HLA**  *HLA typing from RNA-Seq sequence reads*

Release: 2.2

seq2HLA_ is an in-silico method, written in python and R, which takes standard RNA-Seq sequence reads in fastq format
as input, uses a bowtie index comprising all HLA alleles and outputs the most likely HLA class I and class II genotypes (in 4 digit resolution),
a p-value for each call, and the expression of each class

**Inputs** 

    Paired read fastq files with illumina style IDs.  


**Outputs** 

    1. <prefix>-ClassI.HLAgenotype2digits => 2 digit result of Class I
    2. <prefix>-ClassII.HLAgenotype2digits => 2 digit result of Class II
    3. <prefix>-ClassI.HLAgenotype4digits => 4 digit result of Class I
    4. <prefix>-ClassII.HLAgenotype4digits => 4 digit result of Class II
    5. <prefix>.ambiguity => reports typing ambuigities (more than one solution for an allele possible)
    6. <prefix>-ClassI.expression => expression of Class I alleles
    7. <prefix>-ClassII.expression => expression of Class II alleles


    ClassI.HLAgenotype4digits

       =======  ========  ===========  ========  ============
        #Locus  Allele 1  Confidence   Allele 2  Confidence
       =======  ========  ===========  ========  ============
        A       A*03:01   0.000510333  A*02:01'  0.0005975604
        B       B*50:01   0.001271273  B*58:02   3.52561e-05
        C       C*04:01   0.06362723   C*06:02   0.04725865
       =======  ========  ===========  ========  ============


    ClassI.expression

       =======  ======
        #Locus   RPKM
       =======  ======
        A        89.59
        B       139.66
        C       184.42
       =======  ======


.. _seq2HLA: https://github.com/TRON-Bioinformatics/seq2HLA

    ]]></help>
    <citations>
        <citation type="doi">10.1186/gm403</citation>
    </citations>
</tool>