ある家系図であるマーカーのジェノタイプが観測される確率を計算する

  • 予定パッケージ名
    • HigashiNopponLikelihood
  • 関数名
    • CalcLogLikelihoodFamily
  • タイトル
CalcLogLikelihoodFamily
  • 説明
家系図のすべての親子トリオについての、その両親からその子が生まれる尤度を計算し、その総積をとる
  • 使用例
CalcLogLikelihoodFamily(p,G,Alleles,Probs)
  • ソース
CalcLogLikelihoodFamily<-function(p,g,Alleles,Probs){
	nl<-length(g[1,1,])
	ret<-rep(0,nl)
	
	for(i in 1:length(g[1,1,])){
		tmp<-CalcLogLikelihoodFamilyLocus2(p,g[,,i],Alleles[[i]],Probs[[i]])
		ret[i]<-tmp$loglikesum
	}
	list(loglikelist=ret,loglikesum=sum(ret))
}

  • Rdファイル
\name{CalcLogLikelihoodFamily}
\alias{CalcLogLikelihoodFamily}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
CalcLogLikelihoodFamily
}
\description{
尤度をローカスごとに計算し、その総積をとった上で、すべてのローカスについて総積をとる
}
\usage{
CalcLogLikelihoodFamily(p,G,Alleles,Probs)
}
\arguments{
\item{p}{家系関係行列}
\item{G}{ジェノタイプ}
\item{Alleles}{アレル名ベクトルのリスト}
\item{Probs}{アレル頻度ベクトルのリスト}
}
%- maybe also 'usage' for other objects documented here.
\details{
%%  ~~ If necessary, more details than the description above ~~
}
\value{
\item{loglikelist}{各ローカスの尤度の対数}
\item{loglikesum}{全ローカスの尤度の総積の対数}
}
\references{
%% ~put references to the literature/web site here ~
}
\author{
%%  ~~who you are~~
}
\note{
%%  ~~further notes~~
}

%% ~Make other sections like Warning with \section{Warning }{....} ~

\seealso{
}

\examples{
p<-matrix(
c(1:8,
  0,0,1,0,3,3,3,3,
  0,0,2,0,4,4,4,4,
  1,0,1,0,1,1,0,0,
  1,1,2,1,1,1,2,1),
  ncol=5)
NL<-15
AandP<-MakeAlleleProb(NL=NL)
Alleles<-AandP$Alleles
Probs<-AandP$Probs
G<-RandomGenotypeFamily(p,NL,Alleles,Probs)
CalcLogLikelihoodFamilyLocus(p,G,Alleles,Probs)
}