Description Usage Arguments Details Value Author(s) See Also Examples
This function
reads post-MAKEPED pedigree files (used by JPSGCS)
into a snp.matrix
object.
The post-MAKEPED format includes nine columns of pedigree structure and
subject characteristics (see Details below)
before the marker data. By contrast, pre-MAKEPED
pedigree file format has only six column of pedigree and subject data
before the marker data. This function was adapted from the
read.snps.pedfile
function
in the chopsticks package (formerly
snpMatrix), which reads pre-MAKEPED pedigree files.
1 2 |
file |
The name of the pedigree file to be read. |
snp.names |
A character vector of SNP names. If |
assign |
A list of named mappings from letters to alleles; not currently used. |
missing |
Missing data code in the pedigree file; not currently used. |
X |
Is the pedigree file comprised of X-chromosome SNPs? Default is |
sep |
Character string to separate Family and Member IDs in the row.names of
the output |
JPSGCS pedigree files are in post-MAKEPED format (though much of this information is ignored):
Column 1: | Pedigree number |
Column 2: | Individual ID number |
Column 3: | ID of father; 0=no father in pedigree |
Column 4: | ID of mother; 0=no mother in pedigree |
Column 5: | First offspring ID; ignored by JPSGCS |
Column 6: | Next paternal sibling ID; ignored by JPSGCS |
Column 7: | Next maternal sibling ID; ignored by JPSGCS |
Column 8: | Sex; 1=male, 2=female |
Column 9: | Proband status (1=proband, 0=not); ignored by JPSGCS |
The pre-MAKEPED format excludes columns 5 - 7.
read.pedfile
is essentially
read.snps.pedfile
for post-MAKEPED
pedigree files, except that the option low.mem
of
read.snps.pedfile
has not been implemented.
As in read.snps.pedfile
, when reading in SNP genotype data
the function looks for a corresponding
.map
or .info
file with information on the SNPs such
as physical map positions. For example, if file="test.ped"
,
the function looks for test.map
or test.info
to read
SNP information. Any SNP information that is found is saved in
the element snp.support
of the output object (see Value).
A list with three components:
|
a |
|
a data frame containing the first nine columns of the pedigree file, and |
|
a data frame of SNP information. NB: this is
only meaningful if a |
Sigal Blay, Jinko Graham and Brad McNeney
write.pedfile
,
read.snps.pedfile
1 2 3 4 5 6 7 8 | data(exdat)
sdat<-as(exdat$markers,"snp.matrix") #coerce to snp.matrix
#Write pedigree file for unrelated subjects
write.pedfile(pedinf="unrelated",snp.data=sdat,file="test.ped")
#Read it back into R
sdat2<-read.pedfile("test.ped")
#clean up
unlink("test.ped")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.