[BioC] Plotting question: how to plot SNP location data?

Lauri.Nikkinen at veripalvelu.fi Lauri.Nikkinen at veripalvelu.fi
Wed Oct 31 07:30:57 CET 2007


Thank you Thomas for your response. I got the solution I was looking for
from Martin Morgan:

**********
Lauri --

I flattened your z and added 'Sib' and 'Location'

> snps <- data.frame(Sib=rep(seq(1, ncol(z)), each=nrow(z)),
+                    gtype=as.vector(z),
+                    Location=snploc$location)

I then created a vector of colours, using that to colour each point in a
dot plot:

> colours <- c("blue", "red", "black")
> library(lattice)
> dotplot(Sib~Location, snps, col=colours[snps$gtype])

(adding pch="|", cex=2 makes a plot similar to yours, with vertical bars
at each SNP, other point types provide different effects).

Martin
**********

Best regards,
Lauri
FRCBS



More information about the Bioconductor mailing list