Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/read.merlin.files.R
Reads the pedigree, data and allele frequency input files. The data read is reformatted to be used by the function fat2Lpoly.withinR
.
1 | read.merlin.files(pedfilenames, datfilenames, freq.data, ibdfilenames = NULL)
|
pedfilenames |
vector of 1 or 2 (the number of loci involved in the |
datfilenames |
vector of 1 or 2 (the number of loci involved in the |
freq.data |
Either
(1) a vector of 1 or 2 (the number of loci involved in the |
ibdfilenames |
vector of 1 or 2 (the number of loci involved in the |
All subjects included in the pedigree files must also be found in the IBD files.
All fields in the pedigree files must be numeric. No letters allowed, even for family and subject ID's.
returns a list of six objects:
ped |
data frame with columns fam.id, subject.ids, endophenotype and phenotype (in the given order) |
x.all |
data frame of SNP genotypes in the format "(number of minor alleles)/2", for all SNPs listed in the file(s) in |
MA.table |
data frame giving the minor allele numbers of all the SNPs. The first column consists of |
ibd.dat.list |
list of one or two data frames containing the columns of the IBD data file(s) in |
y1.name |
affection name extracted from first line of the data file(s) |
y2.name |
affection name extracted from second line of the data file(s) |
ibdfilenames |
(same object as provided as argument) vector of 1 or 2 (the number of loci involved in the |
Alexandre Bureau and Jordie Croteau
1. http://www.sph.umich.edu/csg/abecasis/Merlin/tour/input_files.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | path.data=paste(.libPaths()[which(unlist(lapply(.libPaths(),
function(x) length(grep("fat2Lpoly",dir(x)))))>0)],
"/fat2Lpoly/extdata/",sep="")
if(length(path.data)>1) path.data=path.data[length(path.data)]
input.data=read.merlin.files(pedfilenames=
paste(path.data,c("loc1.ped","loc2.ped"),sep=""),
datfilenames=
paste(path.data,c("loc1.dat","loc2.dat"),sep=""),
freq.data=
paste(path.data,c("loc1.freq","loc2.freq"),sep=""),
ibdfilenames=
paste(path.data,c("loc1.ibd","loc2.ibd"),sep=""))
input.data2=read.merlin.files(pedfilenames=
paste(path.data,"loc2.ped",sep=""),
datfilenames=
paste(path.data,"loc2.dat",sep=""),
freq.data=
paste(path.data,"loc2.freq",sep=""),
ibdfilenames=
paste(path.data,"loc2.ibd",sep=""))
|
Y1 data extracted from input files: endo
Y2 data extracted from input files: pheno
Warning messages:
1: In FUN(X[[i]], ...) : NAs introduced by coercion
2: In FUN(X[[i]], ...) : NAs introduced by coercion
3: In FUN(X[[i]], ...) : NAs introduced by coercion
Y1 data extracted from input files: endo
Y2 data extracted from input files: pheno
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.