@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.
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.
4 answers
Two things i'm not sure about:
- Your data as posted in your answer are in the form of an HTML table. BED data should be tab-delimited.
- 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.
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).
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.
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.
Log in to answer this question.