Questions tagged [bedtools]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
30 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 ...
3
votes
5answers
4k 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: ...
1
vote
1answer
48 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 ...
3
votes
1answer
132 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: ...
1
vote
3answers
96 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 ...
0
votes
2answers
90 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. ...
1
vote
3answers
73 views

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

From the bedtools intersect man (for version 2.30.0): ...
1
vote
1answer
32 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 ...
0
votes
1answer
24 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 ...
0
votes
0answers
18 views

Question: Combine BedTools Closest and Window Command

I am new to using Bedtools so please excuse my possible naive question. Let's say my file A is Snps and file B is genes. The Closest command with -k flat let one set how many genes that are closest to ...
7
votes
4answers
1k views
7
votes
5answers
2k views

Merging bed records based on name

I generated a file starting with the following bed lines: ...
2
votes
1answer
839 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 ...
2
votes
2answers
62 views

How to get the genomic sequences from a blat result?

Assume we have a query.fa file that contains sequences and we run: ...
2
votes
1answer
23 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 ...
1
vote
0answers
204 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 ...
1
vote
2answers
2k 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 ?
1
vote
1answer
202 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 ...
0
votes
1answer
65 views

Joining columns to a sorted file

I have had a segmentation file (copy number) like below ...
0
votes
0answers
170 views

multiBamCov for counting reads overlapping a bin interval

I am using multiBamCov from bedtools to count reads in my bed file. I want to count the reads in the specified bins in my bed file such that if the read in the bam file overlap the interval more than ...
2
votes
1answer
1k 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 ...
1
vote
1answer
68 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 ...
1
vote
2answers
434 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 ...
2
votes
2answers
89 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 "...
1
vote
1answer
213 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,...
4
votes
3answers
1k 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 ...
-9
votes
1answer
275 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 ...
1
vote
1answer
709 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. ...
2
votes
2answers
122 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 ...
2
votes
2answers
723 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? ...
3
votes
1answer
120 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 ...
1
vote
0answers
234 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 <...
2
votes
1answer
60 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 ...
6
votes
1answer
132 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 ...
4
votes
1answer
67 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: ...
3
votes
1answer
48 views

How to apply function on bedfile based on a reference bedfile

I have two bed-like files: File1 ...
2
votes
1answer
392 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: ...
0
votes
2answers
203 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: ...
6
votes
4answers
539 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), ...
0
votes
2answers
319 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 ...
2
votes
2answers
390 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 ...
1
vote
2answers
387 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. ...
4
votes
2answers
153 views

Using column 2 of one file to match with two columns of another file, and append

I have file 1 like following: 1 15776220 15776240 GTGACCAGCAGGTGTCTCTG 16855676 16855696 CTGTCCAGCAGAGGGCGGTG And file 2 as following ...
3
votes
1answer
495 views

Dealing with indels when converting a position to chromStart and chromEnd for a bed file

Starting with a chromosome # and position, I am trying to get chromStart and chromEnd values for a .bed file, but I am not sure how to calculate chromEnd when I have a variant that is an insertion or ...
8
votes
1answer
4k views

How to count reads in bam per bed interval with bedtools

I recently installed Ubuntu 16.04 (because I was still using 12.04). But it seems my bedtools scripts don't work properly anymore. I can't figure out how to use the new bedtools for my old ways. What ...
4
votes
1answer
251 views

How to filter intervals (reads or genomic coordinates) that have the exact same 5' or 3' ends?

Say I have reads that overlap some genes that produce small RNAs, but I want only those reads that start at exactly the TSS of the loci. In other words, reads whose 5' end match the 5' end of a ...
3
votes
1answer
414 views

How to extract exome on-target reads in batch?

I was given a list of target regions in BED and many exome alignments in BAM. I was asked to extract on-target alignments from these BAMs to save disk space. I know I can use bedtools to extract sub-...