read a genetic map into r/qtl

16 views
Skip to first unread message

Eric González

unread,
Mar 18, 2024, 7:00:00 PMMar 18
to R/qtl discussion
Hello,

I have a genetic map that is ready. I have the marker names, physical positions and genetic distances.  Some of my chromosomes are inverted. The genetic distance increase, but the physical distances decrease. I would like to read this data in to qtl and use the function flip.order() . Is it possible to do this in qtl?

Many thanks,

Eric

Karl Broman

unread,
Mar 18, 2024, 7:10:03 PMMar 18
to R/qtl discussion
Yes, exactly; flip.order is precisely the function to use. I'd forgotten it existed.
Here's an example for flipping the order of markers on chr 4 in the hyper data:

library(qtl)
data(hyper)
hyper_flip4 <- flip.order(hyper, chr=4)

You could also use switch.order, but it will do a re-estimation of inter-marker distances, and so may not give you the exact same map back. So flip.order() is better for what you want, as the inter-marker spacings are preserved.

hyper_switch4 <- switch.order(hyper, chr=4, nmar(hyper)[4]:1)

karl
Reply all
Reply to author
Forward
0 new messages