Mercurial > repos > ieguinoa > tximport
comparison tximport.xml @ 0:2f5e9c0fe367 draft default tip
"planemo upload for repository https://github.com/ieguinoa/tximport-galaxy-wrapper commit 2bb25471c1320fb1206afa2c4daf536b6d6e275f-dirty"
author | ieguinoa |
---|---|
date | Wed, 09 Oct 2019 15:38:21 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:2f5e9c0fe367 |
---|---|
1 <tool name="tximport" id="tximport" version="0.1"> | |
2 <description> Summarize transcript-level estimates for gene-level analysis </description> | |
3 <requirements> | |
4 <requirement type="package">bioconductor-tximport</requirement> | |
5 <requirement type="package" version="1.34.1">bioconductor-genomicfeatures</requirement> | |
6 <requirement type="package" version="1.20.2">r-getopt</requirement> | |
7 <requirement type="package" version="0.2.20">r-rjson</requirement> | |
8 </requirements> | |
9 | |
10 <stdio> | |
11 <exit_code range="1:" level="fatal" description="Error code returned" /> | |
12 <regex match="is not TRUE" | |
13 source="both" | |
14 level="fatal" | |
15 description="Execution halted." /> | |
16 </stdio> | |
17 | |
18 <command> | |
19 <![CDATA[ | |
20 #import json | |
21 #if $gene_name_source_selector.gene_name_source == 'external_file': | |
22 #if $gene_name_source_selector.gff_source_selector.gff_source == 'history': | |
23 #if $gene_name_source_selector.gff_source_selector.gff_tx2gene_selector.mapping_file_option == 'gff_gtf': | |
24 ln -s '$gene_name_source_selector.gff_source_selector.gff_tx2gene_selector.own_gff' mapping.gff && | |
25 #else: | |
26 ln -s '$gene_name_source_selector.gff_source_selector.gff_tx2gene_selector.own_tx2gene' mapping.tab && | |
27 #end if | |
28 #end if | |
29 #end if | |
30 | |
31 Rscript '${__tool_directory__}/tximport.R' | |
32 --base_dir $__tool_directory__ | |
33 --format $input_source_selector.input_source | |
34 #if $input_source_selector.input_source == 'none': | |
35 --txIdCol $input_source_selector.tx_id_col | |
36 --abundanceCol $input_source_selector.abundance_col | |
37 --countsCol $input_source_selector.counts_col | |
38 --lengthCol $input_source_selector.length_col | |
39 #end if | |
40 #if $gene_name_source_selector.gene_name_source == 'gene_name_column_option': | |
41 --geneIdCol $gene_name_source_selector.gene_id_col | |
42 #else | |
43 #if $gene_name_source_selector.gff_source_selector.gff_source == "history": | |
44 #if $gene_name_source_selector.gff_source_selector.gff_tx2gene_selector.mapping_file_option == 'tx2gene': | |
45 --tx2gene mapping.tab | |
46 #else | |
47 --gff_file mapping.gff | |
48 #end if | |
49 #else: | |
50 --tx2gene $gene_name_source_selector.gff_source_selector.tx2gene.fields.path | |
51 #end if | |
52 #end if | |
53 | |
54 --countsFromAbundance $counts_from_abundance | |
55 #set $count_files = list() | |
56 #for $file in $counts_file: | |
57 #set $filename_to_element_identifiers = {} | |
58 $filename_to_element_identifiers.__setitem__('id',str($file.element_identifier)) | |
59 $filename_to_element_identifiers.__setitem__('path',str($file)) | |
60 $count_files.append(filename_to_element_identifiers) | |
61 #end for | |
62 #set $samples_dict = {} | |
63 $samples_dict.__setitem__('samples',$count_files) | |
64 --countsFiles '#echo json.dumps(samples_dict)#' | |
65 --out_file '${gene_level_values}' | |
66 | |
67 ]]></command> | |
68 | |
69 | |
70 | |
71 <inputs> | |
72 <conditional name="input_source_selector"> | |
73 <param name="input_source" type ="select" label="Select the source of the quantification file"> | |
74 <option value="salmon" selected="True">Salmon</option> | |
75 <option value="sailfish">Sailfish</option> | |
76 <option value="alevin">Alevin</option> | |
77 <option value="kallisto">Kallisto</option> | |
78 <option value="rsem">RSEM</option> | |
79 <option value="stringtie">Stringtie</option> | |
80 <option value="none">Custom format (specify the columns)</option> | |
81 </param> | |
82 <when value="none"> | |
83 <param name="tx_id_col" type="text" label="Name of the txID columns"/> | |
84 <param name="abundance_col" type="text" label="Name of the abundance column"/> | |
85 <param name="counts_col" type="text" label="Name of the counts column"/> | |
86 <param name="length_col" type="text" label="Name of the length column"/> | |
87 </when> | |
88 <when value="salmon"/> | |
89 <when value="sailfish"/> | |
90 <when value="alevin"/> | |
91 <when value="kallisto"/> | |
92 <when value="rsem"/> | |
93 <when value="stringtie"/> | |
94 </conditional> | |
95 <conditional name="gene_name_source_selector" > | |
96 <param name="gene_name_source" type="select" label="Is the gene name part of the counts file or will be obtained from an external file?"> | |
97 <option value="external_file" selected="True">Use an external file to map transcript to gene names</option> | |
98 <option value="gene_name_column_option">Gene name is a column of the input file</option> | |
99 </param> | |
100 <when value="gene_name_column_option"> | |
101 <param name="gene_name_column" type="text" label="Name of the column containing the geneID"/> | |
102 </when> | |
103 <when value="external_file"> | |
104 <conditional name="gff_source_selector"> | |
105 <param name="gff_source" type="select" label="Select a GFF from your history or use a built-in file?"> | |
106 <option value="built-in" selected="True">Use a built-in file</option> | |
107 <option value="history" >Use one from the history</option> | |
108 </param> | |
109 <when value="built-in"> | |
110 <param name="tx2gene" type="select" label="Select an annotation version" help="If the build of your interest is not listed contact your Galaxy admin"> | |
111 <options from_data_table="tx2gene_table"> | |
112 <filter type="sort_by" column="1"/> | |
113 <validator type="no_options" message="No files are available for the selected input dataset"/> | |
114 </options> | |
115 </param> | |
116 </when> | |
117 <when value="history"> | |
118 <conditional name="gff_tx2gene_selector"> | |
119 <param name="mapping_file_option" type="select" label="Will you provide a tx2gene or a GFF/GTF file?"> | |
120 <option value="tx2gene" selected="True">TranscriptID to GeneID table</option> | |
121 <option value="gff_gtf">GTF/GFF file</option> | |
122 </param> | |
123 <when value="gff_gtf"> | |
124 <param name="own_gff" type="data" format="gff" label="Select your GFF file"/> | |
125 </when> | |
126 <when value="tx2gene"> | |
127 <param name="own_tx2gene" type="data" format="tabular" label="Select your TranscriptID to GeneID table file"/> | |
128 </when> | |
129 </conditional> | |
130 </when> | |
131 </conditional> | |
132 </when> | |
133 </conditional> | |
134 <param name="counts_from_abundance" type="select" label="Summarization using the abundance (TPM) values?"> | |
135 <option value="no">No</option> | |
136 <option value="scaled_TPM">Scaled up to library size</option> | |
137 <option value="length_scaled_TPM">Scaled using the avg. transcript legth over samples and then the library size</option> | |
138 <option value="dtu_scaled_TPM">Scaled using the median transcript length among isoforms of a gene, and then the library size</option> | |
139 </param> | |
140 <param name="counts_file" type="data" format="tabular" multiple="true" label="Counts file(s)"/> | |
141 </inputs> | |
142 | |
143 | |
144 <outputs> | |
145 <data format="tabular" name="gene_level_values" label="Gene level summarization on ${on_string}"/> | |
146 </outputs> | |
147 | |
148 | |
149 <tests> | |
150 <test> | |
151 <param name="input_source" value="salmon"/> | |
152 <param name="gene_name_source" value="external_file"/> | |
153 <param name="counts_from_abundance" value="no"/> | |
154 <param name="gff_source" value="history"/> | |
155 <param name="mapping_file_option" value="tx2gene"/> | |
156 <param name="own_tx2gene" value="tx2gene.tab"/> | |
157 <param name="counts_file" value="salmon_sample2.tab,salmon_sample1.tab" /> | |
158 <output name="gene_level_values"> | |
159 <assert_contents> | |
160 <has_text_matching expression="salmon_sample2.tab\tsalmon_sample1.tab" /> | |
161 <has_text_matching expression="AT1G01010\t156\t156" /> | |
162 </assert_contents> | |
163 </output> | |
164 </test> | |
165 <test> | |
166 <param name="input_source" value="salmon"/> | |
167 <param name="gene_name_source" value="external_file"/> | |
168 <param name="counts_from_abundance" value="no"/> | |
169 <param name="gff_source" value="history"/> | |
170 <param name="mapping_file_option" value="gff_gtf"/> | |
171 <param name="own_gff" value="Araport11_subset.gff3"/> | |
172 <param name="counts_file" value="salmon_sample2.tab,salmon_sample1.tab" /> | |
173 <output name="gene_level_values"> | |
174 <assert_contents> | |
175 <has_text_matching expression="salmon_sample2.tab\tsalmon_sample1.tab" /> | |
176 <has_text_matching expression="AT1G01010\t156\t156" /> | |
177 </assert_contents> | |
178 </output> | |
179 </test> | |
180 <test> | |
181 <param name="input_source" value="salmon"/> | |
182 <param name="gene_name_source" value="external_file"/> | |
183 <param name="counts_from_abundance" value="no"/> | |
184 <param name="gff_source" value="built-in"/> | |
185 <param name="tx2gene" value="Ath_Araport11_subset"/> | |
186 <param name="counts_file" value="salmon_sample2.tab,salmon_sample1.tab" /> | |
187 <output name="gene_level_values"> | |
188 <assert_contents> | |
189 <has_text_matching expression="salmon_sample2.tab\tsalmon_sample1.tab" /> | |
190 <has_text_matching expression="AT1G01010\t156\t156" /> | |
191 </assert_contents> | |
192 </output> | |
193 </test> | |
194 <!-- Test input with custom format --> | |
195 <test> | |
196 <param name="input_source" value="none"/> | |
197 <param name="tx_id_col" value="Transcript_id_here"/> | |
198 <param name="abundance_col" value="Abundance_goes_here"/> | |
199 <param name="counts_col" value="Here_goes_the_counts"/> | |
200 <param name="length_col" value="Here_goes_the_length"/> | |
201 <param name="counts_from_abundance" value="no"/> | |
202 <param name="gff_source" value="built-in"/> | |
203 <param name="tx2gene" value="Ath_Araport11_subset"/> | |
204 <param name="counts_file" value="custom_sample.tab" /> | |
205 <output name="gene_level_values"> | |
206 <assert_contents> | |
207 <has_text_matching expression="custom_sample.tab" /> | |
208 <has_text_matching expression="AT1G01010\t156" /> | |
209 </assert_contents> | |
210 </output> | |
211 | |
212 </test> | |
213 | |
214 </tests> | |
215 <help> | |
216 | |
217 .. class:: infomark | |
218 | |
219 Current version only works in 'merge' mode: A single table of gene summarizations is generated with one column for each sample file. | |
220 Take into account that DEseq2 package in Galaxy requires one table per sample. | |
221 </help> | |
222 | |
223 <citations> | |
224 <citation type="doi">doi:10.18129/B9.bioc.tximport</citation> | |
225 </citations> | |
226 | |
227 </tool> | |
228 |