Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ronin-gw opened this issue Jan 24, 2018 · 2 comments
Open

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

ronin-gw opened this issue Jan 24, 2018 · 2 comments

Comments

@ronin-gw
Copy link

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.

  • bowtie v1.1.2
$ /usr/local/pkg/bowtie/bowtie-1.1.2/bowtie --sam hg19 /dev/null
Warning: Could not find any reads in "/dev/null"
@HD	VN:1.0	SO:unsorted
@SQ	SN:chr1	LN:249250621
@SQ	SN:chr2	LN:243199373
@SQ	SN:chr3	LN:198022430
@SQ	SN:chr4	LN:191154276
@SQ	SN:chr5	LN:180915260
@SQ	SN:chr6	LN:171115067
@SQ	SN:chr7	LN:159138663
@SQ	SN:chr8	LN:146364022
@SQ	SN:chr9	LN:141213431
@SQ	SN:chr10	LN:135534747
@SQ	SN:chr11	LN:135006516
@SQ	SN:chr12	LN:133851895
@SQ	SN:chr13	LN:115169878
@SQ	SN:chr14	LN:107349540
@SQ	SN:chr15	LN:102531392
@SQ	SN:chr16	LN:90354753
@SQ	SN:chr17	LN:81195210
@SQ	SN:chr18	LN:78077248
@SQ	SN:chr19	LN:59128983
@SQ	SN:chr20	LN:63025520
@SQ	SN:chr21	LN:48129895
@SQ	SN:chr22	LN:51304566
@SQ	SN:chrX	LN:155270560
@SQ	SN:chrY	LN:59373566
@SQ	SN:chrM	LN:16569
@SQ	SN:GL000207.1	LN:4262
@SQ	SN:GL000226.1	LN:15008
@SQ	SN:GL000229.1	LN:19913
@SQ	SN:GL000231.1	LN:27386
@SQ	SN:GL000210.1	LN:27682
@SQ	SN:GL000239.1	LN:33824
@SQ	SN:GL000235.1	LN:34474
@SQ	SN:GL000201.1	LN:36148
@SQ	SN:GL000247.1	LN:36422
@SQ	SN:GL000245.1	LN:36651
@SQ	SN:GL000197.1	LN:37175
@SQ	SN:GL000203.1	LN:37498
@SQ	SN:GL000246.1	LN:38154
@SQ	SN:GL000249.1	LN:38502
@SQ	SN:GL000196.1	LN:38914
@SQ	SN:GL000248.1	LN:39786
@SQ	SN:GL000244.1	LN:39929
@SQ	SN:GL000238.1	LN:39939
@SQ	SN:GL000202.1	LN:40103
@SQ	SN:GL000234.1	LN:40531
@SQ	SN:GL000232.1	LN:40652
@SQ	SN:GL000206.1	LN:41001
@SQ	SN:GL000240.1	LN:41933
@SQ	SN:GL000236.1	LN:41934
@SQ	SN:GL000241.1	LN:42152
@SQ	SN:GL000243.1	LN:43341
@SQ	SN:GL000242.1	LN:43523
@SQ	SN:GL000230.1	LN:43691
@SQ	SN:GL000237.1	LN:45867
@SQ	SN:GL000233.1	LN:45941
@SQ	SN:GL000204.1	LN:81310
@SQ	SN:GL000198.1	LN:90085
@SQ	SN:GL000208.1	LN:92689
@SQ	SN:GL000191.1	LN:106433
@SQ	SN:GL000227.1	LN:128374
@SQ	SN:GL000228.1	LN:129120
@SQ	SN:GL000214.1	LN:137718
@SQ	SN:GL000221.1	LN:155397
@SQ	SN:GL000209.1	LN:159169
@SQ	SN:GL000218.1	LN:161147
@SQ	SN:GL000220.1	LN:161802
@SQ	SN:GL000213.1	LN:164239
@SQ	SN:GL000211.1	LN:166566
@SQ	SN:GL000199.1	LN:169874
@SQ	SN:GL000217.1	LN:172149
@SQ	SN:GL000216.1	LN:172294
@SQ	SN:GL000215.1	LN:172545
@SQ	SN:GL000205.1	LN:174588
@SQ	SN:GL000219.1	LN:179198
@SQ	SN:GL000224.1	LN:179693
@SQ	SN:GL000223.1	LN:180455
@SQ	SN:GL000195.1	LN:182896
@SQ	SN:GL000212.1	LN:186858
@SQ	SN:GL000222.1	LN:186861
@SQ	SN:GL000200.1	LN:187035
@SQ	SN:GL000193.1	LN:189789
@SQ	SN:GL000194.1	LN:191469
@SQ	SN:GL000225.1	LN:211173
@SQ	SN:GL000192.1	LN:547496
@PG	ID:Bowtie	VN:1.1.2	CL:"bowtie --wrapper basic-0 --sam hg19 /dev/null"
# reads processed: 0
# reads with at least one reported alignment: 0 (0.00%)
# reads that failed to align: 0 (0.00%)
No alignments
  • bowtie v1.2.2
$ /usr/local/pkg/bowtie/bowtie-1.2.2/bowtie --sam hg19 /dev/null
Error: reads file does not look like a FASTQ file
Command: /usr/local/pkg/bowtie/bowtie-1.2.2/bowtie-align-s --wrapper basic-0 --sam /usr/local/database/bwindex/human_g1k_v37_hrename/hg19 /dev/null
@archu87
Copy link

archu87 commented Jul 23, 2018

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.

@supriyank23
Copy link

tophat2 -o /home/supriya/CIRCexplorer2/circ2/tophat_fusion \ -p 15 \ --fusion-search
--keep-fasta-order
--bowtie1
--no-coverage-search
/home/supriya/CIRCexplorer2/circ2/bowtie1_index
/home/supriya/CIRCexplorer2/circ2/CIRCexplorer2_align_output/tophat/unmapped.fastq

[2024-08-20 10:36:39] Beginning TopHat run (v2.1.1)

[2024-08-20 10:36:39] Checking for Bowtie
Bowtie version: 1.3.1.0
[2024-08-20 10:36:39] Checking for Bowtie index files (genome)..
[2024-08-20 10:36:39] Checking for reference FASTA file
[2024-08-20 10:36:39] Generating SAM header for /home/supriya/CIRCexplorer2/circ2/bowtie1_index
[2024-08-20 10:36:41] Preparing reads
left reads: min. length=35, max. length=76, 1975414 kept reads (170848 discarded)
[2024-08-20 10:36:50] Mapping left_kept_reads to genome bowtie1_index with Bowtie
[FAILED]
Error running:
/home/supriya/tophat-2.1.1.Linux_x86_64/bam2fastx --all /home/supriya/CIRCexplorer2/circ2/tophat_fusion/tmp/left_kept_reads.bam|/usr/bin/bowtie -v 2 -k 20 -m 20 -S -p 15 --sam-nohead --max /dev/null /home/supriya/CIRCexplorer2/circ2/bowtie1_index -|/home/supriya/tophat-2.1.1.Linux_x86_64/fix_map_ordering --read-mismatches 2 --read-gap-length 2 --read-edit-dist 2 --read-realign-edit-dist 3 --index-outfile /home/supriya/CIRCexplorer2/circ2/tophat_fusion/tmp/left_kept_reads.mapped.bam.index --bowtie1 --sam-header /home/supriya/CIRCexplorer2/circ2/tophat_fusion/tmp/bowtie1_index_genome.bwt.samheader.sam - /home/supriya/CIRCexplorer2/circ2/tophat_fusion/tmp/left_kept_reads.mapped.bam /home/supriya/CIRCexplorer2/circ2/tophat_fusion/tmp/left_kept_reads_unmapped.bam

how to solve this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants