Font Size for Marker Names in Genetic Map

372 views
Skip to first unread message

James E Specht

unread,
Mar 4, 2012, 3:33:10 PM3/4/12
to rqtl...@googlegroups.com
Karl: 
 
In your tutorial on genetic map construction you finish with a plot of the genetic map (Fig. 22).  Is there an argument that one can include in the plot.map cmd that will reduce the font size of the marker name "data labels" sufficiently to be just barely readable, thereby resulting in less marker name overlap, excepti for the very close linked markers in each chr?  I am not thinking of a publication ready graph here, just an interim graph for interpetation of marker names on the map 
 
I have tried the identify function and the textxy function for this purpose, but they did not work (see my below code) for the plot of the first 4 chromosomal map set of five needed for 20 chromosomes.  For these two functions, I assumed that the x vector was chr (numbers) and the y vector was pos (map positions on each chr), by pos is not recognized as a valid y, and (1:4) is not recognized as a valid x.  Perhaps these only work on scatterplots not genetic map type plots. 
 
Still, do you have any suggestions of simple code that would reduce the font size of (ONLY) the data labels (marker names)?  I dob't know R that well, but have been able to work thru and understand R cmd code suggestions when offered these. 
 
- Jim
 
plot.map(OBJNAME, chr=c(1:4), show.marker.names=FALSE, horizontal=FALSE, shift=FALSE, alternate.chrid=TRUE)
mtext(side=3, "F2 Population P1076 - PI 437.112A X Dwight", line=0.8)
# Above plot cmd works ok. 
# The textxy cmd is from the calibrate package, but x (chr?), y (pos?) did not work when variable names were subbed for x,y.
#textxy(x, y, labs=c(marker.names), cx=0.5)
# Below cmd does not work either. 
identify(x y, labels=(rownames(OBJNAME)), cex=0.5)
 

Karl Broman

unread,
Mar 4, 2012, 3:56:22 PM3/4/12
to rqtl...@googlegroups.com
plot.map doesn't have an argument to modify the size of the marker labels.

You can decrease it with par(cex=[small number]), but then the axis labels change too:

data(hyper)
par(cex=0.5)
plot.map(hyper, show.marker.names=TRUE)

You can use cex.axis, cex.lab, and cex.main to increase the axis labels:

par(cex=0.5, cex.axis=2, cex.lab=2, cex.main=2, mar=c(6.1, 6.1, 4.1,1.1))
plot.map(hyper, show.marker.names=TRUE)

Or you can save the code for the function to a file and then edit to suit:

dput(plot.map, file="my_plot_map.R")

karl

> --
> You received this message because you are subscribed to the Google Groups "R/qtl discussion" group.
> To post to this group, send email to rqtl...@googlegroups.com.
> To unsubscribe from this group, send email to rqtl-disc+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rqtl-disc?hl=en.

Reply all
Reply to author
Forward
0 new messages