Questions tagged [bedtools]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
29 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 ...
1
vote
3answers
35 views

Unexpected error using “stdin” in bedtools intersect as a piped command

From the bedtools intersect man (for version 2.30.0): ...
-2
votes
0answers
13 views

First time Using pyBIgWig to

I need help with pyBIgWig. I want to plot the average profile for a histone mark using a chip-seq bed file in python. Any code or explaination on how to do that is welcomed.
0
votes
1answer
19 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
10 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 ...
2
votes
2answers
50 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
22 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
2answers
1k 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
124 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 ...
2
votes
1answer
90 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: ...
2
votes
1answer
730 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
56 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
0answers
174 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
344 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
81 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 "...
0
votes
0answers
149 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 ...
6
votes
4answers
1k views

How to do `bedtools intersection` using pandas alone?

I have two pandas Dataframes, using python3.x: ...
1
vote
1answer
167 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
849 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
222 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
608 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
106 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
615 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? ...
1
vote
0answers
211 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 <...
3
votes
1answer
107 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 ...
2
votes
5answers
3k 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: ...
0
votes
0answers
48 views

From bedtools “genomecov” back to .bed

I have the results of: bedtools genomecov -d... Output: 0 0 10 10 10 20 20 And i want to convert it back to bed file. e....
2
votes
1answer
54 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
124 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
66 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
47 views

How to apply function on bedfile based on a reference bedfile

I have two bed-like files: File1 ...
2
votes
1answer
734 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 ...
0
votes
2answers
188 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
511 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), ...
2
votes
1answer
385 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
301 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
347 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
376 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
151 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
435 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
224 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 ...
6
votes
5answers
2k views

Merging bed records based on name

I generated a file starting with the following bed lines: ...
3
votes
1answer
395 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-...