{"id":1240,"date":"2013-05-07T20:43:49","date_gmt":"2013-05-07T12:43:49","guid":{"rendered":"http:\/\/www.hzaumycology.com\/chenlianfu_blog\/?p=1240"},"modified":"2013-05-08T00:21:56","modified_gmt":"2013-05-07T16:21:56","slug":"incorporating-illumina-rnaseq-into-augustus-with-tophat","status":"publish","type":"post","link":"http:\/\/www.chenlianfu.com\/?p=1240","title":{"rendered":"Incorporating Illumina RNAseq into AUGUSTUS with Tophat"},"content":{"rendered":"<p><a href=\"http:\/\/bioinf.uni-greifswald.de\/bioinf\/wiki\/pmwiki.php?n=IncorporatingRNAseq.Tophat\" target=\"_blank\">Incorporating Illumina RNAseq into AUGUSTUS with Tophat<\/a><\/p>\n<pre>#!\/bin\/bash\r\n\r\n###### Step 1 ---------------------\r\n\r\n# Aligning reads with Bowtie\/Tophat\r\nbowtie2-build genome.fasta.masked genome\r\ntophat -r 20 -mate-std-dev 40 --coverage-search --microexon-search -p 24 --library-type fr-unstranded --phred64-quals genome reads_1.fq reads_2.fq \r\n\r\n# Filtering raw alignments\r\nsamtools sort -n tophat_out\/accepted_hits.bam tophat_out\/accepted_hits.s\r\naugustus.2.7\/auxprogs\/filterBam\/bin\/filterBam --uniq --paired --in tophat_out\/accepted_hits.s.bam --out tophat_out\/accepted_hits.sf.bam\r\n\r\nsamtools view -H tophat_out\/accepted_hits.sf.bam &gt; header.txt\r\n\r\n# Creating intron hints\r\nsamtools sort tophat_out\/accepted_hits.sf.bam both.ssf\r\naugustus.2.7\/auxprogs\/bam2hints\/bam2hints --intronsonly --in=both.ssf.bam --out=hints.gff\r\n\r\n# Run Augustus\r\naugustus.2.7\/bin\/augustus --species=SPECIES --extrinsicCfgFile=extrinsic.cfg --alternatives-from-evidence=true --hintsfile=hints.gff --allow_hinted_splicesites=atac --introns=on --genemodel=complete genome.fasta &gt; aug1.out\r\n######-----------------------------\r\n\r\n###### Step 2 ---------------------\r\n\r\n# Create an exon-exon junction database\r\ncat aug1.out | tee aug.prelim.gff | grep -P \"\\tintron\\t\" &gt; aug1.introns.gff\r\ncat hints.gff aug1.introns.gff | perl -ne 'split; print \"@_[0]:@_[3]-@_[4]\\n\";' | sort -u &gt; introns.lst\r\naugustus.2.7\/scripts\/intron2exex.pl --flank=90 --introns=introns.lst --seq=genome.fasta.masked --exex=exex.fa --map=map.psl\r\nbowtie2-build exex.fa genome_exex1\r\n\r\n# Aligning reads with Bowtie\r\nbowtie2 -q --phred64 --fr -p 24 --reorder -x genome_exex1 -1 reads_1.fq -2 reads_2.fq -S bowtie.sam\r\nsamtools view -S -F 4 bowtie.sam &gt; bowtie.F.sam\r\naugustus.2.7\/scripts\/samMap.pl bowtie.F.sam map.psl &gt; bowtie.global.sam 2&gt; bowtie.samMap.err\r\n# \u9700\u8981\u5c06samMap.pl\u4e2d\u768475\u4fee\u6b63\u4e3a\u9700\u8981\u7684reads\u957f\u5ea6\u3002\u6ce8\u610f\u4f7f\u7528 2&gt; \u6765\u91cd\u5b9a\u5411STDERR\u6570\u636e\uff0c\u4ee5\u63d0\u9ad8\u8fd0\u884c\u901f\u5ea6\u3002\r\n\r\n# Join data from step 1 and step 2\r\nbamtools filter -in tophat_out\/accepted_hits.bam -out tophat_out\/accepted_hits.noN.bam -script augustus.2.7\/auxprogs\/auxBamFilters\/operation_N_filter.txt\r\ncat header.txt bowtie.global.sam &gt; bowtie.global.h.sam\r\nsamtools view -bS -o bowtie.global.h.bam bowtie.global.h.sam\r\nbamtools merge -in bowtie.global.h.bam -in tophat_out\/accepted_hits.noN.bam -out both.bam\r\nsamtools sort -n both.bam both.s\r\n\r\n# Filtering raw alignments\r\naugustus.2.7\/auxprogs\/filterBam\/bin\/filterBam --uniq --paired --in both.s.bam --out both.sf.bam\r\n\r\n# Creating intron hints\r\nsamtools sort both.sf.bam both.ssf\r\naugustus.2.7\/auxprogs\/bam2hints\/bam2hints --intronsonly --in=both.ssf.bam --out=hints.2.gff\r\n\r\n#Run Augustus\r\naugustus --species=yourSpecies --extrinsicCfgFile=extrinsic.cfg --alternatives-from-evidence=true --hintsfile=hints.2.gff --allow_hinted_splicesites=atac genome.fasta &gt; aug2.out<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Incorporating Illumina RNAseq into AUGUS &hellip; <a href=\"http:\/\/www.chenlianfu.com\/?p=1240\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/posts\/1240"}],"collection":[{"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1240"}],"version-history":[{"count":6,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/posts\/1240\/revisions"}],"predecessor-version":[{"id":1252,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/posts\/1240\/revisions\/1252"}],"wp:attachment":[{"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1240"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}