/tools/ngs_rna/cuffdiff_wrapper.xml

https://bitbucket.org/cistrome/cistrome-harvard/ · XML · 238 lines · 196 code · 33 blank · 9 comment · 0 complexity · 67bd8b7a5d6b721b410abfa9d9df3f97 MD5 · raw file

  1. <tool id="cuffdiff" name="Cuffdiff" version="0.0.5">
  2. <!-- Wrapper supports Cuffdiff versions v1.0.0-v1.0.3 -->
  3. <description>find significant changes in transcript expression, splicing, and promoter use</description>
  4. <requirements>
  5. <requirement type="package">cufflinks</requirement>
  6. </requirements>
  7. <command interpreter="python">
  8. cuffdiff_wrapper.py
  9. --FDR=$fdr
  10. --num-threads="4"
  11. --min-alignment-count=$min_alignment_count
  12. --isoforms_fpkm_tracking_output=$isoforms_fpkm_tracking
  13. --genes_fpkm_tracking_output=$genes_fpkm_tracking
  14. --cds_fpkm_tracking_output=$cds_fpkm_tracking
  15. --tss_groups_fpkm_tracking_output=$tss_groups_fpkm_tracking
  16. --isoforms_exp_output=$isoforms_exp
  17. --genes_exp_output=$genes_exp
  18. --tss_groups_exp_output=$tss_groups_exp
  19. --cds_exp_fpkm_tracking_output=$cds_exp_fpkm_tracking
  20. --splicing_diff_output=$splicing_diff
  21. --cds_diff_output=$cds_diff
  22. --promoters_diff_output=$promoters_diff
  23. ## Set paired-end data parameters?
  24. #if $singlePaired.sPaired == "Yes":
  25. -m $singlePaired.mean_inner_distance
  26. -s $singlePaired.inner_distance_std_dev
  27. #end if
  28. ## Normalization?
  29. #if str($do_normalization) == "Yes":
  30. -N
  31. #end if
  32. ## Bias correction?
  33. #if $bias_correction.do_bias_correction == "Yes":
  34. -b
  35. #if $bias_correction.seq_source.index_source == "history":
  36. --ref_file=$bias_correction.seq_source.ref_file
  37. #else:
  38. --ref_file="None"
  39. #end if
  40. --dbkey=${gtf_input.metadata.dbkey}
  41. --index_dir=${GALAXY_DATA_INDEX_DIR}
  42. #end if
  43. ## Inputs.
  44. --inputA=$gtf_input
  45. #if $group_analysis.do_groups == "No":
  46. --input1=$aligned_reads1
  47. --input2=$aligned_reads2
  48. #else:
  49. ## Replicates.
  50. --labels
  51. #for $group in $group_analysis.groups
  52. ${group.group}
  53. #end for
  54. --files
  55. #for $group in $group_analysis.groups
  56. #for $file in $group.files:
  57. ${file.file}
  58. #end for
  59. ,
  60. #end for
  61. #end if
  62. </command>
  63. <inputs>
  64. <param format="gtf" name="gtf_input" type="data" label="Transcripts" help="A transcript GTF file produced by cufflinks, cuffcompare, or other source."/>
  65. <conditional name="group_analysis">
  66. <param name="do_groups" type="select" label="Perform replicate analysis" help="Perform cuffdiff with replicates in each group.">
  67. <option value="No">No</option>
  68. <option value="Yes">Yes</option>
  69. </param>
  70. <when value="Yes">
  71. <repeat name="groups" title="Group">
  72. <param name="group" title="Group name" type="text" label="Group name (no spaces or commas)"/>
  73. <repeat name="files" title="Replicate">
  74. <param name="file" label="Add file" type="data" format="sam,bam"/>
  75. </repeat>
  76. </repeat>
  77. </when>
  78. <when value="No">
  79. <param format="sam,bam" name="aligned_reads1" type="data" label="SAM or BAM file of aligned RNA-Seq reads" help=""/>
  80. <param format="sam,bam" name="aligned_reads2" type="data" label="SAM or BAM file of aligned RNA-Seq reads" help=""/>
  81. </when>
  82. </conditional>
  83. <param name="fdr" type="float" value="0.05" label="False Discovery Rate" help="The allowed false discovery rate."/>
  84. <param name="min_alignment_count" type="integer" value="1000" label="Min Alignment Count" help="The minimum number of alignments in a locus for needed to conduct significance testing on changes in that locus observed between samples."/>
  85. <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.">
  86. <option value="No">No</option>
  87. <option value="Yes">Yes</option>
  88. </param>
  89. <conditional name="bias_correction">
  90. <param name="do_bias_correction" type="select" label="Perform Bias Correction" help="Bias detection and correction can significantly improve accuracy of transcript abundance estimates.">
  91. <option value="Yes">Yes</option>
  92. <option value="No">No</option>
  93. </param>
  94. <when value="Yes">
  95. <conditional name="seq_source">
  96. <param name="index_source" type="select" label="Reference sequence data">
  97. <option value="cached">Locally cached</option>
  98. <option value="history">History</option>
  99. </param>
  100. <when value="cached"></when>
  101. <when value="history">
  102. <param name="ref_file" type="data" format="fasta" label="Using reference file" />
  103. </when>
  104. </conditional>
  105. </when>
  106. <when value="No"></when>
  107. </conditional>
  108. <conditional name="singlePaired">
  109. <param name="sPaired" type="select" label="Set Parameters for Paired-end Reads? (not recommended)">
  110. <option value="No">No</option>
  111. <option value="Yes">Yes</option>
  112. </param>
  113. <when value="No"></when>
  114. <when value="Yes">
  115. <param name="mean_inner_distance" type="integer" value="20" label="Mean Inner Distance between Mate Pairs"/>
  116. <param name="inner_distance_std_dev" type="integer" value="20" label="Standard Deviation for Inner Distance between Mate Pairs"/>
  117. </when>
  118. </conditional>
  119. </inputs>
  120. <outputs>
  121. <data format="tabular" name="splicing_diff" label="${tool.name} on ${on_string}: splicing differential expression testing"/>
  122. <data format="tabular" name="promoters_diff" label="${tool.name} on ${on_string}: promoters differential expression testing"/>
  123. <data format="tabular" name="cds_diff" label="${tool.name} on ${on_string}: CDS overloading diffential expression testing"/>
  124. <data format="tabular" name="cds_exp_fpkm_tracking" label="${tool.name} on ${on_string}: CDS FPKM differential expression testing"/>
  125. <data format="tabular" name="cds_fpkm_tracking" label="${tool.name} on ${on_string}: CDS FPKM tracking"/>
  126. <data format="tabular" name="tss_groups_exp" label="${tool.name} on ${on_string}: TSS groups differential expression testing"/>
  127. <data format="tabular" name="tss_groups_fpkm_tracking" label="${tool.name} on ${on_string}: TSS groups FPKM tracking" />
  128. <data format="tabular" name="genes_exp" label="${tool.name} on ${on_string}: gene differential expression testing"/>
  129. <data format="tabular" name="genes_fpkm_tracking" label="${tool.name} on ${on_string}: gene FPKM tracking"/>
  130. <data format="tabular" name="isoforms_exp" label="${tool.name} on ${on_string}: transcript differential expression testing"/>
  131. <data format="tabular" name="isoforms_fpkm_tracking" label="${tool.name} on ${on_string}: transcript FPKM tracking"/>
  132. </outputs>
  133. <tests>
  134. <test>
  135. <!--
  136. cuffdiff cuffcompare_out5.gtf cuffdiff_in1.sam cuffdiff_in2.sam
  137. -->
  138. <param name="gtf_input" value="cuffcompare_out5.gtf" ftype="gtf" />
  139. <param name="do_groups" value="No" />
  140. <param name="aligned_reads1" value="cuffdiff_in1.sam" ftype="sam" />
  141. <param name="aligned_reads2" value="cuffdiff_in2.sam" ftype="sam" />
  142. <!-- Defaults. -->
  143. <param name="fdr" value="0.05" />
  144. <param name="min_alignment_count" value="0" ftype="sam" />
  145. <param name="do_bias_correction" value="No" />
  146. <param name="do_normalization" value="No" />
  147. <param name="sPaired" value="single" ftype="sam" />
  148. <!--
  149. Line diffs are needed because cuffdiff does not produce deterministic output.
  150. TODO: can we find datasets that lead to deterministic behavior?
  151. -->
  152. <output name="splicing_diff" file="cuffdiff_out9.txt"/>
  153. <output name="promoters_diff" file="cuffdiff_out10.txt"/>
  154. <output name="cds_diff" file="cuffdiff_out11.txt"/>
  155. <output name="cds_exp_fpkm_tracking" file="cuffdiff_out4.txt"/>
  156. <output name="cds_fpkm_tracking" file="cuffdiff_out8.txt"/>
  157. <output name="tss_groups_exp" file="cuffdiff_out3.txt"/>
  158. <output name="tss_groups_fpkm_tracking" file="cuffdiff_out7.txt"/>
  159. <output name="genes_exp" file="cuffdiff_out2.txt" lines_diff="200"/>
  160. <output name="genes_fpkm_tracking" file="cuffdiff_out6.txt" lines_diff="200"/>
  161. <output name="isoforms_exp" file="cuffdiff_out1.txt" lines_diff="200"/>
  162. <output name="isoforms_fpkm_tracking" file="cuffdiff_out5.txt" lines_diff="200"/>
  163. </test>
  164. </tests>
  165. <help>
  166. **Cuffdiff Overview**
  167. Cuffdiff is part of Cufflinks_. Cuffdiff find significant changes in transcript expression, splicing, and promoter use. 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
  168. .. _Cufflinks: http://cufflinks.cbcb.umd.edu/
  169. ------
  170. **Know what you are doing**
  171. .. class:: warningmark
  172. There 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.
  173. .. __: http://cufflinks.cbcb.umd.edu/manual.html#cuffdiff
  174. ------
  175. **Input format**
  176. Cuffdiff takes Cufflinks or Cuffcompare GTF files as input along with two SAM files containing the fragment alignments for two or more samples.
  177. ------
  178. **Outputs**
  179. Cuffdiff produces many output files:
  180. 1. Transcript FPKM expression tracking.
  181. 2. Gene FPKM expression tracking; tracks the summed FPKM of transcripts sharing each gene_id
  182. 3. Primary transcript FPKM tracking; tracks the summed FPKM of transcripts sharing each tss_id
  183. 4. Coding sequence FPKM tracking; tracks the summed FPKM of transcripts sharing each p_id, independent of tss_id
  184. 5. Transcript differential FPKM.
  185. 6. Gene differential FPKM. Tests difference sin the summed FPKM of transcripts sharing each gene_id
  186. 7. Primary transcript differential FPKM. Tests difference sin the summed FPKM of transcripts sharing each tss_id
  187. 8. Coding sequence differential FPKM. Tests difference sin the summed FPKM of transcripts sharing each p_id independent of tss_id
  188. 9. Differential splicing tests: this tab delimited file lists, for each primary transcript, the amount of overloading detected among its isoforms, i.e. how much differential splicing exists between isoforms processed from a single primary transcript. Only primary transcripts from which two or more isoforms are spliced are listed in this file.
  189. 10. Differential promoter tests: this tab delimited file lists, for each gene, the amount of overloading detected among its primary transcripts, i.e. how much differential promoter use exists between samples. Only genes producing two or more distinct primary transcripts (i.e. multi-promoter genes) are listed here.
  190. 11. Differential CDS tests: this tab delimited file lists, for each gene, the amount of overloading detected among its coding sequences, i.e. how much differential CDS output exists between samples. Only genes producing two or more distinct CDS (i.e. multi-protein genes) are listed here.
  191. -------
  192. **Settings**
  193. All of the options have a default value. You can change any of them. Most of the options in Cuffdiff have been implemented here.
  194. ------
  195. **Cuffdiff parameter list**
  196. This is a list of implemented Cuffdiff options::
  197. -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.
  198. -s INT The standard deviation for the distribution on inner distances between mate pairs. The default is 20bp.
  199. -c INT The minimum number of alignments in a locus for needed to conduct significance testing on changes in that locus observed between samples. If no testing is performed, changes in the locus are deemed not significant, and the locus' observed changes don't contribute to correction for multiple testing. The default is 1,000 fragment alignments (up to 2,000 paired reads).
  200. --FDR FLOAT The allowed false discovery rate. The default is 0.05.
  201. --num-importance-samples INT Sets the number of importance samples generated for each locus during abundance estimation. Default: 1000
  202. --max-mle-iterations INT Sets the number of iterations allowed during maximum likelihood estimation of abundances. Default: 5000
  203. -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.
  204. </help>
  205. </tool>