Description Usage Arguments Details Value Examples
newLG
Using a named list of markers (list element names = LG names),
re-assign markers to linkage groups and re-orient markers. Most of the code is
taken from qtl::formLinkageGroups.#'
Note: all intermediate calculations are dropped. All chromosomes are set as
autosomes.
1 |
cross |
The QTL cross object. |
markerList |
A named list where element names are the chromosome IDs. Each element must contain a character vector specifying marker names. Markers in cross, but not in markerList will be dropped. Any markers in markerList that are not in markernames(cross) will be dropped. |
If any chromosomes are sex-specific, re-class such chromosomes after running newLG: using class(cross$geno[["Xchrom"]]) <- "S" or whatever. The new map has arbitrary cM positions where each marker is separated by 10cM. Run est.map to get true cM positions.
A cross object with markers reordered.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | library(qtlTools)
data(fake.bc)
cross<-fake.bc
## Not run:
fake.f2<-est.rf(fake.f2)
cross<-fake.f2
#Perturb the marker order and chromosome names
markerlist<-lapply(chrnames(cross), function(x) markernames(cross, chr =x))
names(markerlist) = sample(chrnames(cross),replace = F)
markerList<-lapply(markerlist, function(x) sample(x, replace = F))
#Make new cross with new marker order and chromosome names
cross2<-newLG(cross, markerList = markerList)
# completely perturb the genotype matrix, then pull back together
markerlist = list("1" = sample(markernames(cross), replace = F))
cross.noOrder<-newLG(cross, markerList = markerlist)
lgmar <- formLinkageGroups(cross.noOrder)
print(tab<-table(lgmar))
marlist<-lapply(1:length(unique(lgmar$LG)),
function(x) rownames(lgmar)[lgmar$LG==x])
cross2<-newLG(cross = cross.noOrder,
markerList = marlist)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.