Questions tagged [bed]

BED (Browser Extensible Data) format in bioinformatics provides a flexible way to define the data lines of genomic features that are displayed in an genome annotation track. BED lines have 3 required fields (chromosome, start position, end position) and 9 additional optional fields. For other bioinformatics formats, such as FASTA, FASTQ, VCF, GFF, BAM/SAM, etc, use their own separate tags.

BED (file format) - Wikipedia

BED format - Genome Browser FAQ
BED (Browser Extensible Data) format provides a flexible way to define the data lines that are displayed in an annotation track. BED lines have three required fields and nine additional optional fields. The number of fields per line must be consistent throughout any single set of data in an annotation track. The order of the optional fields is binding: lower-numbered fields must always be populated if higher-numbered fields are used.

BED information should not be mixed as explained above (BED3 should not be mixed with BED4), rather additional column information must be filled for consistency, for example with a "." in some circumstances, if the field content is to be empty. BED fields in custom tracks can be whitespace-delimited or tab-delimited. Only some variations of BED types, such as bedDetail, require a tab character delimitation for the detail columns.

The first three required BED fields are:

chrom - The name of the chromosome (e.g. chr3, chrY, chr2_random) or scaffold (e.g. scaffold10671).
chromStart - The starting position of the feature in the chromosome or scaffold. The first base in a chromosome is numbered 0.
chromEnd - The ending position of the feature in the chromosome or scaffold. The chromEnd base is not included in the display of the feature, however, the number in position format will be represented. For example, the first 100 bases of chromosome 1 are defined as chrom=1, chromStart=0, chromEnd=100, and span the bases numbered 0-99 in our software (not 0-100), but will represent the position notation chr1:1-100.

26 questions
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
1 answer

How to get strand when extracting fasta sequences using bed file

I am trying to extract fasta sequences from a genome using a bed file (homemade). The bed file looks like this (tab separated): LQNS02278165.1 13104710 13109495 + LQNS02278165.1 9139127 9142308 + LQNS02278165.1 13665793 …
2
votes
1 answer

How to subset bed files based on the fragment length?

I am working with bed files and I want to subset rows that are in a specific size range. I'm only interested in rows that "chromEnd - chromStart" is between the range of 140-160. for example for the following bed file I want to subset the second and…
mahdi.kh
  • 33
  • 5
2
votes
2 answers

Make a Venn diagram of 5 bed files overlapped

I have to compare the overlap or shared regions for 5 bed files and make a venn diagram of the overlapped regions. I can use pybedtools but it's for 3 files max. Or I found http://bioinformatics.psb.ugent.be/webtools/Venn/ It's look like a good…
Nono_sad
  • 433
  • 4
  • 16
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
2
votes
2 answers

Convert BED file to WIG file

Do you know any way to convert easily (either by R, or with other program) a BED file to WIG? Can you give me some guidelines?
Anna
  • 147
  • 2
  • 4
  • 12
1
vote
1 answer

How to intersect and merge files with python/pandas to divide overlap into subregions based on original input file?

I have a few .bed files from different companies offering exome sequencing kits. I would like to have a file that summarizes all target regions for all these kits. The .bed file have a basic structure composed for three columns (chr#, Start, End). I…
jordimaggi
  • 99
  • 1
  • 11
1
vote
3 answers

Merging multiple files with two common columns, and replace the blank to 0

I extremely appreciate if anyone could me help to merge multiple files (up to 8) with two common columns ($1$2). I want to get all values of $3 and replace the blank with 0. Here are the samples from 4 files File1: chr1 111001 234 chr2 22099 …
Lala
  • 65
  • 4
1
vote
2 answers

Reading BED files into pandas dataframe (windows)

For a bioinformatics project, I would like to read a .BED file into a pandas dataframe and have no clue how I can do it and what tools/programs are required. Nothing I found on the internet was really applicable to me, as I am working on windows10…
JazzyJazz
  • 75
  • 1
  • 2
  • 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

Average interval lengths in BED files with Bioconductor

I'm trying to execute a pretty simple operation but I haven't figured it out. I'm trying to get the average interval length of all intervals in a particular BED file I have imported in R. This BED file contains no overlapping intervals. This is what…
Svencken
  • 479
  • 6
  • 14
1
vote
1 answer

How to process two bed files for finding overlapped regions in parallel?

I want to process more than one bed files for finding overlapped regions. I read my data set as data frame, and how can I efficiently scanning two data set in parallel in order to detect where is the overlapped regions occurred. My approach is every…
user3627887
0
votes
0 answers

Repeated error when trying to run Admixture with .bed file

I was sent a .bed file with the corresponding .fam and .bim files to run in terminal using ADMIXTURE. Initially, when running Admixture on the .bed file, it would fail and the error said "PLINK Input file error". I tried to work around using the…
0
votes
0 answers

Flutter REST API authentication method returns "400 Bad Request" error (with first letter capitalized)

static Future requestQuotesListHistory( String url, Map bodyx) async { Map _header = { "Authorization": "Bearer $vToken", }; try { print(_header); print(vToken); …
Mukesh kumar
  • 101
  • 1
  • 4
0
votes
1 answer

How do I find all rows in a table where the first column contains 1 (or a specific number) in bash?

There is a .bed file. It has 4 columns. First contains the number of the chromosome. I need to write a bash script, to get every row which belongs to a specific chromosome, then in those cases subtract the second column from the third column (this…
Rames
  • 13
  • 1
1
2