Learn R Programming

beadarrayMSV (version 1.0.3)

makeDiploidCalls: Constrain calls to diploid representation

Description

Input calls for any diploid or tetraploid genome marker are restricted to diploid representation. This implies that non-segregating paralogs are ignored or set to missing, and non-resolvable paralogs are set to missing

Usage

makeDiploidCalls(calls, fData)

Arguments

calls
Numerical matrix with dimensions (markers x samples). The allele ratios are from the set {0, 1/4, 1/2, 3/4, 1}
fData
featureData data-table such as from an "AlleleSetIllumina" object, with rows corresponding to rows in calls and containing the column Classification (see

Value

  • A numerical matrix with the same dimensions as calls, however with values restricted to {0, 1/2, 1}

Details

Usually called by the function translateTheta

See Also

translateTheta, AlleleSetIllumina

Examples

Run this code
#Construct tiny example data
calls <- c(0,.5,1,0,.25,.5,.5,.75,1,.5,.5,.5,0,.25,.75)
categories <- c('SNP','MSV-a','MSV-b','PSV','MSV-5')
calls <- matrix(calls,nrow=5,byrow=TRUE,
    dimnames=list(categories,paste('S',1:3,sep='')))
fData <- data.frame(Classification=categories,row.names=categories)
print(calls)

#Make diploid
diploidCalls <- makeDiploidCalls(calls, fData)
print(diploidCalls)

Run the code above in your browser using DataLab