Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Problem with sam files created by bfast

    Hi everyone,
    In advance excuse my ignorance if it is something obvious but I have been looking around and couldn’t find similar problems. I’m not sure if I have just one problem carrying on or several at different level of analyses...

    I have 8 sam files created with bfast for 1 sample, I have tried and succeeded to create 1 merged BAM file using 2 different ways (8sam>8bam>8sortedbam>1mergedbam or 8sam>1mergedsam>1bam>1 sorted bam) to see if it could solve my problem. But each time I can’t visualize it in IGV or use it in downstream analyses (SRMA, samtools pileup). The error message I get from IGV is as followed:

    Error loading SAM header: for sequence 0, text and binary have different names in file sample1.bam

    Then when I hit ok a second message appear:
    An error occurred while loading: sample1.bam [java.lang.nullPointerException]

    With SRMA I got a similar error:
    net.sf.samtools.SAMFormatException: For sequence 0, text and binary have different names in file ~/sample1/bfast.sample1.merged.bam

    at net.sf.samtools.BAMFileReader.readHeader(BAMFileReader.java:354)
    at net.sf.samtools.BAMFileReader.<init>(BAMFileReader.java:114)
    at net.sf.samtools.BAMFileReader.<init>(BAMFileReader.java:93)
    at net.sf.samtools.SAMFileReader.init(SAMFileReader.java:500)
    at net.sf.samtools.SAMFileReader.<init>(SAMFileReader.java:148)
    at srma.SAMRecordIO.<init>(SAMRecordIO.java:49)
    at srma.SRMA.doWork(SRMA.java:141)
    at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:150)
    at srma.SRMA.main(SRMA.java:92)


    I have tried samtools view to look at my header which looked ok.
    @HD VN:0.1.2 SO:unsorted GO:none
    @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:16571
    @PG ID:bfast VN:0.6.4c

    One strange thing is that when I sort, the header indicates chr 1 then chr2 etc..., Whereas the main mapped read start with chrM then Y... it is true that within each chr each read are sorted from beginning to end of the chr but the chr are not sorted from 1 to M...could it be the problem? I couldn’t find any option in samtools sort to specify the sorting from chr 1 to M...
    I have tried to remove all unmapped reads thinking that it could cause the error but it didn’t do anything. I have tried also to work only with 1 sam file in case the merging was causing the problem just doing the compression in bam and then the sorting but the problem was still there...

    thanks in advance for any help you could provide!
    Fabrice
    Last edited by Fabrice ODEFREY; 09-22-2010, 05:54 PM.

  • #2
    The reads should be sorted in the same order as the header. Are the read sorted in reverse order?

    Comment


    • #3
      Hi Nils and thanks for you quick reply.
      It looks like it is reverse from the order of my header doing all chr M first then Y, X, 22...but I don't understand why samtools sort isn't changing then my header accordingly?

      Comment

      Latest Articles

      Collapse

      • seqadmin
        Current Approaches to Protein Sequencing
        by seqadmin


        Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
        04-04-2024, 04:25 PM
      • 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

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, 04-11-2024, 12:08 PM
      0 responses
      30 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 10:19 PM
      0 responses
      32 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 09:21 AM
      0 responses
      28 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-04-2024, 09:00 AM
      0 responses
      53 views
      0 likes
      Last Post seqadmin  
      Working...
      X