Header Leaderboard Ad

Collapse

SAM to BAM --- samtools fail to read error

Collapse

Announcement

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

  • #16
    Originally posted by dpryan View Post
    Ah, then since this is just hg18, you have a two options:

    1) Do what I suggested above, substituting the length of the various chromosomes in hg18 for the made up values I originally suggested. You would have to look up these values.

    2) Download the hg18 fasta file and run "samtools faidx" on it. You can then use the "-t" option that you tried before with the resulting .fai file. This is effectively the same as option 1, but requires less googling.

    BTW, I hope you replaced all of the coordinate information rather than just the chromosome (position 3). Otherwise whatever you do downstream will be messed up.
    Thank you!
    I did something similar and it is able to produce bam files now.

    Although kind of disappointed that i cannot use the tview option

    /usr/local/samtools-0.1.18/samtools tview test.bam
    [bam_index_load] fail to load BAM index.
    $ /usr/local/samtools-0.1.18/samtools index test.bam
    [bam_index_core] the alignment is not sorted (all-hg18_9815): 2498970
    > 2498636 in 1-th chr
    [bam_index_build2] fail to index the BAM file.

    Comment


    • #17
      About the tview, from the way you run the command, I think u missed something. Have you sort the bam file using samtool sort command? If not, you have to sort them 1st, before doing indexing.

      Code:
      samtools sort [-on] [-m <maxMem>] <in.bam> <out.prefix>

      Code:
      samtools index <sorted.bam>

      And from the tview run, u forgot to include the reference sequence

      Code:
      samtools tview  <aln.sorted.bam> [ref.fasta]


      You can check out this post. This might help you

      Discussion of next-gen sequencing related bioinformatics: resources, algorithms, open source efforts, etc
      Last edited by masterpiece; 09-27-2012, 07:38 PM.

      Comment

      Latest Articles

      Collapse

      • seqadmin
        How RNA-Seq is Transforming Cancer Studies
        by seqadmin



        Cancer research has been transformed through numerous molecular techniques, with RNA sequencing (RNA-seq) playing a crucial role in understanding the complexity of the disease. Maša Ivin, Ph.D., Scientific Writer at Lexogen, and Yvonne Goepel Ph.D., Product Manager at Lexogen, remarked that “The high-throughput nature of RNA-seq allows for rapid profiling and deep exploration of the transcriptome.” They emphasized its indispensable role in cancer research, aiding in biomarker...
        09-07-2023, 11:15 PM
      • seqadmin
        Methods for Investigating the Transcriptome
        by seqadmin




        Ribonucleic acid (RNA) represents a range of diverse molecules that play a crucial role in many cellular processes. From serving as a protein template to regulating genes, the complex processes involving RNA make it a focal point of study for many scientists. This article will spotlight various methods scientists have developed to investigate different RNA subtypes and the broader transcriptome.

        Whole Transcriptome RNA-seq
        Whole transcriptome sequencing...
        08-31-2023, 11:07 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, 09-22-2023, 09:05 AM
      0 responses
      14 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 09-21-2023, 06:18 AM
      0 responses
      12 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 09-20-2023, 09:17 AM
      0 responses
      13 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 09-19-2023, 09:23 AM
      0 responses
      28 views
      0 likes
      Last Post seqadmin  
      Working...
      X