Learn R Programming

beadarrayMSV (version 1.0.3)

resolveInheritanceSNP: Track parental alleles in offspring

Description

Based on parental and offspring SNP marker genotypes, the paternal and maternal alleles in offspring are deduced

Usage

resolveInheritanceSNP(BSSnp)

Arguments

BSSnp
"AlleleSetIllumina" (or "MultiSet") object containing only SNP markers, with an assayData entry call (see

Value

  • A list with elements
  • motherMatrix of calls representing maternal inherited alleles
  • fatherMatrix of calls representing paternal inherited alleles

Details

Although a linkage map is not needed for this function, it was written for the purpose of mapping MSV-5 paralogs to a map represented by the markers in BSSnp (see assignParalogues). For its intended use, BSSnp should therefore contain chromosome positions and genetic distances in featureData

See Also

AlleleSetIllumina, callGenotypes, assignParalogues, unmixParalogues

Examples

Run this code
#Read markers into an AlleleSetIllumina object
rPath <- system.file("extdata", package="beadarrayMSV")
normOpts <- setNormOptions()
dataFiles <- makeFilenames('testdata',normOpts,rPath)
beadFile <- paste(rPath,'beadData_testdata.txt',sep='/')
beadInfo <- read.table(beadFile,sep='\t',header=TRUE,as.is=TRUE)
BSRed <- createAlleleSetFromFiles(dataFiles[1:4],beadInfo=beadInfo)

#Genotype calling and selection of SNPs for linkage map
BSRed <- callGenotypes(BSRed)
BSRed <- validateCallsPedigree(BSRed)
iSNP <- fData(BSRed)$Classification %in% 'SNP' &! is.na(fData(BSRed)$Chromosome)

#Find informative alleles inherited from each parent
inheritP <- resolveInheritanceSNP(BSRed[iSNP,])

#Compare a few markers for an arbitrary, single triplet
iOffspring <- 1
iFather <- which(pData(BSRed)$PedigreeID %in% pData(BSRed)$Parent2[iOffspring])
iMother <- which(pData(BSRed)$PedigreeID %in% pData(BSRed)$Parent1[iOffspring])
print(assayData(BSRed)$call[iSNP,c(iMother,iFather,iOffspring)][6:10,])
print(inheritP$mother[6:10,c(iMother,iFather,iOffspring)])
print(inheritP$father[6:10,c(iMother,iFather,iOffspring)])

Run the code above in your browser using DataLab