bgr files: change chromosome annotation
0
0
Entering edit mode
3 months ago

How would I change chromosome names with sed or awk from 1-22, X, Y to chr(1-22,X,Y)? Is there an expression that I can use?

sed bedgraph expressions awk • 381 views
0
Entering edit mode

what did you find so far ?

0
Entering edit mode

Only see for changing the other away around, i.e. chr(1-22,X,Y) to 1-22, X, Y

1
Entering edit mode

Basically awk '{print "chr"\$X}' with X being the column where the chromosomes are in. Try to modify this minimal command to fit your needs, there are plenty of posts on that already that will inspire you to complete it.

0
Entering edit mode

Hi,

You can do this in terminal by typing:

head your_bgr_file.bgr

Make sure you highlight your example and click the 010101 button to code the example, so it's easier to copy and paste. You could also Edit your post and add it there.

-Pratik