Hi there,
I have really had alot of trouble over the last couple weeks trying to get either Cufflinks 2.0 and 2.1 to accept Tophat 2 (latest version) 'accepted_hits.bam(and sam) files. I repeatedly get sorting errors of many natures. I have read about 10 threads on similar problems but nothing seems to solve my sorting problem. If I include the annotation in the Cufflinks runs, the runs do not work and give me this error:
cufflinks -p 24 -o ./TrueTophat2output/ABZ_3497_lax_nofilter/cufflinks/ -g ./Hc_genome/Hc_rztk_1+2+8+9.augustus.gtf ./TrueTophat2output/ABZ_3920_lax_nofilter/accepted_hits.sam
Warning: Your version of Cufflinks is not up-to-date. It is recommended that you upgrade to Cufflinks v2.1.1 to benefit from the most recent features and bug fixes (http://cufflinks.cbcb.umd.edu).
[bam_header_read] EOF marker is absent.
[bam_header_read] invalid BAM binary header (this is not a BAM file).
File ./TrueTophat2output/ABZ_3920_lax_nofilter/accepted_hits doesn't appear to be a valid BAM file, trying SAM...
[14:33:19] Loading reference annotation.
[14:33:20] Inspecting reads and determining fragment length distribution.
> Processing Locus scaffold100.1_size305125:90 [************************ ] 99%
Error: this SAM file doesn't appear to be correctly sorted!
current hit is at scaffold1000.1_size94939:19257, last one was at scaffold100.1_size305125:90495-305068:213981
Cufflinks requires that if your file has SQ records in
the SAM header that they appear in the same order as the chromosomes names
in the alignments.
If there are no SQ records in the header, or if the header is missing,
the alignments must be sorted lexicographically by chromsome
name and by position.
If I do not include the annotation file the cufflinks runs work, but I get the sorting error when I run Cuffmerge in all cases. ie even when I exclude the reference genome and the reference annotation from the Cuffmerge command. Ex:
Error: sort order of reads in BAMs must be the same
[FAILED]
Error: could not execute cufflinks
So it appears that the accepted hits files are at their core inproperly sorted. And it appears I dont have a clue how to get them sorted properly. Here is how my .sam files look, this is the first entry, note that I dont have headers:
IL17_3497:1:19:1189:1264 99 scaffold1.1_size947603 31379 50 76M = 31436 748 ATGAGGCTGTAATGGATGGATGAGTGCAGGGTGCATTTCTTTTCGATGAACCGTATATTCGATGATGCCAAGTTTT AA?@@AA@?>>>@???@?<<??<?9=>>>@@?A=1>A@@@AA@?===>=?<=?>?>>@A@:6<<?;==>>8>=<=> AS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:76 YT:Z:UU NH:i:1
I have no headers in these files, and my genome, and therefore my accecpted_hits.sam files, are aligned on ~25000 scaffolds, or chromosomes, whatever you would like to call them (it is a very fragmented genome N50 83000). So this problem can't be identified and solved manually unfortunately. But yet there still must be a way to get these sam files organized by location (scaffold) properly. Any guidance would be very greatly appreciated.
Honestly as of right now I think that if I can sort the .sam files as well as my annotation file by location (ie scaffold1.1_size947603, and so on), I'm hoping that this would solve this problem. Does anyone agree with this? If so, do you know how I might easily sort the .sam file locations lexicographically? As well as a .gtf annotation file? If not please give me your thoughts on what might actually solve this problem.
Thank you very much for your input.
Andrew
I have really had alot of trouble over the last couple weeks trying to get either Cufflinks 2.0 and 2.1 to accept Tophat 2 (latest version) 'accepted_hits.bam(and sam) files. I repeatedly get sorting errors of many natures. I have read about 10 threads on similar problems but nothing seems to solve my sorting problem. If I include the annotation in the Cufflinks runs, the runs do not work and give me this error:
cufflinks -p 24 -o ./TrueTophat2output/ABZ_3497_lax_nofilter/cufflinks/ -g ./Hc_genome/Hc_rztk_1+2+8+9.augustus.gtf ./TrueTophat2output/ABZ_3920_lax_nofilter/accepted_hits.sam
Warning: Your version of Cufflinks is not up-to-date. It is recommended that you upgrade to Cufflinks v2.1.1 to benefit from the most recent features and bug fixes (http://cufflinks.cbcb.umd.edu).
[bam_header_read] EOF marker is absent.
[bam_header_read] invalid BAM binary header (this is not a BAM file).
File ./TrueTophat2output/ABZ_3920_lax_nofilter/accepted_hits doesn't appear to be a valid BAM file, trying SAM...
[14:33:19] Loading reference annotation.
[14:33:20] Inspecting reads and determining fragment length distribution.
> Processing Locus scaffold100.1_size305125:90 [************************ ] 99%
Error: this SAM file doesn't appear to be correctly sorted!
current hit is at scaffold1000.1_size94939:19257, last one was at scaffold100.1_size305125:90495-305068:213981
Cufflinks requires that if your file has SQ records in
the SAM header that they appear in the same order as the chromosomes names
in the alignments.
If there are no SQ records in the header, or if the header is missing,
the alignments must be sorted lexicographically by chromsome
name and by position.
If I do not include the annotation file the cufflinks runs work, but I get the sorting error when I run Cuffmerge in all cases. ie even when I exclude the reference genome and the reference annotation from the Cuffmerge command. Ex:
Error: sort order of reads in BAMs must be the same
[FAILED]
Error: could not execute cufflinks
So it appears that the accepted hits files are at their core inproperly sorted. And it appears I dont have a clue how to get them sorted properly. Here is how my .sam files look, this is the first entry, note that I dont have headers:
IL17_3497:1:19:1189:1264 99 scaffold1.1_size947603 31379 50 76M = 31436 748 ATGAGGCTGTAATGGATGGATGAGTGCAGGGTGCATTTCTTTTCGATGAACCGTATATTCGATGATGCCAAGTTTT AA?@@AA@?>>>@???@?<<??<?9=>>>@@?A=1>A@@@AA@?===>=?<=?>?>>@A@:6<<?;==>>8>=<=> AS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:76 YT:Z:UU NH:i:1
I have no headers in these files, and my genome, and therefore my accecpted_hits.sam files, are aligned on ~25000 scaffolds, or chromosomes, whatever you would like to call them (it is a very fragmented genome N50 83000). So this problem can't be identified and solved manually unfortunately. But yet there still must be a way to get these sam files organized by location (scaffold) properly. Any guidance would be very greatly appreciated.
Honestly as of right now I think that if I can sort the .sam files as well as my annotation file by location (ie scaffold1.1_size947603, and so on), I'm hoping that this would solve this problem. Does anyone agree with this? If so, do you know how I might easily sort the .sam file locations lexicographically? As well as a .gtf annotation file? If not please give me your thoughts on what might actually solve this problem.
Thank you very much for your input.
Andrew
Comment