Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • bedtools output

    I'm not sure what the output is (there are no headers) and can't find any documentation. Thanks.

    Code:
     coverageBed -hist -abam IonXpress_001.bam -b LCH_IDT.bed | grep ^all > output.bam.hist.txt
    output.bam.hist.txt (attached)

    LCH_IDT.bed
    chr12 112884064 112884217
    chr12 112888106 112888331
    chr12 112890983 112891206
    chr12 112892352 112892499
    chr12 112893738 112893882
    chr12 112910732 112910859
    chr12 112915439 112915549
    chr12 112915645 112915834
    chr12 112919862 112920024
    chr12 112924263 112924448
    chr12 112926231 112926329
    chr12 112926812 112926994
    chr12 112939932 112940075
    chr12 112942483 112942583
    Attached Files

  • #2
    See here.

    The second column is the depth, the third is the number of bases with that depth, the fourth is the total number of bases in your bed file (2188 bases) and the last column the percentage with that coverage.

    Comment


    • #3
      So I am trying to understand the output.

      There are 14 input regions in the bed and ~300 rows in the output. Is there a way to identify the reads at a baspair for each bait?

      For example, of those 300 or so rows how many reads belong to the 1 bait in the bed, how many belong to the second, etc...

      So according to the output there are 127 bases with 0 reads? Thanks.

      I am assuming the all in the output is beacause of ^all.

      Comment


      • #4
        Try removing the grep for "all", you may also want the -d option, depending on your goals. Yes, there are 127 bases with no coverage.

        Comment


        • #5
          Code:
           coverageBed -hist -abam -d IonXpress_001.bam -b LCH_IDT > output.bam.hist.txt
          ? Thanks.

          Comment


          • #6
            I expect you need -d before -abam, otherwise it'll look for a BAM file called "-d".
            Code:
            coverageBed -hist -d -abam IonXpress_001.bam -b LCH_IDT > output.bam.hist.txt

            Comment


            • #7
              Attached is the out put of the command. Below are the first 3 lines, if I am reading it correctly it is saying that in bp 1 of chr12:112884064-112884217 there are 141 reads, in bp 2 of chr12:112884064-112884217 there are 140 reads. In bp 3 of chr12:112884064-112884217 there are 141 reads. Is there a command that will output the average depth per the 14 targets in the bed file? Thanks.

              chr12 112884064 112884217 chr12:112884064-112884217
              1 141
              chr12 112884064 112884217 chr12:112884064-112884217
              2 140
              chr12 112884064 112884217 chr12:112884064-112884217
              3 141
              Attached Files

              Comment


              • #8
                Maybe, but you can also just use awk.

                Code:
                awk '{if(len==0){last=$4;total=$6;len=1;getline}if($4!=last){printf("%s\t%f\n", last, total/len);last=$4;total=$6;len=1}else{total+=$6;len+=1}}END{printf("%s\t%f\n", last, total/len)}' output.bam.hist.txt
                BTW, you have an incorrect line ending in the middle of each line of that file. Have you been using windows again?

                Anyway, here's the output of the awk command:
                Code:
                chr12:112884064-112884217	158.209150
                chr12:112888106-112888331	220.533333
                chr12:112890983-112891206	228.286996
                chr12:112892352-112892499	182.102041
                chr12:112893738-112893882	202.076389
                chr12:112910732-112910859	0.000000
                chr12:112915439-112915549	82.590909
                chr12:112915645-112915834	217.269841
                chr12:112919862-112920024	279.586420
                chr12:112924263-112924448	452.535135
                chr12:112926231-112926329	162.234694
                chr12:112926812-112926994	189.131868
                chr12:112939932-112940075	291.020979
                chr12:112942483-112942583	160.510000

                Comment


                • #9
                  Can the awk be modified to include the average coverage of a bait as well as the amount of reads? I am aligning to hg19. Thank you .

                  Code:
                  chr12:112884064-112884217	158.209150      36x
                  chr12:112888106-112888331	220.533333      40x
                  chr12:112890983-112891206	228.286996      42x

                  Comment

                  Latest Articles

                  Collapse

                  • seqadmin
                    Essential Discoveries and Tools in Epitranscriptomics
                    by seqadmin




                    The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
                    04-22-2024, 07:01 AM
                  • 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

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by seqadmin, Yesterday, 11:49 AM
                  0 responses
                  15 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 04-24-2024, 08:47 AM
                  0 responses
                  16 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 04-11-2024, 12:08 PM
                  0 responses
                  62 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 04-10-2024, 10:19 PM
                  0 responses
                  60 views
                  0 likes
                  Last Post seqadmin  
                  Working...
                  X