diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index bb51bfb..86c48e6 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-11T04:27:21","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-11T05:17:09","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/definitions/index.html b/dev/definitions/index.html index 081636f..e0cc650 100644 --- a/dev/definitions/index.html +++ b/dev/definitions/index.html @@ -1,2 +1,2 @@ -Definitions · PlotPWM.jl

Definition of Information Content in Position Weight Matrices (PWM)

In a position weight matrix (PWM), the "letter height", or more formally, the information content $IC(\cdot)$ of the $i$-th column $c_i$, quantifies how conserved the nucleotides are at that position compared to a background model. It is calculated using the formula:

\[IC(c_i) = \sum_{\alpha}f_{\alpha i}\log_2 (f_{\alpha i} / \beta_\alpha)\]

where $f_{\alpha i}$ is the frequency of nucleotide $\alpha\in\Set{A,C,G,T}$ at the $i$-th column of a PWM and $\beta_\alpha$ denotes the genomic background frequency of nucleotide $\alpha$.

Default genomic background

By default, the background model assumes a uniform distribution of nucleotides, with each nucleotide having a frequency of $\beta=(0.25, 0.25,0.25,0.25)$. In this case, the information content $IC(c_i)$ simplifies to:

\[IC(c_i)=2+\sum_{\alpha}f_{\alpha i}\log_2 f_{\alpha i}\]

This formula illustrates why the y-axis of the logo-plot ranges from $0$ to $2$.

+Definitions · PlotPWM.jl

Definition of Information Content in Position Weight Matrices (PWM)

In a position weight matrix (PWM), the "letter height", or more formally, the information content $IC(\cdot)$ of the $i$-th column $c_i$, quantifies how conserved the nucleotides are at that position compared to a background model. It is calculated using the formula:

\[IC(c_i) = \sum_{\alpha}f_{\alpha i}\log_2 (f_{\alpha i} / \beta_\alpha)\]

where $f_{\alpha i}$ is the frequency of nucleotide $\alpha\in\Set{A,C,G,T}$ at the $i$-th column of a PWM and $\beta_\alpha$ denotes the genomic background frequency of nucleotide $\alpha$.

Default genomic background

By default, the background model assumes a uniform distribution of nucleotides, with each nucleotide having a frequency of $\beta=(0.25, 0.25,0.25,0.25)$. In this case, the information content $IC(c_i)$ simplifies to:

\[IC(c_i)=2+\sum_{\alpha}f_{\alpha i}\log_2 f_{\alpha i}\]

This formula illustrates why the y-axis of the logo-plot ranges from $0$ to $2$.

diff --git a/dev/index.html b/dev/index.html index e5f5262..7bc1766 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,6 +1,6 @@ Home · PlotPWM.jl

PlotPWM

Documentation for PlotPWM.

PlotPWM.save_logoplotMethod
save_logoplot(pfm, background, save_name; dpi=65)

Arguments

  • pfm::Matrix{Real}: Position frequency matrix
  • background::Vector{Real}: Background probabilities of A, C, G, T
  • save_name::String: Name of the path/file to save the plot

Note that

  • pfm must be a probability matrix
    • sum of each column must be 1
  • background must be a vector of length 4
    • must be a vector of probabilities
    • sum of background must be 1

Example


+Save a logoplot with crosslinks to a file
source
PlotPWM.save_logoplotMethod
save_logoplot(pfm, background, save_name; dpi=65)

Arguments

  • pfm::Matrix{Real}: Position frequency matrix
  • background::Vector{Real}: Background probabilities of A, C, G, T
  • save_name::String: Name of the path/file to save the plot

Note that

  • pfm must be a probability matrix
    • sum of each column must be 1
  • background must be a vector of length 4
    • must be a vector of probabilities
    • sum of background must be 1

Example


 pfm =  [0.02  1.0  0.98  0.0   0.0   0.0   0.98  0.0   0.18  1.0
         0.98  0.0  0.02  0.19  0.0   0.96  0.01  0.89  0.03  0.0
         0.0   0.0  0.0   0.77  0.01  0.0   0.0   0.0   0.56  0.0
@@ -13,9 +13,9 @@
 
 #= save the logo plot in the current folder as logo.png with a dpi of 65 =#
 save_logoplot(pfm, background, "logo.png"; dpi=65)
-
source
PlotPWM.save_logoplotMethod
save_logoplot(pfm, save_name; dpi=65)
 
 This is the same as `save_logoplot(pfm, background, save_name; dpi=65)`
 where `background` is set to `[0.25, 0.25, 0.25, 0.25]`
 
-See `save_logoplot(pfm, background, save_name; dpi=65)` for more details.
source
+See `save_logoplot(pfm, background, save_name; dpi=65)` for more details.source