/tools/ngs_rna/cufflinks_wrapper.xml
XML | 222 lines | 179 code | 39 blank | 4 comment | 0 complexity | 1c8cd606faa61e34adddde73efa80e01 MD5 | raw file
1<tool id="cufflinks" name="Cufflinks" version="0.0.5">
2 <!-- Wrapper supports Cufflinks versions v1.0.0-v1.0.3 -->
3 <description>transcript assembly and FPKM (RPKM) estimates for RNA-Seq data</description>
4 <requirements>
5 <requirement type="package">cufflinks</requirement>
6 </requirements>
7 <command interpreter="python">
8 cufflinks_wrapper.py
9 --input=$input
10 --assembled-isoforms-output=$assembled_isoforms
11 --num-threads="4"
12 -I $max_intron_len
13 -F $min_isoform_fraction
14 -j $pre_mrna_fraction
15
16 ## Include reference annotation?
17 #if $reference_annotation.use_ref == "Use reference annotation":
18 -G $reference_annotation.reference_annotation_file
19 #end if
20 #if $reference_annotation.use_ref == "Use reference annotation guide":
21 -g $reference_annotation.reference_annotation_guide_file
22 #end if
23
24 ## Set paired-end parameters?
25 #if $singlePaired.sPaired == "Yes":
26 -m $singlePaired.mean_inner_distance
27 -s $singlePaired.inner_distance_std_dev
28 #end if
29
30 ## Normalization?
31 #if str($do_normalization) == "Yes":
32 -N
33 #end if
34
35 ## Bias correction?
36 #if $bias_correction.do_bias_correction == "Yes":
37 -b
38 #if $bias_correction.seq_source.index_source == "history":
39 --ref_file=$bias_correction.seq_source.ref_file
40 #else:
41 --ref_file="None"
42 #end if
43 --dbkey=${input.metadata.dbkey}
44 --index_dir=${GALAXY_DATA_INDEX_DIR}
45 #end if
46 </command>
47 <inputs>
48 <param format="sam,bam" name="input" type="data" label="SAM or BAM file of aligned RNA-Seq reads" help=""/>
49 <param name="max_intron_len" type="integer" value="300000" min="1" max="600000" label="Max Intron Length" help=""/>
50 <param name="min_isoform_fraction" type="float" value="0.05" min="0" max="1" label="Min Isoform Fraction" help=""/>
51 <param name="pre_mrna_fraction" type="float" value="0.05" min="0" max="1" label="Pre MRNA Fraction" help=""/>
52 <param name="do_normalization" type="select" label="Perform quartile normalization" help="Removes top 25% of genes from FPKM denominator to improve accuracy of differential expression calls for low abundance transcripts.">
53 <option value="No">No</option>
54 <option value="Yes">Yes</option>
55 </param>
56 <conditional name="reference_annotation">
57 <param name="use_ref" type="select" label="Use Reference Annotation">
58 <option value="No">No</option>
59 <option value="Use reference annotation">Use reference annotation</option>
60 <option value="Use reference annotation guide">Use reference annotation as guide</option>
61 </param>
62 <when value="No"></when>
63 <when value="Use reference annotation">
64 <param format="gff3,gtf" name="reference_annotation_file" type="data" label="Reference Aonnotation" help="Make sure your annotation file is in GTF format and that Galaxy knows that your file is GTF--not GFF."/>
65 </when>
66 <when value="Use reference annotation guide">
67 <param format="gff3,gtf" name="reference_annotation_guide_file" type="data" label="Reference Aonnotation" help="Make sure your annotation file is in GTF format and that Galaxy knows that your file is GTF--not GFF."/>
68 </when>
69 </conditional>
70 <conditional name="bias_correction">
71 <param name="do_bias_correction" type="select" label="Perform Bias Correction" help="Bias detection and correction can significantly improve accuracy of transcript abundance estimates.">
72 <option value="No">No</option>
73 <option value="Yes">Yes</option>
74 </param>
75 <when value="Yes">
76 <conditional name="seq_source">
77 <param name="index_source" type="select" label="Reference sequence data">
78 <option value="cached">Locally cached</option>
79 <option value="history">History</option>
80 </param>
81 <when value="cached"></when>
82 <when value="history">
83 <param name="ref_file" type="data" format="fasta" label="Using reference file" />
84 </when>
85 </conditional>
86 </when>
87 <when value="No"></when>
88 </conditional>
89 <conditional name="singlePaired">
90 <param name="sPaired" type="select" label="Set Parameters for Paired-end Reads? (not recommended)">
91 <option value="No">No</option>
92 <option value="Yes">Yes</option>
93 </param>
94 <when value="No"></when>
95 <when value="Yes">
96 <param name="mean_inner_distance" type="integer" value="20" label="Mean Inner Distance between Mate Pairs"/>
97 <param name="inner_distance_std_dev" type="integer" value="20" label="Standard Deviation for Inner Distance between Mate Pairs"/>
98 </when>
99 </conditional>
100 </inputs>
101
102 <outputs>
103 <data format="tabular" name="genes_expression" label="${tool.name} on ${on_string}: gene expression" from_work_dir="genes.fpkm_tracking"/>
104 <data format="tabular" name="transcripts_expression" label="${tool.name} on ${on_string}: transcript expression" from_work_dir="isoforms.fpkm_tracking"/>
105 <data format="gtf" name="assembled_isoforms" label="${tool.name} on ${on_string}: assembled transcripts"/>
106 </outputs>
107
108 <trackster_conf/>
109 <tests>
110 <!--
111 Simple test that uses test data included with cufflinks.
112 -->
113 <test>
114 <param name="sPaired" value="No"/>
115 <param name="input" value="cufflinks_in.bam"/>
116 <param name="max_intron_len" value="300000"/>
117 <param name="min_isoform_fraction" value="0.05"/>
118 <param name="pre_mrna_fraction" value="0.05"/>
119 <param name="use_ref" value="No"/>
120 <param name="do_normalization" value="No" />
121 <param name="do_bias_correction" value="No"/>
122 <output name="genes_expression" format="tabular" lines_diff="2" file="cufflinks_out3.fpkm_tracking"/>
123 <output name="transcripts_expression" format="tabular" lines_diff="2" file="cufflinks_out2.fpkm_tracking"/>
124 <output name="assembled_isoforms" file="cufflinks_out1.gtf"/>
125 </test>
126 </tests>
127
128 <help>
129**Cufflinks Overview**
130
131Cufflinks_ assembles transcripts, estimates their abundances, and tests for differential expression and regulation in RNA-Seq samples. It accepts aligned RNA-Seq reads and assembles the alignments into a parsimonious set of transcripts. Cufflinks then estimates the relative abundances of these transcripts based on how many reads support each one. Please cite: Trapnell C, Williams BA, Pertea G, Mortazavi AM, Kwan G, van Baren MJ, Salzberg SL, Wold B, Pachter L. Transcript assembly and abundance estimation from RNA-Seq reveals thousands of new transcripts and switching among isoforms. Nature Biotechnology doi:10.1038/nbt.1621
132
133.. _Cufflinks: http://cufflinks.cbcb.umd.edu/
134
135------
136
137**Know what you are doing**
138
139.. class:: warningmark
140
141There is no such thing (yet) as an automated gearshift in expression analysis. It is all like stick-shift driving in San Francisco. In other words, running this tool with default parameters will probably not give you meaningful results. A way to deal with this is to **understand** the parameters by carefully reading the `documentation`__ and experimenting. Fortunately, Galaxy makes experimenting easy.
142
143.. __: http://cufflinks.cbcb.umd.edu/manual.html
144
145------
146
147**Input formats**
148
149Cufflinks takes a text file of SAM alignments as input. The RNA-Seq read mapper TopHat produces output in this format, and is recommended for use with Cufflinks. However Cufflinks will accept SAM alignments generated by any read mapper. Here's an example of an alignment Cufflinks will accept::
150
151 s6.25mer.txt-913508 16 chr1 4482736 255 14M431N11M * 0 0 \
152 CAAGATGCTAGGCAAGTCTTGGAAG IIIIIIIIIIIIIIIIIIIIIIIII NM:i:0 XS:A:-
153
154Note the use of the custom tag XS. This attribute, which must have a value of "+" or "-", indicates which strand the RNA that produced this read came from. While this tag can be applied to any alignment, including unspliced ones, it must be present for all spliced alignment records (those with a 'N' operation in the CIGAR string).
155The SAM file supplied to Cufflinks must be sorted by reference position. If you aligned your reads with TopHat, your alignments will be properly sorted already. If you used another tool, you may want to make sure they are properly sorted as follows::
156
157 sort -k 3,3 -k 4,4n hits.sam > hits.sam.sorted
158
159NOTE: Cufflinks currently only supports SAM alignments with the CIGAR match ('M') and reference skip ('N') operations. Support for the other operations, such as insertions, deletions, and clipping, will be added in the future.
160
161------
162
163**Outputs**
164
165Cufflinks produces three output files:
166
167Transcripts and Genes:
168
169This GTF file contains Cufflinks' assembled isoforms. The first 7 columns are standard GTF, and the last column contains attributes, some of which are also standardized (e.g. gene_id, transcript_id). There one GTF record per row, and each record represents either a transcript or an exon within a transcript. The columns are defined as follows::
170
171 Column number Column name Example Description
172 -----------------------------------------------------
173 1 seqname chrX Chromosome or contig name
174 2 source Cufflinks The name of the program that generated this file (always 'Cufflinks')
175 3 feature exon The type of record (always either "transcript" or "exon").
176 4 start 77696957 The leftmost coordinate of this record (where 0 is the leftmost possible coordinate)
177 5 end 77712009 The rightmost coordinate of this record, inclusive.
178 6 score 77712009 The most abundant isoform for each gene is assigned a score of 1000. Minor isoforms are scored by the ratio (minor FPKM/major FPKM)
179 7 strand + Cufflinks' guess for which strand the isoform came from. Always one of '+', '-' '.'
180 7 frame . Cufflinks does not predict where the start and stop codons (if any) are located within each transcript, so this field is not used.
181 8 attributes See below
182
183Each GTF record is decorated with the following attributes::
184
185 Attribute Example Description
186 -----------------------------------------
187 gene_id CUFF.1 Cufflinks gene id
188 transcript_id CUFF.1.1 Cufflinks transcript id
189 FPKM 101.267 Isoform-level relative abundance in Reads Per Kilobase of exon model per Million mapped reads
190 frac 0.7647 Reserved. Please ignore, as this attribute may be deprecated in the future
191 conf_lo 0.07 Lower bound of the 95% confidence interval of the abundance of this isoform, as a fraction of the isoform abundance. That is, lower bound = FPKM * (1.0 - conf_lo)
192 conf_hi 0.1102 Upper bound of the 95% confidence interval of the abundance of this isoform, as a fraction of the isoform abundance. That is, upper bound = FPKM * (1.0 + conf_lo)
193 cov 100.765 Estimate for the absolute depth of read coverage across the whole transcript
194
195
196Transcripts only:
197 This file is simply a tab delimited file containing one row per transcript and with columns containing the attributes above. There are a few additional attributes not in the table above, but these are reserved for debugging, and may change or disappear in the future.
198
199Genes only:
200This file contains gene-level coordinates and expression values.
201
202-------
203
204**Cufflinks settings**
205
206All of the options have a default value. You can change any of them. Most of the options in Cufflinks have been implemented here.
207
208------
209
210**Cufflinks parameter list**
211
212This is a list of implemented Cufflinks options::
213
214 -m INT This is the expected (mean) inner distance between mate pairs. For, example, for paired end runs with fragments selected at 300bp, where each end is 50bp, you should set -r to be 200. The default is 45bp.
215 -s INT The standard deviation for the distribution on inner distances between mate pairs. The default is 20bp.
216 -I INT The minimum intron length. Cufflinks will not report transcripts with introns longer than this, and will ignore SAM alignments with REF_SKIP CIGAR operations longer than this. The default is 300,000.
217 -F After calculating isoform abundance for a gene, Cufflinks filters out transcripts that it believes are very low abundance, because isoforms expressed at extremely low levels often cannot reliably be assembled, and may even be artifacts of incompletely spliced precursors of processed transcripts. This parameter is also used to filter out introns that have far fewer spliced alignments supporting them. The default is 0.05, or 5% of the most abundant isoform (the major isoform) of the gene.
218 -j Some RNA-Seq protocols produce a significant amount of reads that originate from incompletely spliced transcripts, and these reads can confound the assembly of fully spliced mRNAs. Cufflinks uses this parameter to filter out alignments that lie within the intronic intervals implied by the spliced alignments. The minimum depth of coverage in the intronic region covered by the alignment is divided by the number of spliced reads, and if the result is lower than this parameter value, the intronic alignments are ignored. The default is 5%.
219 -G Tells Cufflinks to use the supplied reference annotation to estimate isoform expression. It will not assemble novel transcripts, and the program will ignore alignments not structurally compatible with any reference transcript.
220 -N With this option, Cufflinks excludes the contribution of the top 25 percent most highly expressed genes from the number of mapped fragments used in the FPKM denominator. This can improve robustness of differential expression calls for less abundant genes and transcripts.
221 </help>
222</tool>