Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • dphansti
    Member
    • May 2011
    • 28

    problems with bedtools mapBed

    I am trying to use mapBed but I am running into a problem that I can illustrate with the examples below. I am using this testfile.

    >cat test.bed
    chr1 100000 109000
    chr2 100000 109000
    chr3 100000 109000
    chr4 100000 109000
    chr5 100000 109000
    chr6 100000 109000
    chr7 100000 109000
    chr8 100000 109000
    chr9 100000 109000
    chr10 100000 109000
    chr11 100000 109000
    chr12 100000 109000
    chr13 100000 109000
    chr14 100000 109000
    chr15 100000 109000
    chr16 100000 109000
    chr17 100000 109000
    chr18 100000 109000
    chr19 100000 109000
    chr20 100000 109000
    chr21 100000 109000
    chr22 100000 109000

    I am querying that against a bedgraph file that I downloaded and sorted from UCSC genome browser. I can't show the whole file but I can show you how it is sorted.

    >cat wgEncodeSydhHistoneK562bH3k4me3bUcdSig.bedgraph.noM | awk '{print $1}' | uniq
    chr1
    chr2
    chr3
    chr4
    chr5
    chr6
    chr7
    chr8
    chr9
    chr10
    chr11
    chr12
    chr13
    chr14
    chr15
    chr16
    chr17
    chr18
    chr19
    chr20
    chr21
    chr22
    chrX

    When I run the command...

    >mapBed -c 3 -o sum -a test.bed -b wgEncodeSydhHistoneK562H3k9acbUcdSig.bedgraph.noM

    I get...

    chr1 100000 109000 1584710
    chr2 100000 109000 6965660
    chr3 100000 109000 4067179
    chr4 100000 109000 3997623
    chr5 100000 109000 22672757
    chr6 100000 109000 100786
    chr7 100000 109000 13187590
    chr8 100000 109000 .
    chr9 100000 109000 5536045
    chr10 100000 109000 .
    chr11 100000 109000 .
    chr12 100000 109000 .
    chr13 100000 109000 .
    chr14 100000 109000 .
    chr15 100000 109000 .
    chr16 100000 109000 .
    chr17 100000 109000 .
    chr18 100000 109000 .
    chr19 100000 109000 .
    chr20 100000 109000 .
    chr21 100000 109000 .
    chr22 100000 109000 .

    It is fine that I dont get anything for chr8. I checked that one and there is no coverage in that region. But for the later chromosomes (10 and on) I should be seeing a signal. Can anyone explain why this is happening or what I can do to fix it? mapBed says...

    "Notes:
    (1) Both input files must be sorted by chrom, then start."

    Are my files sorted wrong? Thanks so much.
    Doug
    www.sharedproteomics.com
  • ildem
    Junior Member
    • Jan 2015
    • 5

    #2
    column

    Hi Doug,

    I know its a super old post, but i came across it, since i have the same problem.

    Though i can see from your command that you used -c 3 for a bedgraph file, it should be -c 4 (4th column is the score in bedgraph).

    My problem is, i am in a similar situation and mapBed is assigning 0's to coordinates that i know are non-zero!

    Comment

    Latest Articles

    Collapse

    • SEQadmin2
      Nine Things a Sample Prep Scientist Thinks About Before Sequencing
      by SEQadmin2


      I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

      Here are nine questions we think about, in roughly the order they matter, before...
      06-18-2026, 07:11 AM
    • SEQadmin2
      From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
      by SEQadmin2


      Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


      The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
      ...
      06-02-2026, 10:05 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by SEQadmin2, 06-17-2026, 06:09 AM
    0 responses
    40 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 06-09-2026, 11:58 AM
    0 responses
    102 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 06-05-2026, 10:09 AM
    0 responses
    123 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 06-04-2026, 08:59 AM
    0 responses
    114 views
    0 reactions
    Last Post SEQadmin2  
    Working...