PathWeightSampling
Julia implementation of Path Weight Sampling (PWS) to compute information transmission rates
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.2%) to scientific vocabulary
Repository
Julia implementation of Path Weight Sampling (PWS) to compute information transmission rates
Basic Info
Statistics
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
- Releases: 1
Metadata Files
README.md
PathWeightSampling.jl
PathWeightSampling.jl is a Julia package to compute information transmission rates using the novel Path Weight Sampling (PWS) method.
Documentation
The documentation for PathWeightSampling.jl is hosted on github.
Installation
For instructions for how to install Julia itself, see the official website.
To install this package, type from the Julia REPL
julia
julia> import Pkg; Pkg.add("PathWeightSampling")
Alternatively, you can install this package by starting Julia, typing ] and then
julia
pkg> add PathWeightSampling
Quick Start
After installation, the package can be loaded from directly from julia.
julia
julia> using PathWeightSampling
We then need a system of reactions for which we want to compute the mutual information. We can use one of the included example systems, such as a simple model for gene expression.
julia
julia> system = PathWeightSampling.gene_expression_system()
SimpleSystem with 4 reactions
Input variables: S(t)
Output variables: X(t)
Initial condition:
S(t) = 50
X(t) = 50
Parameters:
κ = 50.0
λ = 1.0
ρ = 10.0
μ = 10.0
This specific model is very simple, consisting of only 4 reactions:
- ∅ → S with rate κ
- S → ∅ with rate λ
- S → S + X with rate ρ
- X → ∅ with rate μ
S represents the input and X represents the output. The values of the parameters can be inspected from the output above. For this system, we can perform a PWS simulation to compute the mutual information between its input and output trajectories:
julia
julia> result = mutual_information(system, DirectMCEstimate(256), num_samples=1000)
Here we just made a default choice for which marginalization algorithm to use (see documentation for more details).
This computation takes approximately a minute on a typical laptop. The result is a
DataFrame with three columns and 1000 rows:
julia
1000×3 DataFrame
Row │ TimeConditional TimeMarginal MutualInformation
│ Float64 Float64 Vector{Float64}
──────┼──────────────────────────────────────────────────────────────────
1 │ 0.000180898 0.0508378 [0.0, -0.67167, 0.388398, -0.343…
⋮ │ ⋮ ⋮ ⋮
1000 │ 0.00020897 0.0694072 [0.0, 0.254173, 0.362607, 0.2584…
998 rows omitted
Each row represents one Monte Carlo sample.
TimeConditionalis the CPU time in seconds for the computation of the conditional probability P(x|s)TimeMarginalis the CPU time in seconds for the computation of the marginal probability P(x|s)MutualInformationis the resulting mutual information estimate. This is a vector for each sample giving the mutual information for trajectories of different durations. The durations to which these individual values correspond is given by
julia
julia> system.dtimes
0.0:0.1:2.0
So we computed the mutual information for trajectories of duration 0.0, 0.1, 0.2, ..., 2.0.
We can plot the results (assuming the package Plots.jl is installed):
julia
julia> using Plots, Statistics
julia> plot(
system.dtimes,
mean(result.MutualInformation),
legend=false,
xlabel="trajectory duration",
ylabel="mutual information (nats)"
)
Here we plot mean(result.MutualInformation), i.e. we compute the average of our Monte Carlo samples, which is the PWS estimate for the mutual information.
More examples and a guide can be found in the documentation
Acknowledgments
This work was performed at the research institute AMOLF. This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation program (grant agreement No. 885065) and was financially supported by the Dutch Research Council (NWO) through the “Building a Synthetic Cell (BaSyC)” Gravitation grant (024.003.019).
Owner
- Name: Manuel Reinhardt
- Login: manuel-rhdt
- Kind: user
- Location: Amsterdam
- Company: AMOLF
- Repositories: 8
- Profile: https://github.com/manuel-rhdt
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: PathWeightSampling.jl
message: >-
If you use this software, please cite the article from
preferred-citation and the software itself.
type: software
authors:
- given-names: Manuel
family-names: Reinhardt
affiliation: AMOLF
email: reinhardt@amolf.nl
orcid: 'https://orcid.org/0000-0001-8926-9513'
repository-code: 'https://github.com/manuel-rhdt/PathWeightSampling.jl'
license: MIT
preferred-citation:
authors:
- given-names: Manuel
family-names: Reinhardt
affiliation: AMOLF
email: reinhardt@amolf.nl
orcid: 'https://orcid.org/0000-0001-8926-9513'
- given-names: Gašper
family-names: Tkačik
affiliation: Institute of Science and Technology Austria
orcid: 'https://orcid.org/0000-0002-6699-1455'
- given-names: Pieter Rein
family-names: ten Wolde
affiliation: AMOLF
orcid: 'https://orcid.org/0000-0001-9933-4016'
title: "Path Weight Sampling: Exact Monte Carlo Computation of the Mutual Information between Stochastic Trajectories"
journal: Phys. Rev. X
volume: 13
issue: 4
pages: 041017
year: 2023
month: 10
publisher: "American Physical Society"
doi: '10.1103/PhysRevX.13.041017'
type: article
GitHub Events
Total
Last Year
Committers
Last synced: over 3 years ago
All Time
- Total Commits: 574
- Total Committers: 5
- Avg Commits per committer: 114.8
- Development Distribution Score (DDS): 0.429
Top Committers
| Name | Commits | |
|---|---|---|
| Manuel Reinhardt | m****t@g****m | 328 |
| Manuel Reinhardt | M****t@a****l | 220 |
| github-actions[bot] | 4****]@u****m | 16 |
| CompatHelper Julia | c****y@j****g | 7 |
| Manuel Reinhardt | r****t@a****l | 3 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 12 months ago
All Time
- Total issues: 2
- Total pull requests: 106
- Average time to close issues: about 1 month
- Average time to close pull requests: 5 months
- Total issue authors: 2
- Total pull request authors: 2
- Average comments per issue: 2.5
- Average comments per pull request: 0.01
- Merged pull requests: 30
- Bot issues: 0
- Bot pull requests: 104
Past Year
- Issues: 0
- Pull requests: 8
- Average time to close issues: N/A
- Average time to close pull requests: about 14 hours
- Issue authors: 0
- Pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.13
- Merged pull requests: 8
- Bot issues: 0
- Bot pull requests: 6
Top Authors
Issue Authors
- manuel-rhdt (1)
- JuliaTagBot (1)
Pull Request Authors
- github-actions[bot] (108)
- manuel-rhdt (3)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
juliahub.com: PathWeightSampling
Julia implementation of Path Weight Sampling (PWS) to compute information transmission rates
- Documentation: https://docs.juliahub.com/General/PathWeightSampling/stable/
- License: MIT
-
Latest release: 0.1.0
published over 4 years ago
Rankings
Dependencies
- JuliaRegistries/TagBot v1 composite
- actions/checkout v2 composite
- codecov/codecov-action v1 composite
- julia-actions/julia-processcoverage latest composite
- julia-actions/julia-runtest latest composite
- julia-actions/setup-julia latest composite
