DaehwanKimLab / tophat

Spliced read mapper for RNA-Seq
http://ccb.jhu.edu/software/tophat
Boost Software License 1.0
90 stars 46 forks source link

Fail to generate sam headers with bowtie1 >= v1.2 #51

Open ronin-gw opened 6 years ago

ronin-gw commented 6 years ago

I tried to run tophat v2.1.1 with bowtie v1.2.2.0 and got error messages like this.

[2018-01-20 20:30:21] Beginning TopHat run (v2.1.1)
-----------------------------------------------
[2018-01-20 20:30:21] Checking for Bowtie
          Bowtie version:    1.2.2.0
[2018-01-20 20:30:22] Checking for Bowtie index files (transcriptome)..
[2018-01-20 20:30:22] Checking for Bowtie index files (genome)..
[2018-01-20 20:30:22] Checking for reference FASTA file
[2018-01-20 20:30:22] Generating SAM header for local/database/bwindex/hg19
[2018-01-20 20:30:24] Reading known junctions from GTF file
[2018-01-20 20:30:45] Preparing reads
     left reads: min. length=20, max. length=76, 3640357 kept reads (1119 discarded)
    right reads: min. length=20, max. length=76, 3640863 kept reads (613 discarded)
[2018-01-20 20:33:30] Using pre-built transcriptome data..
[2018-01-20 20:33:34] Mapping left_kept_reads to transcriptome gencode.v19.annotation with Bowtie
[2018-01-20 20:36:16] Mapping right_kept_reads to transcriptome gencode.v19.annotation with Bowtie
[2018-01-20 20:38:53] Resuming TopHat pipeline with unmapped reads
[2018-01-20 20:38:53] Mapping left_kept_reads.m2g_um to genome hg19 with Bowtie
    [FAILED]
Error running bowtie:
Error while flushing and closing output
terminate called after throwing an instance of 'int'

The problem seems that tophat fails to generate *_genome.bwt.samheader.sam with bowtie1 because bowtie1 >= v1.2 cannot generate sam headers with the empty input.

Here is some examples of bowtie1 output with /dev/null input.

kylevoyto commented 6 years ago

I had the same issue and was able to fix it by switching to bowtie v1.1.2. Thank you @ronin-gw for the post.

archu87 commented 5 years ago

Hi,

I am getting similar error in tophat v2.1.0

[2018-07-23 10:30:10] Beginning TopHat run (v2.1.0)

[2018-07-23 10:30:10] Checking for Bowtie Bowtie version: 1.1.2.0 [2018-07-23 10:30:11] Checking for Bowtie index files (genome).. [2018-07-23 10:30:11] Checking for reference FASTA file Warning: Could not find FASTA file ../bow_tie_build_hg19/hg19.fa [2018-07-23 10:30:11] Reconstituting reference FASTA file from Bowtie index Executing: /usr/bin/bowtie-inspect ../bow_tie_build_hg19/hg19 > final_tophat_fusion/tmp/hg19.fa [2018-07-23 10:32:36] Generating SAM header for ../bow_tie_build_hg19/hg19 [2018-07-23 10:32:56] Preparing reads left reads: min. length=48, max. length=48, 57435146 kept reads (2628 discarded) right reads: min. length=48, max. length=48, 57431378 kept reads (6396 discarded) [2018-07-23 10:49:38] Mapping left_kept_reads to genome hg19 with Bowtie [2018-07-23 11:44:57] Mapping left_kept_reads_seg1 to genome hg19 with Bowtie (1/2) [2018-07-23 12:03:16] Mapping left_kept_reads_seg2 to genome hg19 with Bowtie (2/2) [2018-07-23 12:29:38] Mapping right_kept_reads to genome hg19 with Bowtie [2018-07-23 13:41:25] Mapping right_kept_reads_seg1 to genome hg19 with Bowtie (1/2) [2018-07-23 14:14:02] Mapping right_kept_reads_seg2 to genome hg19 with Bowtie (2/2) [2018-07-23 15:02:24] Searching for junctions via segment mapping [2018-07-23 15:22:31] Retrieving sequences for splices [2018-07-23 15:24:50] Indexing splices [2018-07-23 15:26:29] Mapping left_kept_reads_seg1 to genome segment_juncs with Bowtie (1/2) [2018-07-23 15:44:07] Mapping left_kept_reads_seg2 to genome segment_juncs with Bowtie (2/2) [2018-07-23 16:03:37] Joining segment hits [2018-07-23 16:12:25] Mapping right_kept_reads_seg1 to genome segment_juncs with Bowtie (1/2) [2018-07-23 16:30:37] Mapping right_kept_reads_seg2 to genome segment_juncs with Bowtie (2/2) [2018-07-23 16:40:57] Joining segment hits [2018-07-23 16:50:07] Reporting output tracks [FAILED] Error running /usr/bin/tophat_reports --min-anchor 8 --splice-mismatches 0 --min-report-intron 50 --max-report-intron 500000 --min-isoform-fraction 0.15 --output-dir final_tophat_fusion/ --max-multihits 20 --max-seg-multihits 40 --segment-length 25 --segment-mismatches 2 --min-closure-exon 100 --min-closure-intron 50 --max-closure-intron 5000 --min-coverage-intron 50 --max-coverage-intron 20000 --min-segment-intron 50 --max-segment-intron 500000 --read-mismatches 2 --read-gap-length 2 --read-edit-dist 2 --read-realign-edit-dist 3 --max-insertion-length 3 --max-deletion-length 3 --bowtie1 --fusion-search --fusion-anchor-length 20 --fusion-min-dist 10000000 --fusion-read-mismatches 2 --fusion-multireads 2 --fusion-multipairs 2 -z gzip -p4 --inner-dist-mean 50 --inner-dist-std-dev 20 --no-closure-search --no-coverage-search --no-microexon-search --library-type fr-unstranded --sam-header final_tophat_fusion/tmp/hg19_genome.bwt.samheader.sam --report-discordant-pair-alignments --report-mixed-alignments --samtools=/usr/bin/samtools_0.1.18 --bowtie2-max-penalty 6 --bowtie2-min-penalty 2 --bowtie2-penalty-for-N 1 --bowtie2-read-gap-open 5 --bowtie2-read-gap-cont 3 --bowtie2-ref-gap-open 5 --bowtie2-ref-gap-cont 3 final_tophat_fusion/tmp/hg19.fa final_tophat_fusion/junctions.bed final_tophat_fusion/insertions.bed final_tophat_fusion/deletions.bed final_tophat_fusion/fusions.out final_tophat_fusion/tmp/accepted_hits final_tophat_fusion/tmp/left_kept_reads.mapped.bam,final_tophat_fusion/tmp/left_kept_reads.candidates final_tophat_fusion/tmp/left_kept_reads.bam final_tophat_fusion/tmp/right_kept_reads.mapped.bam,final_tophat_fusion/tmp/right_kept_reads.candidates final_tophat_fusion/tmp/right_kept_reads.bam what(): basic_string::substr: __pos (which is 40) > this->size() (which is 0)

Any help or suggestion is much appreciated.