Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    Look for picard SortSam module.

    Comment

    Latest Articles

    Collapse

    • seqadmin
      Strategies for Sequencing Challenging Samples
      by seqadmin


      Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
      03-22-2024, 06:39 AM
    • seqadmin
      Techniques and Challenges in Conservation Genomics
      by seqadmin



      The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

      Avian Conservation
      Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
      03-08-2024, 10:41 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by seqadmin, Yesterday, 06:37 PM
    0 responses
    8 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, Yesterday, 06:07 PM
    0 responses
    8 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 03-22-2024, 10:03 AM
    0 responses
    49 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 03-21-2024, 07:32 AM
    0 responses
    66 views
    0 likes
    Last Post seqadmin  
    Working...
    X