This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to convert .wib files to .wig or .bed?

Hi everyone, I'm recently work on a project using genome traits. I need to convert .wib format files to .bed files. But I can't find any software doing this, even on UCSC. And I searched the website, found that years ago someone also asked this question but no one answered.

I hope someone can help us solve this problem.

wib bed wig bedtools

I've tried your suggestions, but it seems that .wib file is the binary version of .wig file, and the softwares (BEDOPS and wigToBigWig) produced errors like "Unrecognized line" or "Error: Invalid WIG line 1".

I wonder if I did anything wrong?

My apologize, I read "wig" instead of "wib". I actually never heard of .wib. Hope someone else can answer you.

When converting .wig files to .bed files, your suggestion works. But when it comes to .wib files, the softwares start to produce errors.

1 answer

Perhaps use wibToWig to convert from binary to Wiggle, and then convert2bed --input=wig < foo.wig > foo.bed or wig2bed < foo.wig > foo.bed to convert from Wiggle to BED.

Thanks, but I've found the same file which is in .bw instead of .wig.

By the way, I don't know how to use this wibToWig. I don't understand what I should input.

But fine, everything is ok now.

Can you say how everything is OK? Is this question not relevant anymore?

No, it's not because everything is done. As I mentioned, I found the same file in the format .bw instead of .wig. So I just skipped that question. And as I said, wibToWig still doesn't work.

Log in to answer this question.