Questions tagged [bedtools]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
39 views

Get a certain gene sequence from bam/vcf and reference

I need to get a fasta sequence of a certain gene for a certain worm strain that is different from reference. I have a reference genome, BAM for the strain of interest, and coordinates of the gene. I ...
user98747's user avatar
3 votes
1 answer
106 views

Why doesn't bedtools getfasta pick up the first base?

I am using bedtools getfasta to convert genomic coordinates to sequences. I feed it a bedfile containing say chr1 s.start s.end. When I check the sequence output, it does not include the s.start base. ...
venkatesh war's user avatar
1 vote
1 answer
56 views

obtaining a fragment data file bed from bam

Im trying to follow this pipeline https://github.com/epifluidlab/cragr on cfDNA WGS. I have bam files from paired end reads aligned with bwa mem. The workflow requires bgzipped and indexed fragment ...
Julieta's user avatar
  • 21
1 vote
0 answers
26 views

`bedtools`: Intersecting/map into only one interval when there are multiple matches?

I have the following list of intervals Chr start end chr1 0 5 chr1 5 10 chr1 10 15 chr1 15 20 chr1 20 25 chr1 25 30 and the following CpGs I'd like to intersect with the intervals and ...
basesorbytes's user avatar
3 votes
2 answers
76 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
170 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
  • 301
2 votes
1 answer
326 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
24 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
  • 374
1 vote
1 answer
112 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
147 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
17 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
224 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
  • 161
2 votes
2 answers
120 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
  • 374
2 votes
4 answers
1k 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
45 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
121 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
358 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
811 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
627 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
85 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,100
1 vote
3 answers
740 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
78 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
186 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,427
2 votes
1 answer
35 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
  • 115
1 vote
2 answers
5k 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
  • 115
1 vote
1 answer
772 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
90 views

Joining columns to a sorted file

I have had a segmentation file (copy number) like below ...
Angel's user avatar
  • 1,981
3 votes
1 answer
246 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
3k 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,784
1 vote
1 answer
178 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
  • 155
1 vote
1 answer
482 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
1k 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
162 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,403
1 vote
1 answer
436 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
5 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
534 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 ...
Angel's user avatar
  • 1,981
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
218 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
329 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
  • 631
3 votes
1 answer
145 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
7k 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,427
2 votes
1 answer
84 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
214 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
124 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
58 views

How to apply function on bedfile based on a reference bedfile

I have two bed-like files: File1 ...
gc5's user avatar
  • 1,783
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,783
0 votes
2 answers
329 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,100
6 votes
4 answers
735 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