Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • sequence coverage format trouble

    Hi everyone!

    I am using bowtie2 to map my reads on scaffolds and I would like to know, is there a way to get a coverage calculation in samtools? I know that I can use BEDTools, but how can I get .bed format from bam? And for my analysis pipeline I need .csv format of coverage information, which is not created in BEDTools.
    Any ideas how I can do this?


    Help!:
    Last edited by OTU; 01-23-2014, 02:13 PM.

  • #2
    There are several solutions on this biostars page including a "samtools depth" one: http://www.biostars.org/p/5165/

    Comment


    • #3
      Thank you!
      However, I wasn't able to find a way to get the information on coverage to be in csv format.
      I used this:
      samtools depth *bamfile* | awk '{sum+=$3} END { print "Average = ",sum/NR}'

      And got the number. Is there a way to get it in csv format?

      Comment


      • #4
        Code:
        samtools depth *bamfile* | awk '{sum+=$3} END { printf("Average,%f\n",sum/NR)}' > some_file.csv
        Will make the output comma separated (csv is just a text file with commas as column separators).

        Comment


        • #5
          That awk script only prints a single number for the whole bam so that is probably not the output OTU is looking for.

          @OTU Are you looking to get a "depth" number for each scaffold?

          Comment

          Latest Articles

          Collapse

          • seqadmin
            Recent Advances in Sequencing Technologies
            by seqadmin







            Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.

            Long-Read Sequencing
            Long-read sequencing has...
            12-02-2024, 01:49 PM
          • seqadmin
            Genetic Variation in Immunogenetics and Antibody Diversity
            by seqadmin



            The field of immunogenetics explores how genetic variations influence immune responses and susceptibility to disease. In a recent SEQanswers webinar, Oscar Rodriguez, Ph.D., Postdoctoral Researcher at the University of Louisville, and Ruben Martínez Barricarte, Ph.D., Assistant Professor of Medicine at Vanderbilt University, shared recent advancements in immunogenetics. This article discusses their research on genetic variation in antibody loci, antibody production processes,...
            11-06-2024, 07:24 PM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, 12-02-2024, 09:29 AM
          0 responses
          146 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 12-02-2024, 09:06 AM
          0 responses
          51 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 12-02-2024, 08:03 AM
          0 responses
          42 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 11-22-2024, 07:36 AM
          0 responses
          73 views
          0 likes
          Last Post seqadmin  
          Working...
          X