Find splice junctions using RNA-seq data tophat tophat_wrapper.py ## Change this to accomodate the number of threads you have available. --num-threads="4" ## Provide outputs. --coverage-output=$coverage --junctions-output=$junctions --hits-output=$accepted_hits ## Handle reference file. #if $refGenomeSource.genomeSource == "history": --own-file=$refGenomeSource.ownFile --indexes-path="None" #else: --own-file="None" --indexes-path=$refGenomeSource.index #end if ## Are reads single-end or paired? --single-paired=$singlePaired.sPaired ## First input file always required. --input1=$singlePaired.input1 ## Set parms based on whether reads are single-end or paired. #if $singlePaired.sPaired == "single": --input2="None" -r "None" --settings=$singlePaired.sParams.sSettingsType #if $singlePaired.sParams.sSettingsType == "full": --mate-std-dev="None" -a $singlePaired.sParams.anchor_length -m $singlePaired.sParams.splice_mismatches -i $singlePaired.sParams.min_intron_length -I $singlePaired.sParams.max_intron_length -F $singlePaired.sParams.junction_filter -g $singlePaired.sParams.max_multihits --min-segment-intron $singlePaired.sParams.min_segment_intron --max-segment-intron $singlePaired.sParams.max_segment_intron --seg-mismatches=$singlePaired.sParams.seg_mismatches --seg-length=$singlePaired.sParams.seg_length #if $singlePaired.sParams.closure_search.use_search == "Yes": --closure-search --min-closure-exon $singlePaired.sParams.closure_search.min_closure_exon --min-closure-intron $singlePaired.sParams.closure_search.min_closure_intron --max-closure-intron $singlePaired.sParams.closure_search.max_closure_intron #else: --no-closure-search #end if #if $singlePaired.sParams.coverage_search.use_search == "Yes": --coverage-search --min-coverage-intron $singlePaired.sParams.coverage_search.min_coverage_intron --max-coverage-intron $singlePaired.sParams.coverage_search.max_coverage_intron #else: --no-coverage-search #end if ## No idea why the type conversion is necessary, but it seems to be. #if str ($singlePaired.sParams.microexon_search) == "Yes": --microexon-search #end if #end if #else: --input2=$singlePaired.input2 -r $singlePaired.mate_inner_distance --settings=$singlePaired.pParams.pSettingsType #if $singlePaired.pParams.pSettingsType == "full": --mate-std-dev=$singlePaired.pParams.mate_std_dev -a $singlePaired.pParams.anchor_length -m $singlePaired.pParams.splice_mismatches -i $singlePaired.pParams.min_intron_length -I $singlePaired.pParams.max_intron_length -F $singlePaired.pParams.junction_filter -g $singlePaired.pParams.max_multihits --min-segment-intron $singlePaired.pParams.min_segment_intron --max-segment-intron $singlePaired.pParams.max_segment_intron --seg-mismatches=$singlePaired.pParams.seg_mismatches --seg-length=$singlePaired.pParams.seg_length #if $singlePaired.pParams.closure_search.use_search == "Yes": --closure-search --min-closure-exon $singlePaired.pParams.closure_search.min_closure_exon --min-closure-intron $singlePaired.pParams.closure_search.min_closure_intron --max-closure-intron $singlePaired.pParams.closure_search.max_closure_intron #else: --no-closure-search #end if #if $singlePaired.pParams.coverage_search.use_search == "Yes": --coverage-search --min-coverage-intron $singlePaired.pParams.coverage_search.min_coverage_intron --max-coverage-intron $singlePaired.pParams.coverage_search.max_coverage_intron #else: --no-coverage-search #end if ## No idea why the type conversion is necessary, but it seems to be. #if str ($singlePaired.pParams.microexon_search) == "Yes": --microexon-search #end if #end if #end if **Tophat Overview** TopHat_ is a fast splice junction mapper for RNA-Seq reads. It aligns RNA-Seq reads to mammalian-sized genomes using the ultra high-throughput short read aligner Bowtie, and then analyzes the mapping results to identify splice junctions between exons. Please cite: Trapnell, C., Pachter, L. and Salzberg, S.L. TopHat: discovering splice junctions with RNA-Seq. Bioinformatics 25, 1105-1111 (2009). .. _Tophat: http://tophat.cbcb.umd.edu/ ------ **Know what you are doing** .. class:: warningmark There is no such thing (yet) as an automated gearshift in splice junction identification. 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. .. __: http://tophat.cbcb.umd.edu/manual.html ------ **Input formats** Tophat accepts files in Sanger FASTQ format. Use the FASTQ Groomer to prepare your files. ------ **Outputs** Tophat produces three output files: - coverage.wig -- A UCSC BedGraph_ wigglegram track, showing the depth of coverage at each position, including the spliced read alignments. - accepted_hits.sam -- A list of read alignments in SAM_ format. - junctions.bed -- A UCSC BED_ track of junctions reported by TopHat. Each junction consists of two connected BED blocks, where each block is as long as the maximal overhang of any read spanning the junction. The score is the number of alignments spanning the junction. .. _BedGraph: http://genome.ucsc.edu/goldenPath/help/bedgraph.html .. _SAM: http://samtools.sourceforge.net/ .. _BED: http://genome.ucsc.edu/FAQ/FAQformat.html#format1 ------- **Tophat settings** All of the options have a default value. You can change any of them. Some of the options in Tophat have been implemented here. ------ **Tophat parameter list** This is a list of implemented Tophat options:: -r 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. There is no default, and this parameter is required for paired end runs. --mate-std-dev INT The standard deviation for the distribution on inner distances between mate pairs. The default is 20bp. -a/--min-anchor-length INT The "anchor length". TopHat will report junctions spanned by reads with at least this many bases on each side of the junction. Note that individual spliced alignments may span a junction with fewer than this many bases on one side. However, every junction involved in spliced alignments is supported by at least one read with this many bases on each side. This must be at least 3 and the default is 8. -m/--splice-mismatches INT The maximum number of mismatches that may appear in the "anchor" region of a spliced alignment. The default is 0. -i/--min-intron-length INT The minimum intron length. TopHat will ignore donor/acceptor pairs closer than this many bases apart. The default is 70. -I/--max-intron-length INT The maximum intron length. When searching for junctions ab initio, TopHat will ignore donor/acceptor pairs farther than this many bases apart, except when such a pair is supported by a split segment alignment of a long read. The default is 500000. -F/--min-isoform-fraction 0.0-1.0 TopHat filters out junctions supported by too few alignments. Suppose a junction spanning two exons, is supported by S reads. Let the average depth of coverage of exon A be D, and assume that it is higher than B. If S / D is less than the minimum isoform fraction, the junction is not reported. A value of zero disables the filter. The default is 0.15. -g/--max-multihits INT Instructs TopHat to allow up to this many alignments to the reference for a given read, and suppresses all alignments for reads with more than this many alignments. The default is 40. --no-closure-search Disables the mate pair closure-based search for junctions. Currently, has no effect - closure search is off by default. --closure-search Enables the mate pair closure-based search for junctions. Closure-based search should only be used when the expected inner distance between mates is small (about or less than 50bp) --no-coverage-search Disables the coverage based search for junctions. --coverage-search Enables the coverage based search for junctions. Use when coverage search is disabled by default (such as for reads 75bp or longer), for maximum sensitivity. --microexon-search With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer. --butterfly-search TopHat will use a slower but potentially more sensitive algorithm to find junctions in addition to its standard search. Consider using this if you expect that your experiment produced a lot of reads from pre-mRNA, that fall within the introns of your transcripts. --segment-mismatches Read segments are mapped independently, allowing up to this many mismatches in each segment alignment. The default is 2. --segment-length Each read is cut up into segments, each at least this long. These segments are mapped independently. The default is 25. --min-closure-exon During closure search for paired end reads, exonic hops in the potential splice graph must be at least this long. The default is 50. --min-closure-intron The minimum intron length that may be found during closure search. The default is 50. --max-closure-intron The maximum intron length that may be found during closure search. The default is 5000. --min-coverage-intron The minimum intron length that may be found during coverage search. The default is 50. --max-coverage-intron The maximum intron length that may be found during coverage search. The default is 20000. --min-segment-intron The minimum intron length that may be found during split-segment search. The default is 50. --max-segment-intron The maximum intron length that may be found during split-segment search. The default is 500000.