bgr files: change chromosome annotation
0
0
Entering edit mode
2.8 years 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 • 981 views
ADD COMMENT
0
Entering edit mode

what did you find so far ?

ADD REPLY
0
Entering edit mode

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

ADD REPLY
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.

ADD REPLY
0
Entering edit mode

Hi,

Could you post an example of your bgr file, please?

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

ADD REPLY

Login before adding your answer.

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