view macros.xml @ 15:5ec75f5dae3c draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/rgrnastar commit a8e319862d723654c372a6d71e5de76e052586a9"
author iuc
date Wed, 05 Aug 2020 09:40:33 -0400
parents b9e04854e2bb
children e132e7d02a3e
line wrap: on
line source

<macros>
    <!-- REMEMBER to bump the version of rna_star_index_builder_data_manager
    whenever you make changes to the following two version tokens!
    The data manager uses a symlink to this macro file to keep the STAR and
    the index versions in sync, but you should manually adjust the +galaxy
    version number. -->
    <!-- STAR version to be used -->
    <token name="@VERSION@">2.7.5b</token>
    <!-- STAR index version compatible with this version of STAR
    This is the STAR version that introduced the index structure expected
    by the current version.
    It can be found for any specific version of STAR with:
    STAR -h | grep versionGenome
    or by looking for the versionGenome parameter in source/parametersDefault
    of STAR's source code -->
    <token name="@IDX_VERSION@">2.7.4a</token>
    <token name="@IDX_DATA_TABLE@">rnastar_index2x_versioned</token>

    <xml name="requirements">
        <requirements>
            <requirement type="package" version="@VERSION@">star</requirement>
            <requirement type="package" version="1.9">samtools</requirement>
            <yield />
        </requirements>
    </xml>

    <xml name="index_selection" token_with_gene_model="0">
        <param argument="--genomeDir" name="genomeDir" type="select"
        label="Select reference genome"
        help="If your genome of interest is not listed, contact the Galaxy team">
            <options from_data_table="@IDX_DATA_TABLE@">
                <filter type="static_value" column="4" value="@WITH_GENE_MODEL@" />
                <filter type="static_value" column="5" value="@IDX_VERSION@" />
                <filter type="sort_by" column="2" />
                <validator type="no_options" message="No indexes are available for the selected input dataset" />
            </options>
        </param>
    </xml>

    <token name="@FASTQ_GZ_OPTION@">
        --readFilesCommand zcat
    </token>
    <xml name="citations">
        <citations>
            <citation type="doi">10.1093/bioinformatics/bts635</citation>
        </citations>
    </xml>
    <xml name="@SJDBOPTIONS@" token_optional="true">
         <param argument="--sjdbGTFfile" type="data" format="gff3,gtf" label="Gene model (gff3,gtf) file for splice junctions" optional="@OPTIONAL@" help="Exon junction information for mapping splices"/>
         <param argument="--sjdbOverhang" type="integer" min="1" value="100" label="Length of the genomic sequence around annotated junctions" help="Used in constructing the splice junctions database. Ideal value is ReadLength-1"/>
    </xml>
    <xml name="dbKeyActions">
        <actions>
            <conditional name="refGenomeSource.geneSource">
                <when value="indexed">
                    <action type="metadata" name="dbkey">
                        <option type="from_data_table" name="@IDX_DATA_TABLE@" column="1" offset="0">
                            <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
                            <filter type="param_value" ref="refGenomeSource.GTFconditional.genomeDir" column="0"/>
                        </option>
                    </action>
                </when>
                <when value="history">
                    <action type="metadata" name="dbkey">
                        <option type="from_param" name="refGenomeSource.genomeFastaFiles" param_attribute="dbkey" />
                    </action>
                </when>
            </conditional>
        </actions>
    </xml>
    <token name="@TEMPINDEX@"><![CDATA[
    ## Create temporary index for custom reference
    #if str($refGenomeSource.geneSource) == 'history':
        mkdir -p tempstargenomedir &&
        STAR
            --runMode genomeGenerate
            --genomeDir 'tempstargenomedir'
            --genomeFastaFiles '${refGenomeSource.genomeFastaFiles}'
            ## Handle difference between indices with/without annotations
            #if 'GTFconditional' in $refGenomeSource:
                ## GTFconditional exists only in STAR, but not STARsolo
                #if str($refGenomeSource.GTFconditional.GTFselect) == 'with-gtf':
                    --sjdbOverhang '${refGenomeSource.GTFconditional.sjdbOverhang}'
                    --sjdbGTFfile '${refGenomeSource.GTFconditional.sjdbGTFfile}'
                    #if str($refGenomeSource.GTFconditional.sjdbGTFfile.ext) == 'gff3':
                        --sjdbGTFtagExonParentTranscript Parent
                    #end if
                #end if
            #else:
                ## ref genome selection is less complex for STARsolo cause
                ## with-gtf is mandatory there
                --sjdbOverhang '${refGenomeSource.sjdbOverhang}'
                --sjdbGTFfile '${refGenomeSource.sjdbGTFfile}'
                #if str($refGenomeSource.sjdbGTFfile.ext) == 'gff3':
                    --sjdbGTFtagExonParentTranscript Parent
                #end if
            #end if
            #if str($refGenomeSource.genomeSAindexNbases):
                --genomeSAindexNbases ${refGenomeSource.genomeSAindexNbases}
            #end if
            --runThreadN \${GALAXY_SLOTS:-4}
        &&
    #end if
    ]]></token>
    <token name="@REFGENOMEHANDLING@" ><![CDATA[
    --runThreadN \${GALAXY_SLOTS:-4}
    --genomeLoad NoSharedMemory
    --genomeDir
    #if str($refGenomeSource.geneSource) == 'history':
        tempstargenomedir
    #else:
        '${refGenomeSource.GTFconditional.genomeDir.fields.path}'
        ## Handle difference between indices with/without annotations
        #if str($refGenomeSource.GTFconditional.GTFselect) == 'without-gtf':
            #if $refGenomeSource.GTFconditional.sjdbGTFfile:
                --sjdbOverhang $refGenomeSource.GTFconditional.sjdbOverhang
                --sjdbGTFfile '${refGenomeSource.GTFconditional.sjdbGTFfile}'
                #if str($refGenomeSource.GTFconditional.sjdbGTFfile.ext) == 'gff3':
                    --sjdbGTFtagExonParentTranscript Parent
                #end if
            #end if
        #end if
        #end if
        ]]></token>
    <xml name="ref_selection">
        <param argument="--genomeFastaFiles" type="data" format="fasta" label="Select a reference genome" />
        <!-- Currently, this parameter is not exposed in the wrapper,
             but used only in the tests to avoid excessive index sizes for
             the tiny test genomes. -->
        <param name="genomeSAindexNbases" type="hidden" value="" />
    </xml>
    <xml name="stdio" >
        <stdio>
            <regex match="FATAL error" source="both" level="fatal"/>
            <regex match="EXITING: FATAL INPUT ERROR:" source="both" level="fatal"/>
            <regex match="EXITING: fatal error trying to allocate genome arrays, exception thrown: std::bad_alloc" source="both" level="fatal"/>
            <regex match="\[sam_read1\] missing header\? Abort!" source="both" level="fatal"/>
            <yield />
        </stdio>
    </xml>
</macros>