# Function for creating .pdf files with plots of per-locus linkage scores # for the optimal ordered subset for each covariate. This function # requires output from FLOSS version 1.4.1 or later. For comparison, # each graph also plots the per-locus linkage scores for the set of all families. # # The plot for covariate "XXX" is written to file "XXX.pdf". To run this script # # 1. Save this script to your computer. # 2. Start R (available for download from the web at www.r-project.org). # 3. At the R prompt enter: # # source("") # # where is the full pathname for this script (see step 1). # 4. At the R prompt enter: # # plt2pdf("") # # where is the full pathname of the FLOSS ".plt" file. # plt2pdf <- function(filename) { d <- read.table(filename, header=TRUE); for (j in 3:dim(d)[2]) { cov.name <- names(d)[j]; pdf(paste(cov.name, ".pdf", sep="")); x <- c(d[,1], d[,1]); y <- c(d[,2], d[,j]); plot(x, y, pch=20, main=paste(cov.name, " vs. all families"), xlab="Position", ylab="Linkage Score"); lines(d[, c(1,2)], lty=2); lines(d[, c(1,j)], lty=1); grid(); dev.off(); } }