Learn R Programming

MOJOV (version 1.0.1)

MOJOV.genoMatrix: A internal function. It generates a genotype matrix.

Description

A internal function. It generates a genotype matrix.

Usage

MOJOV.genoMatrix(genoIID = NULL, genoVariant = NULL, genoH = NULL, phenoIID = NULL, MAF = NULL)

Arguments

genoIID
A character vector for individuals ID.
genoVariant
A character vector for variant labels.
genoH
A character vector for genotype.
phenoIID
A character vector for all individuals from phenotype file.
MAF
Specify the minor allele frequency.

Value

This function will return a matrix, it is individuals multiply sites. If the specified variant site of one individual contains one copy of rare variant, it will code 1. If two copy, it will code 2, and others are coded 0.

Details

See MOJOV.analysis

See Also

MOJOV.genoVector MOJOV.analysis

Examples

Run this code
#Generating individuals ID for genotype file at random.
genoIID<-paste("ID",floor(runif(2000,1,101)),sep="")
#Generating variants labels for genotype file at random.
genoVariant<-paste("rs",floor(runif(2000,223,250)),sep="")
#Generating genotype code for genotype file at random.
genoH<-floor(runif(2000,1,3))
#Generating individuals ID for phenotype file.
phenoIID<-paste("ID",1:100,sep="")
#Generating genotype matrix.
x<-MOJOV.genoMatrix(genoIID=genoIID,genoVariant=genoVariant,genoH=genoH,
         phenoIID=phenoIID)

Run the code above in your browser using DataLab