bed to bigBed conversion
1
4
Entering edit mode
9.1 years ago
tanni93 ▴ 50

Hi all,

I am having trouble converting a bed file into a bigBed file --> how many I do this without much programming?

Thank you,
Tanni

RNA-Seq • 11k views
ADD COMMENT
3
Entering edit mode
9.1 years ago

If you're using Linux, you can grab a couple of the UCSC Kent tools:

$ wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/bedToBigBed
$ wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/fetchChromSizes

Make them executable:

$ chmod +x ./bedToBigBed ./fetchChromSizes

Fetch a chromosome size file for your build of interest (e.g., hg19 or hg38):

$ ./fetchChromSizes hg38 > hg38.chrom.sizes

Sort your BED file, for instance, with BEDOPS sort-bed:

$ sort-bed regions.unsorted.bed > regions.bed

Convert to bigBed:

$ ./bedToBigBed regions.bed hg38.chrom.sizes regions.bb

You might specify additional options for conversion; run bedToBigBed on its own for more information.

ADD COMMENT
0
Entering edit mode

Hi Alex,

My bedToBigBed is giving me this error: cannot execute binary file

ADD REPLY
0
Entering edit mode

Are you running Linux? What version?

ADD REPLY
0
Entering edit mode

FYI, this is a permissions error. You can edit the permissions and run that program with the following command:

chmod +x ./bedToBigBed

Then you can run the program and see a usage message:

./bedToBigBed
bedToBigBed v. 2.8 - Convert bed file to bigBed. (bbi version: 4)
usage:
   bedToBigBed in.bed chrom.sizes out.bb
...

More direct documentation here: https://genome.ucsc.edu/goldenPath/help/bigBed.html

ADD REPLY
0
Entering edit mode

never mind. i made a mistake

ADD REPLY
0
Entering edit mode

If you're using MacOS, you can do an identical operation but download the Mac commands instead of the Linux:

$ wget http://hgdownload.cse.ucsc.edu/admin/exe/macOSX.x86_64/bedToBigBed
$ wget http://hgdownload.cse.ucsc.edu/admin/exe/macOSX.x86_64/fetchChromSizes
ADD REPLY

Login before adding your answer.

Traffic: 1206 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