Closed DannyArends closed 12 years ago
class(population) <- c("population","riself")
map <- est.map(crossOriginal) crossOriginal <- replacemap(crossOriginal,map) population$maps$genetic <- convertMap.internal(map) p25 <- generate.biomarkers(population,overlapInd=25) p25 <- scan.qtls(p25) Analysing marker: 50 Analysing marker: 100 c25 <- cross.saturate(p25) class(c25)[1] <- "riself"
m25 <- est.map(smooth.geno(c25,pop=p25)) jpeg("start.jpg") plot(pull.map(crossOriginal),m25) dev.off() null device 1 avg_map_distance(m25) $
1
[1] 2.517865
$2
[1] 3.575718
$3
[1] 2.044833
$4
[1] 4.447536
$5
[1] 2.592858
c25 <- replace.map(c25,m25)
We scan 60:40 for additional Chr 2 and 4 markers
p64 <- generate.biomarkers(population,overlapInd=25,proportion=c(60,40))
there are two ways to deal in here, 1:
p64 <- pull.geno.from.cross(p64,c25,"genetic")
p64 <- scan.qtls(p64)
or just:
c64 <- cross.saturate(p64, c25,chr=4:5) Analysing marker: 50 Analysing marker: 100 Analysing marker: 150
because if you are using a cross in here, the genetic data is taken from the cross and qtl has to be rescanned anyway
class(c64)[1] <- "riself" m64 <- est.map(smooth.geno(c64,pop=p64)) jpeg("60t40.jpg") plot(pull.map(crossOriginal),m64,chr=c(2,4,5)) dev.off() null device 1 avg_map_distance(m64) $
1
[1] 2.550208
$2
[1] 3.613638
$3
[1] 2.057745
$4
[1] 4.062585
$5
[1] 2.499742
c64 <- replace.map(c64,m64)
We scan 40:60 for additional Chr 5 markers
p46 <- generate.biomarkers(population,overlapInd=25,proportion=c(40,60))
we want ot saturate cross c64, rigth?
c46 <- cross.saturate(p46, c64, chr=5) Analysing marker: 50 class(c46)[1] <- "riself" m46 <- est.map(smooth.geno(c46,pop=p46)) jpeg("40t60.jpg") plot(pull.map(crossOriginal),m46,chr=c(2,4,5)) dev.off() null device 1 avg_map_distance(m46) $
1
[1] 2.49224
$2
[1] 3.606422
$3
[1] 2.124167
$4
[1] 4.032879
$5
[1] 2.249206
c46 <- replace.map(c46,m46)
So I have this code:
Test overlap for pheno 2 geno
(c) 2012 Danny Arends
set.seed(1200) library(pheno2geno) setwd("E:\GBIC\Konrad\map") load("E:\GBIC\Konrad\map\populationWithoutWrongBatch.rdata") load("E:\GBIC\Konrad\map\crossOriginalCorect.rdata")
avg_map_distance <- function(m){ if(any(class(m)=="cross")) m <- pull.map(m) lapply(m,function(x){(max(x) - min(x)) / length(x)}) }
class(population) <- c("population","riself")
map <- est.map(crossOriginal) crossOriginal <- replacemap(crossOriginal,map) population$maps$genetic <- convertMap.internal(map) p25 <- generate.biomarkers(population,overlapInd=25) p25 <- scan.qtls(p25) c25 <- cross.saturate(p25) class(c25)[1] <- "riself"
m25 <- est.map(smooth.geno(c25,pop=p25)) jpeg("start.jpg") plot(pull.map(crossOriginal),m25) dev.off() avg_map_distance(m25)
We scan 60:40 for additional Chr 2 and 4 markers
p64 <- generate.biomarkers(population,overlapInd=25,proportion=c(60,40)) p64 <- scan.qtls(p64) c64 <- cross.saturate(p64, m25,chr=4:5)
p64 <- pull.geno.from.cross(p64, c25)
class(c64)[1] <- "riself" c64 <- est.map(smooth.geno(c64,pop=p64)) jpeg("60t40.jpg") plot(pull.map(crossOriginal),c64,chr=c(2,4,5)) dev.off() avg_map_distance(c64)
We scan 40:60 for additional Chr 5 markers
p46 <- generate.biomarkers(population,overlapInd=25,proportion=c(40,60)) p46 <- scan.qtls(p46) c46 <- cross.saturate(p46, c64, chr=2:4:5)
p46 <- pull.geno.from.cross(p46, c25)
class(c46)[1] <- "riself" c46 <- est.map(smooth.geno(c46,pop=p46)) jpeg("40t60.jpg") plot(pull.map(crossOriginal),c46,chr=c(2,4,5)) dev.off() avg_map_distance(c46)
I tried: