This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Cutting part of a column in a bed file

Hello everyone!! I have the whole first column of a bed file (its a genome annotation file) that I want to cut a part of the text. I have "chr12" or whatever chr+number, but I need it to be only the number of the chromosome (like "12"). How can I correct that? if it is with sed, which command should I use?

I have:

chr1    123456  123789
chr1    123790  123890
chr1    123891  124569

I need:

1   123456  123789
1   123790  123890
1   123891  124569

Thanks everyone!!

bed edit cut

1 answer

Hello, question already answered many times

https://stackoverflow.com/questions/29275971/need-to-remove-the-string-chr-and-the-sign-from-the-file

Log in to answer this question.