makeDiploidCalls: Constrain calls to diploid representation

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/beadarrayMSV.R

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

1
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 callGenotypes). A column “Manual.Calls.R” will be used if present (see callGenotypes.interactive)

Details

Usually called by the function translateTheta

Value

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

Author(s)

Lars Gidskehaug

See Also

translateTheta, AlleleSetIllumina

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#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)

beadarrayMSV documentation built on May 29, 2017, 9:07 a.m.