Questions tagged [bedtools]

The tag has no usage guidance, but it has a tag wiki.

Filter by
Sorted by
Tagged with
3 votes
2 answers
50 views

Create bed file where each column is the number of intersections with another bed file

For example I have 3 bed files: window.bed: chr1 0 1000 chr1 1000 2000 lp1.bed: ...
rscott's user avatar
  • 31
1 vote
1 answer
104 views

What are the columns in bedtools coverage output hist file?

I am using bedtools to caculate the coverage of my targets of my WES data, to later plot. But to plot, I need to know what to plot and what it is I am seeing. I have unsuccefully tried to find what ...
Dandelion's user avatar
  • 129
2 votes
1 answer
158 views

converting coordinates to sequences using bedtools getfasta - [segmentation fault] errors

I use bedtools to convert genomic coordinates (in the form of bed files, chrX x1:x2) to genomic sequence content in the form of fasta files ('ACGT...G'). The bedtools format for extracting sequence (....
Zebra Fish's user avatar
2 votes
0 answers
21 views

Efficiently count reads overlapping a split feature

I have a bam file with reads, and a set of features. The particularity is that some features are "split", being made of several sub-features. For example, here ...
Alexlok's user avatar
  • 277
1 vote
1 answer
66 views

How to chop fasta / bed /peak file genomic segments into smaller fixed or custom genomic intervals

I am trying to split my .bed/.fa file genomic segments into arbitrary smaller overlapping intervals: Consider a typical line/row in my *.bed file as follows: chrom. $\ \ \ \ \ $ start $\ \ \ \ \ \ \ \...
Zebra Fish's user avatar
2 votes
1 answer
128 views

Count reads at specific gene features

I have BAM files from an RNA-Seq experiment and for all genes (or a subset) I want to get the number of reads in regions around the TSS (e.g. 2kbp) and the TES (e.g. 2 kbp) and calculate the ratio ...
justinian482's user avatar
2 votes
0 answers
15 views

Calculate interval of flanking introns

I am looking for a easy way to calculate the intervals of flanking introns based on a transcript annotation file. I have chosen a very complicated method: ...
serbe204's user avatar
3 votes
0 answers
163 views

How to remove redundancy from a gtf file?

I have an annotation file. I would like to remove redundancy, as shown in the example (in the real file, I have a lot of these redundant cases). I would like to consider only one of the following ...
Marco's user avatar
  • 141
2 votes
2 answers
69 views

Bedtools count split reads spanning whole feature

[Note: this is for bedtools v2.30] I want to count the number of RNA-Seq reads that fully cover a given splice junction. For that, I thought of defining a BED feature around the junction, then using <...
Alexlok's user avatar
  • 277
2 votes
4 answers
873 views

Methods to work directly with bigbed file?

I am now trying to find intersect genes of two files: one is .bigbed file (very large, 117GB), and the other is a .bed file. At first, I tried to convert bigbed file to bed file and then applied ...
Binhuan Sun's user avatar
1 vote
2 answers
39 views

Understanding exercise on file coverage with question on summary statistics

I'm doing an exercise that asks for two files: Input 1: A target file (.bed format) contains multiple regions from ...
moth's user avatar
  • 111
0 votes
1 answer
81 views

Edit end column in GFF3 file

I am trying to edit the "end" of my sequences in a GFF3 that contains 10000 sequences (so I do not want to do it manually). I want to add 30 residues to every single fragment. How can I do ...
obsmith's user avatar
  • 21
1 vote
1 answer
254 views

alternative to HOMER's mergePeaks

Recently, our lab ran a 192 sample experiment through our ATACseq pipeline. In doing so, HOMER's mergePeaks told us that our 512 GB RAM server had too little memory ...
Jeff's user avatar
  • 177
1 vote
3 answers
632 views

Masking sites in a vcf file

I need to mask all sites in a vcf file flagged by the 1000 Genomes Project as being unfit for population genetic analyses. The sites for all chromosomes are available at: 1000Genomes masked sites From ...
John's user avatar
  • 115
0 votes
2 answers
511 views

Remove repetitive region vcf file using repeatmasker bed file [duplicate]

I have a 1000 genomes vcf file for chromosome 14. And I want to remove variants in repetitive regions flagged by repeatMasker. I have a bed file for those repeats. I downloaded that file from UCSC. ...
John's user avatar
  • 115
1 vote
1 answer
69 views

How to detect bedtools version used by pybedtools (in order to correctly preserve strand information when merging gtf records)

I have issues working with pybedtools due to strand information being lost after extracting and merging transcript coordinates from a gtf file. It seems that the solution to preserve strand ...
bli's user avatar
  • 3,080
1 vote
3 answers
586 views

Unexpected error using "stdin" in bedtools intersect as a piped command

From the bedtools intersect man (for version 2.30.0): ...
Jeff's user avatar
  • 177
0 votes
1 answer
63 views

How can I get bedtools to tell me which genes are being expressed?

I'm trying to align the Acinetobacter baumanii genome to a genome. I've already done the alignment, and I want to use bedtools to see which genes are being expressed exactly. When I try running the ...
sjgandhi2312's user avatar
2 votes
2 answers
153 views

How to get the genomic sequences from a blat result?

Assume we have a query.fa file that contains sequences and we run: ...
0x90's user avatar
  • 1,417
2 votes
1 answer
33 views

How to calculate the number of peaks that are upstream/downstream of some other peaks

I have 3 histone marks,I have used Macs2 for peak calling and diffBind to analyze the peaks. I was wondering if you know any way to calculate the peak numbers of one specific histone mark that occur ...
Mariam's user avatar
  • 95
1 vote
2 answers
4k views

merging two/or more bed file into one bed file

I am trying to merge two bed files (more in future) to one. my bed files are something like : . I need to merge them in a way to have the shared chromosome location. Is there a way to do that ?
Mariam's user avatar
  • 95
1 vote
1 answer
587 views

How to get the intersection of peaks after peak calling using MACS2?

I have following 5 narrow peak files after peak calling. K14_peaks.narrowPeak K15_peaks.narrowPeak K16_peaks.narrowPeak K3_peaks.narrowPeak K8_peaks.narrowPeak I ...
MudithMMBc's user avatar
0 votes
1 answer
79 views

Joining columns to a sorted file

I have had a segmentation file (copy number) like below ...
Exhausted's user avatar
  • 1,801
3 votes
1 answer
215 views

Bedtools wrongly indicates zero coverage

I have a BAM file produced using BWA-MEM and I need to calculate the coverage of each exon in this sequencing. I tried using this command: ...
PedroSebe's user avatar
  • 216
2 votes
1 answer
2k views

bedtool intersect multiple bed files

I have 7 biological replicate of a normal sample after peak-calling I converted it into bed files and now I want to find what are the common region between those . So i tried with bedtool intersect ...
kcm's user avatar
  • 1,694
1 vote
1 answer
158 views

Bedtools get fasta and ORF from a blastX run

Hello I made a blastX research (A query genome in nucleotide format translated into protein in 6 reading frames against a protein dabatase) And here is a head of ...
Grendel's user avatar
  • 123
1 vote
1 answer
361 views

bedtools coverage - Report the depth at each position in each A feature

I am using bedtools coverage to compute the sequencing depth at every positions of a chromosome but it didn't work as I expected. Instead it reported 0 coverage at every positions. This is how I did ...
Paul Endymion's user avatar
2 votes
2 answers
888 views

bedtools intersect on very large .bam file - -sorted confusion

I need to do a bedtools intersect operation on a very large .bam file. When I use the standard bedtools intersect operation, the process consumes all the memory on my system. From the bedtools ...
KirkD-CO's user avatar
  • 175
2 votes
2 answers
140 views

How to best detect the "peaks" in RNA-seq data that are not assigned to any gene?

I encountered that many reads from single-cell RNA seq data were lost in the analysis because not assigned to any gene (genome: galgal6). I am trying to find an approach than could give me all the "...
Natha's user avatar
  • 133
7 votes
4 answers
2k views

How to do `bedtools intersection` using pandas alone?

I have two pandas Dataframes, using python3.x: ...
EB2127's user avatar
  • 1,373
1 vote
1 answer
388 views

bedtools feature out of bounds

I'm trying to count the GC in regions leading up to polyA clusters. I found the bedtools command nuc, one of the outputs of which is the GC content. I took the mouse polyA cluster database from here,...
Sethzard's user avatar
4 votes
3 answers
2k views

How can I calculate coverage at single bases using a bam file?

I'm looking for a way to input a vcf or bed file (with specific base positions) and a bam file, and get the coverage at each base position (ie single base bins) using the bam file. I also want the ...
Frances K's user avatar
-9 votes
1 answer
478 views

Extracting the number SNP in each range

I have called copy number and I have 2 files (I have shared the link of my files ); One contains some ranges ...
Exhausted's user avatar
  • 1,801
1 vote
1 answer
1k views

bedtools unable to open file despite being tab-delimited

I got the following error when attempting to intersect two files. The file below is supposed to be the -a file. ...
DangIt's user avatar
  • 41
2 votes
2 answers
206 views

bedtools: get name column of alignment file A

I'm using the coverage function of bedtools to check whether a certain set of regions (file B) has any overlap with known ...
Flagon13's user avatar
  • 105
3 votes
2 answers
1k views

Unable to install bedtools on windows 10 ubuntu

I am trying to install bedtools on windows 10, but I get an error I don't understand. How can I fix it? ...
DangIt's user avatar
  • 41
1 vote
0 answers
308 views

bedtools single-nucleotide coverage in BED-specified regions for multiple BAMs

I have a BED6 (BED + name, score, strand info) file that defines some regions of interest. I also have a set of BAMs corresponding to different samples. I would like to obtain output similar to <...
merv's user avatar
  • 621
3 votes
1 answer
134 views

How to paste RSIDs in CADD output

I want to paste RSIDs in CADD output as CADD does not give RSID column in its output. For this purpose I am using bedtools intersect to compare two files and have RSID column in my CADD file. This is ...
Sarah's user avatar
  • 105
3 votes
5 answers
6k views

How to create a .bed file from .fasta? [duplicate]

I have some problems in creating a .bed file for hg19, so I will be able to visualize the .bed file in IGV. The .fasta file contains rows of this form: ...
0x90's user avatar
  • 1,417
2 votes
1 answer
78 views

Comparing two files with overlapping regions and get their associated information

I have two file that have overlapping regions. One file has chromosomes, position, CNV data and samples.Other file has chromosomes, positions and ensemble ids of genes. Here is some lines of two ...
Sarah's user avatar
  • 105
6 votes
1 answer
200 views

Generating random BED intervals given constraints

Problem is to generate a random BED interval given the following constraints: minimum start maximum end fixed length maximum ...
victorlin's user avatar
  • 161
4 votes
1 answer
113 views

How to use variables while calling pybedtools

I am trying to use bedtools and fetch sequences from a whole genome fasta file inside the script I get region coordinates as variables. For example: ...
lizaveta's user avatar
  • 203
3 votes
1 answer
57 views

How to apply function on bedfile based on a reference bedfile

I have two bed-like files: File1 ...
gc5's user avatar
  • 1,773
2 votes
1 answer
1k views

How to split bedfile into non-overlapping regions and compute aggregation function on duplicate segments

I have a bed-like file in which I have several overlapping regions with associated features. I want to split the overlapping regions into disjoint regions in order to process the file (e.g. with ...
gc5's user avatar
  • 1,773
0 votes
2 answers
293 views

Filtering bam file with bedtools intersect using strand specificity

I have a small sample of records from a bam file. I obtained them by intersecting with a bed file not enforcing strand-specificity. So I get them all back upon performing the same intersection again: ...
bli's user avatar
  • 3,080
6 votes
4 answers
673 views

Merging regions according to their identifier

I have a huge file (20 GB) which has a range of genomic locations, and for each location there is an identifier(4th column), ...
bapors's user avatar
  • 171
2 votes
1 answer
496 views

bed file merge book-end features only if same name in column 4

I have a bed file where some entries have the same name in column 4 but are book-ended in coordinates, e.g. see below: ...
719016's user avatar
  • 2,274
0 votes
2 answers
424 views

bed entries collapse based on score column

I have a bed file where some entries have the exact same chr:start-end but change in the name and score column. I would like to apply bedtools or a similar tool to obtain a filtered file where for ...
719016's user avatar
  • 2,274
2 votes
2 answers
632 views

Parse out exon coordinates from bed file for each gene

This is my bed file for all the exon coordinates I want to take out all the exons of a given gene. Let say I have gene in chr 1 which starts from chr1 11868 12227 ...
kcm's user avatar
  • 1,694
2 votes
2 answers
448 views

Approximate matches with bedtools intersect

I am using bedtools to test whether a set of variant calls produced by a new method is missing any variants from a set of known validated variants. ...
Daniel Standage's user avatar