Strains2rac {GGtools} | R Documentation |
convert a Wellcome 'Strains' genotyping file to rare allele count form, or create a racExSet using such a file
Strains2rac(strfile) INBREDSworkflow(inbfile, emat, estrains, pd, mi, anno, fixup= NULL, fixchr = function(x) gsub("_random", "", x))
strfile |
name of the text file to be converted |
inbfile |
name of the text file to be converted |
emat |
matrix of expression data |
estrains |
character vector of strains corresponding to
columns of emat |
pd |
AnnotatedDataFrame-class instance for emat |
mi |
MIAME-class instance |
anno |
character string for annotation environment package |
fixup |
transformation from columns of strain genotype file strfile
to estrains tokens, if necessary |
fixchr |
modify the chromosome tags if necessary |
Strains2rac
creates a list with genotype matrix, chr and pos
INBREDSworkflow
creates a list with components racExSet
and
snpMetaWhole
(because the INBREDS files are whole-genome, not
chromosome specific)
See the commented example for build 34 Wellcome Inbreds file for
BXD strains, INB34snpMeta
.
Vince Carey <stvjc@channing.harvard.edu>
fi = system.file("fileDemos/StrainInit.txt", package="GGtools") dem = Strains2rac(fi) names(dem) dim(dem[[1]]) data(gse2031GG) fixbxd = function(x) { # because such various labels are used in the INBREDS file gsub("BXD\\.", "BXD", gsub(".Ty", "", gsub(".TyJ", "", x))) } INBREDSworkflow( fi, exprs(gse2031GG), as.character(gse2031GG$str), phenoData(gse2031GG), new("MIAME"), "mgu74av2", fixbxd ) # # the real INB34snpMeta structure is built by # fixchr = function(x) gsub("_random", "", x) #INBREDSworkflow( "Strains-0.09052005.txt", exprs(gse2031GG), as.character(gse2031GG$str), # phenoData(gse2031GG), new("MIAME"), "mgu74av2", fixbxd, fixchr )