Is this a .bed file? If so, why is it not importing into IGV properly?
4
0
Entering edit mode
9.7 years ago
biohack92 ▴ 170

I was given a file that the user said was a .bed file at it is formatted as follows:

chr1    17000    17200    10.1134
chr1    17200    17400    10.1134
chr1    17400    17600    10.1134
chr1    17600    17800    0
chr1    17800    18000    7.58506
chr1    18000    18200    12.6418
chr1    18200    18400    20.2268
chr1    18400    18600    5.05671
chr1    18600    18800    5.05671
chr1    18800    19000    7.58506
chr1    19000    19200    0
chr1    19200    19400    12.6418

The user wants to import it into Broad Institute's Integrative Genomics Viewer (IGV) but I'm having issues importing the file. Can someone explain what the issue may be? Thank you.

bed genomics bam igv • 3.9k views
ADD COMMENT
1
Entering edit mode
9.7 years ago
Dan D 7.4k

Two things i'm not sure about:

  1. Your data as posted in your answer are in the form of an HTML table. BED data should be tab-delimited.
  2. I'm not sure what that fourth column is supposed to be. You only need the first three columns. The rest are optional, and the fourth is "name". Odd to have floating point numbers as names, and the numbers are pretty low for typical BED score values.

If you can tell us what exactly the issues are when trying to import the BED data into IGV, that might give us more information with which to help you.

ADD COMMENT
0
Entering edit mode

@DanD, it's actually tab-delimited. I had a formatting issue while transferring from excel file. Fourth column is a normalized value that my lab is developing.

ADD REPLY
0
Entering edit mode

I had a formatting issue while transferring from excel file

That might be the key to the problem. Make sure you are using newline character as record delimiter, not carriage return (as in MacOS) or newline+carriage return (as in Windows).

ADD REPLY
1
Entering edit mode
9.7 years ago

This is more accurately a bedGraph file: http://genome.ucsc.edu/goldenpath/help/bedgraph.html

The distinction is simply that the fourth column encodes a value instead of a feature name. IGV places too much weight on file extensions, so try changing the name of the file from .bed to .bedgraph.

ADD COMMENT
1
Entering edit mode
9.7 years ago

I was given a file that the user said was a .bed file

Trust no one! This is especially true with data coming from Excel users!

Run cat -et foo.bed | head and make sure it is tab-delimited, and that each line has one proper newline character. Your data should look something like this:

chrN^I123^I345^I0.1234$
...

Tabs will be shown as ^I characters, and newline characters as $. If you have other stuff there, you can run into problems. Run man cat to learn more about its options.

ADD COMMENT
0
Entering edit mode
9.7 years ago
EagleEye 7.6k
If you wanted to be a bed file, try to make your 4th column as 5th ( the scores ) and you should have a name for each location as 4th column. Chr<tab>start<tab>end<tab>Peak1<tab>score Chr<tab>start<tab>end<tab>Peak2<tab>score Just follow this standard format, it should work. http://genome.ucsc.edu/FAQ/FAQformat.html#format1
ADD COMMENT

Login before adding your answer.

Traffic: 774 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6