Questions tagged [bedtools]
20 questions
3
votes
1 answer
Find rows with overlapping ranges
I have 3 large data frames that look like this:
library(tibble)
df1 <- tibble(peak=c("peak1","peak2","peak3"),
coord1=c(100,500,1000),
coord2=c(250,700,1250))
df2 <- tibble(peak=c("peak5","peak6","peak7"),
…

Corrector
- 163
- 9
3
votes
1 answer
Filter overlapping entries in bed file
I have a bed file that looks like this:
1 183113 183114 chr1:183113-183240 0 +
1 187286 187287 chr1:187128-187287 0 -
1 187576 187587 chr1:187375-187577 0 -
1 187580 187590 chr1:187379-187577 0 -
My aim is to extract…

maciek
- 1,807
- 2
- 18
- 30
2
votes
0 answers
Different results with MACS2 when Peakcalling with .bed or .bam
I got the following problem:
I use MACS2 (2.1.0.20140616) with the following short commandline:
macs2 callpeak -t file.bam -f bam -g 650000000 -n Test -B --nomodel -q 0.01
It seems to work as I want, but when I convert the .bamfile into .bed via…

N. F.
- 21
- 1
1
vote
1 answer
Problems with bedtools installation
I am a very new beginner in bash programming and never succeed in installing tools on my computer.
I am trying to install bedtools without any success
I typed these following commands on my terminal
wget…

Aurelia Kurtis
- 73
- 1
- 6
1
vote
1 answer
Parse out gene name after bed and vcf intersect
I'm looking for to add a new column of 'GENE_ID' to the vcf file based on an intersect between bed coordinate and vcf positions. The 'GENE_ID' is already present as the 4th column in the bed file. Basically I need to know how to keep that gene name…

Maya_Cent
- 471
- 4
- 10
1
vote
1 answer
bedtools shuffle -excl doesn't seem to warn about consistent naming convention
After using bedtools shuffle a lot with the -excl set on I noticed that the excluding file has the numeric naming convention whereas my input file has the "chr" naming convention. Does someone know if this will cause any problems? I have generated…

user2449089
- 21
- 2
1
vote
1 answer
pybedtools bam_to_bed() bedpe
I'm feeling dumb, but I can't figure out the syntax below, and I've been googling the w/o success for a while.
Very easy, I have a bam I want to convert to bedpe with pybedtools within a script.
The following works great:
pybed_BAM =…

Matteo
- 265
- 5
- 16
1
vote
2 answers
is there an R function similar to bedtools intersect?
when working with bedtools intersect , there are many options that you could use like setting minimum overlap as percentage of file A or B , or whether to write original A or B entries. I was wondering if there is a package in R that does the same
I…

pegahT
- 59
- 1
- 8
1
vote
1 answer
converting multiple BAM files to BED files
I have BAM files in the external hard drive. Want to convert them into BED.
Am using
cd /media/amit/LaCie/mdc_work/chigozie/pool1/bam
for x in *.bam ; do
echo "print current:$x";
bedtools bamToBed -i "$x" > "${x%.bam}.bed";
done
echo…

user1738234
- 73
- 7
1
vote
1 answer
Filter overlapping entries in bed file (2)
This is a follow-up of my previous question.
This time, in case two entries in bed file overlap I would like to keep one of them in the output (randomly selected). Preferably, I look for a modification of the previous answer (bedtools package). For…

maciek
- 1,807
- 2
- 18
- 30
1
vote
1 answer
using perl array as input to bash bedtools command
I'm wondering if it is possible to use a perl array as the input to a program called bedtools ( http://bedtools.readthedocs.org/en/latest/ )
The array is itself generated by bedtools via the backticks method in perl. When I try to use the…

furryfoo
- 11
- 2
0
votes
1 answer
ISSUE: malformed BED entry at line 2. Start was greater than end. Exiting. bedtools
I am trying to use bedtools getfasta on a txt file but some of the chromosome coordinates from big to low, how can I fix this so that all chromosome coordinates are from low to big? I am using command line on Ubuntu.
I expected the command to run…

Deep
- 1
0
votes
0 answers
Installing Deeptools in R
> install.packages("bedtools")
Also tried this with bedtoolsr. Is there a way to force install? I am using version R 4.2.2.
Warning in install.packages :
package ‘bedtools’ is not available for this version of R
A version of this package for…

erman
- 11
- 1
0
votes
1 answer
bash loop file in one folder against all files in another folder
I am trying to do a (bedtools) intersect. Anyone see what is wrong with my bash code here?
#!/bin/bash
dir=$(pwd)
query=$dir/query_beds
pgs=$dir/pgs_beds
for file in $query/*; do
bedtools intersect -wa -wb -a $file -b $pgs/* -c -C -sorted…

clemaster
- 1
- 1
0
votes
0 answers
Getting tsv file into 1Kb genomic bins
I have a .tsv file set out as chromosome - genomic position - methylation status:
I want to bin it into 1Kb bins of genomic regions, as well as get the third columns average.enter image description here
i.e. Get the methylation average per 1kb…

Hannaho
- 1