Mercurial > repos > dave > rgrnastar
comparison macros.xml @ 0:c4769d5e5c2b draft default tip
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/rgrnastar commit 9db648ed931f0243c8ce6fe21fff9a06040fcc30-dirty"
| author | dave |
|---|---|
| date | Thu, 30 Jul 2020 14:36:52 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:c4769d5e5c2b |
|---|---|
| 1 <macros> | |
| 2 <!-- REMEMBER to bump the version of rna_star_index_builder_data_manager | |
| 3 whenever you make changes to the following two version tokens! | |
| 4 The data manager uses a symlink to this macro file to keep the STAR and | |
| 5 the index versions in sync, but you should manually adjust the +galaxy | |
| 6 version number. --> | |
| 7 <!-- STAR version to be used --> | |
| 8 <token name="@VERSION@">2.7.5a</token> | |
| 9 <!-- STAR index version compatible with this version of STAR | |
| 10 This is the STAR version that introduced the index structure expected | |
| 11 by the current version. | |
| 12 It can be found for any specific version of STAR with: | |
| 13 STAR -h | grep versionGenome | |
| 14 or by looking for the versionGenome parameter in source/parametersDefault | |
| 15 of STAR's source code --> | |
| 16 <token name="@IDX_VERSION@">2.7.4a</token> | |
| 17 <token name="@IDX_DATA_TABLE@">rnastar_index2x_versioned</token> | |
| 18 | |
| 19 <xml name="requirements"> | |
| 20 <requirements> | |
| 21 <requirement type="package" version="@VERSION@">star</requirement> | |
| 22 <requirement type="package" version="1.9">samtools</requirement> | |
| 23 <yield /> | |
| 24 </requirements> | |
| 25 </xml> | |
| 26 | |
| 27 <xml name="index_selection" token_with_gene_model="0"> | |
| 28 <param argument="--genomeDir" name="genomeDir" type="select" | |
| 29 label="Select reference genome" | |
| 30 help="If your genome of interest is not listed, contact the Galaxy team"> | |
| 31 <options from_data_table="@IDX_DATA_TABLE@"> | |
| 32 <filter type="static_value" column="4" value="@WITH_GENE_MODEL@" /> | |
| 33 <filter type="static_value" column="5" value="@IDX_VERSION@" /> | |
| 34 <filter type="sort_by" column="2" /> | |
| 35 <validator type="no_options" message="No indexes are available for the selected input dataset" /> | |
| 36 </options> | |
| 37 </param> | |
| 38 </xml> | |
| 39 | |
| 40 <token name="@FASTQ_GZ_OPTION@"> | |
| 41 --readFilesCommand zcat | |
| 42 </token> | |
| 43 <xml name="citations"> | |
| 44 <citations> | |
| 45 <citation type="doi">10.1093/bioinformatics/bts635</citation> | |
| 46 </citations> | |
| 47 </xml> | |
| 48 <xml name="@SJDBOPTIONS@" token_optional="true"> | |
| 49 <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"/> | |
| 50 <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"/> | |
| 51 </xml> | |
| 52 <xml name="dbKeyActions"> | |
| 53 <actions> | |
| 54 <conditional name="refGenomeSource.geneSource"> | |
| 55 <when value="indexed"> | |
| 56 <action type="metadata" name="dbkey"> | |
| 57 <option type="from_data_table" name="@IDX_DATA_TABLE@" column="1" offset="0"> | |
| 58 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/> | |
| 59 <filter type="param_value" ref="refGenomeSource.GTFconditional.genomeDir" column="0"/> | |
| 60 </option> | |
| 61 </action> | |
| 62 </when> | |
| 63 <when value="history"> | |
| 64 <action type="metadata" name="dbkey"> | |
| 65 <option type="from_param" name="refGenomeSource.genomeFastaFiles" param_attribute="dbkey" /> | |
| 66 </action> | |
| 67 </when> | |
| 68 </conditional> | |
| 69 </actions> | |
| 70 </xml> | |
| 71 <token name="@TEMPINDEX@"><![CDATA[ | |
| 72 ## Create temporary index for custom reference | |
| 73 #if str($refGenomeSource.geneSource) == 'history': | |
| 74 mkdir -p tempstargenomedir && | |
| 75 STAR | |
| 76 --runMode genomeGenerate | |
| 77 --genomeDir 'tempstargenomedir' | |
| 78 --genomeFastaFiles '${refGenomeSource.genomeFastaFiles}' | |
| 79 ## Handle difference between indices with/without annotations | |
| 80 #if str($refGenomeSource.GTFconditional.GTFselect) == 'with-gtf': | |
| 81 --sjdbOverhang '${refGenomeSource.GTFconditional.sjdbOverhang}' | |
| 82 --sjdbGTFfile '${refGenomeSource.GTFconditional.sjdbGTFfile}' | |
| 83 #if str($refGenomeSource.GTFconditional.sjdbGTFfile.ext) == 'gff3': | |
| 84 --sjdbGTFtagExonParentTranscript Parent | |
| 85 #end if | |
| 86 #end if | |
| 87 #if str($refGenomeSource.genomeSAindexNbases): | |
| 88 --genomeSAindexNbases ${refGenomeSource.genomeSAindexNbases} | |
| 89 #end if | |
| 90 --runThreadN \${GALAXY_SLOTS:-4} | |
| 91 && | |
| 92 #end if | |
| 93 ]]></token> | |
| 94 <token name="@REFGENOMEHANDLING@" ><![CDATA[ | |
| 95 --runThreadN \${GALAXY_SLOTS:-4} | |
| 96 --genomeLoad NoSharedMemory | |
| 97 --genomeDir | |
| 98 #if str($refGenomeSource.geneSource) == 'history': | |
| 99 tempstargenomedir | |
| 100 #else: | |
| 101 '${refGenomeSource.GTFconditional.genomeDir.fields.path}' | |
| 102 ## Handle difference between indices with/without annotations | |
| 103 #if str($refGenomeSource.GTFconditional.GTFselect) == 'without-gtf': | |
| 104 #if $refGenomeSource.GTFconditional.sjdbGTFfile: | |
| 105 --sjdbOverhang $refGenomeSource.GTFconditional.sjdbOverhang | |
| 106 --sjdbGTFfile '${refGenomeSource.GTFconditional.sjdbGTFfile}' | |
| 107 #if str($refGenomeSource.GTFconditional.sjdbGTFfile.ext) == 'gff3': | |
| 108 --sjdbGTFtagExonParentTranscript Parent | |
| 109 #end if | |
| 110 #end if | |
| 111 #end if | |
| 112 #end if | |
| 113 ]]></token> | |
| 114 <xml name="stdio" > | |
| 115 <stdio> | |
| 116 <regex match="FATAL error" source="both" level="fatal"/> | |
| 117 <regex match="EXITING: FATAL INPUT ERROR:" source="both" level="fatal"/> | |
| 118 <regex match="EXITING: fatal error trying to allocate genome arrays, exception thrown: std::bad_alloc" source="both" level="fatal"/> | |
| 119 <regex match="\[sam_read1\] missing header\? Abort!" source="both" level="fatal"/> | |
| 120 <yield /> | |
| 121 </stdio> | |
| 122 </xml> | |
| 123 <xml name="refgenomehandling" > | |
| 124 <conditional name="refGenomeSource"> | |
| 125 <param name="geneSource" type="select" label="Custom or built-in reference genome" help="Built-ins were indexed using default options"> | |
| 126 <option value="indexed" selected="true">Use a built-in index</option> | |
| 127 <option value="history">Use reference genome from history and create temporary index</option> | |
| 128 </param> | |
| 129 <when value="indexed"> | |
| 130 <conditional name="GTFconditional"> | |
| 131 <param name="GTFselect" type="select" | |
| 132 label="Reference genome with or without an annotation" | |
| 133 help="Select the '... with builtin gene-model' option to select from the list of available indexes that were built with splice junction information. Select the '... without builtin gene-model' option to select from the list of available indexes without annotated splice junctions."> | |
| 134 <option value="without-gtf" selected='true'>use genome reference without builtin gene-model</option> | |
| 135 <option value="with-gtf">use genome reference with builtin gene-model</option> | |
| 136 </param> | |
| 137 <when value="with-gtf"> | |
| 138 <expand macro="index_selection" with_gene_model="1" /> | |
| 139 </when> | |
| 140 <when value="without-gtf"> | |
| 141 <expand macro="index_selection" with_gene_model="0" /> | |
| 142 <expand macro="@SJDBOPTIONS@" /> | |
| 143 </when> | |
| 144 </conditional> | |
| 145 </when> | |
| 146 <when value="history"> | |
| 147 <param argument="--genomeFastaFiles" type="data" format="fasta" label="Select a reference genome" /> | |
| 148 <!-- Currently, this parameter is not exposed in the wrapper, | |
| 149 but used only in the tests to avoid excessive index sizes for | |
| 150 the tiny test genomes. --> | |
| 151 <param name="genomeSAindexNbases" type="hidden" value="" /> | |
| 152 <conditional name="GTFconditional"> | |
| 153 <param name="GTFselect" type="select" | |
| 154 label="Build index with our without known splice junctions annotation" | |
| 155 help="To build an index with known splice junctions annotated, you will have to provide a GTF or GFF3 dataset that describes the gene models (the location of genes, transcripts and exons) known for the reference genome."> | |
| 156 <option value="without-gtf">build index without gene-model</option> | |
| 157 <option value="with-gtf">build index with gene-model</option> | |
| 158 </param> | |
| 159 <when value="with-gtf"> | |
| 160 <expand macro="@SJDBOPTIONS@" optional="false"/> | |
| 161 </when> | |
| 162 <when value="without-gtf" /> | |
| 163 </conditional> | |
| 164 </when> | |
| 165 </conditional> | |
| 166 </xml> | |
| 167 </macros> |
