Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
genotypes
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BEE
genotypes
Commits
3580533e
Commit
3580533e
authored
Oct 20, 2018
by
Eric Coissac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename polynomial to multinomial
parent
d9a26bc7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
17 deletions
+17
-17
NAMESPACE
NAMESPACE
+1
-1
proba.R
R/proba.R
+7
-7
dmultinomialACGT.Rd
man/dmultinomialACGT.Rd
+9
-9
No files found.
NAMESPACE
View file @
3580533e
# Generated by roxygen2: do not edit by hand
export(d
poly
nomialACGT)
export(d
multi
nomialACGT)
export(error_jc)
export(log_add_exp)
export(log_diff_exp)
...
...
R/proba.R
View file @
3580533e
...
...
@@ -55,7 +55,7 @@ log_diff_exp = function(a, b) {
#' @export
log_sum_exp
=
function
(
x
)
Reduce
(
logaddexp
,
x
)
#' Density probability function of a
poly
nomial distribution for nucleotides
#' Density probability function of a
multi
nomial distribution for nucleotides
#'
#' Computes the probalility to observe a given number of `A`, `C`, `G`, `T`
#' when probalilities of each nucleotide are `pA`, `pC`, `pG`, `pT`.
...
...
@@ -74,15 +74,15 @@ log_sum_exp = function(x) Reduce(logaddexp, x)
#' of the observations given the probabilities of observation
#'
#' @examples
#' d
poly
nomialACGT(c(3,4),c(3,6),c(3,2),c(3,5),
#' 0.25,0.25,0.25,0.25)
#' d
poly
nomialACGT(c(3,4),c(3,6),c(3,2),c(3,5),
#' pA = 0.25, pC = 0.25, pG = 0.25, pT = 0.25,
#' log=TRUE)
#' d
multi
nomialACGT(c(3,4),c(3,6),c(3,2),c(3,5),
#'
0.25,0.25,0.25,0.25)
#' d
multi
nomialACGT(c(3,4),c(3,6),c(3,2),c(3,5),
#'
pA = 0.25, pC = 0.25, pG = 0.25, pT = 0.25,
#'
log=TRUE)
#'
#' @author Eric Coissac
#' @export
d
poly
nomialACGT
=
function
(
A
,
C
,
G
,
T
,
pA
,
pC
,
pG
,
pT
,
log
=
FALSE
)
{
d
multi
nomialACGT
=
function
(
A
,
C
,
G
,
T
,
pA
,
pC
,
pG
,
pT
,
log
=
FALSE
)
{
lpcomb
=
(
log
(
pA
)
*
A
+
log
(
pC
)
*
C
...
...
man/d
poly
nomialACGT.Rd
→
man/d
multi
nomialACGT.Rd
View file @
3580533e
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/proba.R
\name{d
poly
nomialACGT}
\alias{d
poly
nomialACGT}
\title{Density probability function of a
poly
nomial distribution for nucleotides}
\name{d
multi
nomialACGT}
\alias{d
multi
nomialACGT}
\title{Density probability function of a
multi
nomial distribution for nucleotides}
\usage{
d
poly
nomialACGT(A, C, G, T, pA, pC, pG, pT, log = FALSE)
d
multi
nomialACGT(A, C, G, T, pA, pC, pG, pT, log = FALSE)
}
\arguments{
\item{A}{numeric; number of observed *A* at a given site.}
...
...
@@ -34,11 +34,11 @@ Computes the probalility to observe a given number of `A`, `C`, `G`, `T`
when probalilities of each nucleotide are `pA`, `pC`, `pG`, `pT`.
}
\examples{
d
poly
nomialACGT(c(3,4),c(3,6),c(3,2),c(3,5),
0.25,0.25,0.25,0.25)
d
poly
nomialACGT(c(3,4),c(3,6),c(3,2),c(3,5),
pA = 0.25, pC = 0.25, pG = 0.25, pT = 0.25,
log=TRUE)
d
multi
nomialACGT(c(3,4),c(3,6),c(3,2),c(3,5),
0.25,0.25,0.25,0.25)
d
multi
nomialACGT(c(3,4),c(3,6),c(3,2),c(3,5),
pA = 0.25, pC = 0.25, pG = 0.25, pT = 0.25,
log=TRUE)
}
\author{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment