Mapping in R/qtl

495 views
Skip to first unread message

Mohamed ElSoda

unread,
May 13, 2011, 5:54:45 AM5/13/11
to rqtl...@googlegroups.com
Dear Karl,
I am using r/qtl to make a map for Brassica F7 RIL population. It is recognized as F2 "I think that should be ok?".
I used this script
Map <- read.cross("csv", "M:/R-qtl", "Map.csv", na.strings="na",genotypes=c("a","h","b"),alleles=c("a","b"), estimate.map=FALSE),   but I got this
warnning message 
In summary.cross(cross) :
    Some chromosomes > 1000 cM in length; there may be a problem with the genetic map.
    (Perhaps it is in basepairs?)
 I tried your reply to a previouse question by using (estimate.map, replace.map), but it didn't help.
Any advice?
 
Best regards,
Mohamed El-Soda,
Wageningen University, P.O. Box 309
6700 AH Wageningen
The Netherlands


 

Karl Broman

unread,
May 13, 2011, 8:31:40 AM5/13/11
to rqtl...@googlegroups.com


On May 13, 2011, at 5:54 AM, Mohamed ElSoda <elsoda....@gmail.com> wrote:

Dear Karl,
I am using r/qtl to make a map for Brassica F7 RIL population. It is recognized as F2 "I think that should be ok?".
I think no; you want to use convert2riself() to convert to cross type "riself". This will also drop het genotypes.

I used this script
Map <- read.cross("csv", "M:/R-qtl", "Map.csv", na.strings="na",genotypes=c("a","h","b"),alleles=c("a","b"), estimate.map=FALSE),   but I got this
warnning message 
In summary.cross(cross) :
    Some chromosomes > 1000 cM in length; there may be a problem with the genetic map.
    (Perhaps it is in basepairs?)
 I tried your reply to a previouse question by using (estimate.map, replace.map), but it didn't help.
Any advice?

In what way did it not work?  An error message?  

It may be that there are problem markers that are leading to big gaps in the map and need to be removed.

karl

Mohamed ElSoda

unread,
Mar 4, 2012, 4:07:35 PM3/4/12
to rqtl...@googlegroups.com
Dear Karl,
 
I am trying to get a heatmap using LOD scores.
I am using these scripts
 

x <- read.csv("bath")

row.names(x) <- x$Name

x<- x[,4:20] 

x_matrix <- data.matrix(x)

x_matrix <- t(x)

heatmap(as.matrix(x_matrix,nrow(x_matrix),ncol(x_matrix)),Colv=NA)

1-How can I set colours based on LOD scores (-6 to -4 = green), (-4 to -2 blue), (-2 to 2 = white), (2 to 4 = yellow), (4 to 6 = red)?
2- How to put a bar with colour scale?
 
Thanks in advance,
 
Mohamed
 

Karl Broman

unread,
Mar 4, 2012, 4:52:31 PM3/4/12
to rqtl...@googlegroups.com
Your question isn't related to R/qtl, but I'll attempt to answer it anyway.

I've never used the function heatmap(), but I expect it's similar to image(), for which you'd specify colors with the argument 'col' and intervals with 'breaks', like the following:

x <- matrix(runif(100, -6, 6), ncol=10)
colorpal <- c("green","blue","white","yellow","red")
brks <- c(-6, -4, -2, 2, 4, 6)
image(x, col=colorpal, breaks=brks)

To get a color scale, I've generally used layout() to create two side-by-sdie

layout(cbind(1,2), width=c(6,1))

colorpal <- c("green","blue","white","yellow","red")
brks <- c(-6, -4, -2, 2, 4, 6)
image(x, col=colorpal, breaks=brks)

v <- seq(-6, 6, length=251)
image(1, v, matrix(v, nrow=1), col=colorpal, breaks=brks, ylab="", xaxt="n", xlab="")

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