Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amrezans
    Junior Member
    • May 2013
    • 2

    #1

    Cufflinks refuses to operate on Tophat2 created bam or sam files due to sorting error

    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
  • vivek_
    PhD Student
    • Jul 2012
    • 164

    #2
    Look for picard SortSam module.

    http://picard.sourceforge.net/comman....shtml#SortSam

    Comment

    Latest Articles

    Collapse

    • SEQadmin2
      Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
      by SEQadmin2



      Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

      Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
      ...
      10-14-2026, 09:55 AM
    • SEQadmin2
      New Genomics Technologies Take Aim at Long-Standing Limits
      by SEQadmin2


      Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

      We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
      ...
      09-28-2026, 10:25 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by SEQadmin2, 10-22-2026, 11:13 AM
    0 responses
    60 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-22-2026, 10:48 AM
    0 responses
    42 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-15-2026, 10:52 AM
    0 responses
    75 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-14-2026, 05:39 AM
    0 responses
    74 views
    0 reactions
    Last Post SEQadmin2  
    Working...