gnr
This file will become your README and also the index of your documentation.
Developer Guide
Setup
# create conda environment
$ mamba env create -f env.yml
# update conda environment
$ mamba env update -n gnr --file env.yml
# $ mamba env update -n gnr --file env.mac.yml
Install
pip install -e .
# install from pypi
pip install gnr
nbdev
# activate conda environment
$ conda activate gnr
# make sure the gnr package is installed in development mode
$ pip install -e .
# make changes under nbs/ directory
# ...
# compile to have changes apply to the gnr package
$ nbdev_prepare
Note: it might be useful to use the following snippet to enable hot reloading:
%load_ext autoreload
%autoreload 2
Publishing
# publish to pypi
$ nbdev_pypi
# publish to conda
$ nbdev_conda --build_args '-c conda-forge'
Usage
Installation
Install latest from the GitHub repository:
$ pip install git+https://github.com/dsm-72/gnr.git
or from conda
$ conda install -c dsm-72 gnr
or from pypi
$ pip install gnr
df_trj = make_mock_genes_x_tbins()
df_trj.head()
<style scoped>
.dataframe tbody tr th:only-of-type {
vertical-align: middle;
}
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
</style>
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | ... | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| wasf | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 |
| colq | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | ... | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| gpr1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 |
| chrm3 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | ... | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| lmod2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | ... | 8 | 8 | 8 | 9 | 9 | 9 | 9 | 9 | 9 | 9 |
5 rows × 100 columns
gc_op = GrangerCausality(n_jobs=2)
df_res = gc_op.fit_transform(df_trj, fit_params={'standard_scaler':True, 'signed_correlation': True})
df_res.head()
<style scoped>
.dataframe tbody tr th:only-of-type {
vertical-align: middle;
}
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
</style>
| wasf_y | colq_y | gpr1_y | chrm3_y | lmod2_y | tek_y | kank3_y | oca2_y | taz_y | map4k1_y | |
|---|---|---|---|---|---|---|---|---|---|---|
| wasf_x | 1.000000 | 0.683091 | 0.314458 | 0.144127 | 0.000818 | 1.000000 | 1.000000 | 0.000066 | 0.102470 | 0.006449 |
| colq_x | 1.000000 | 1.000000 | 0.779284 | 1.000000 | 1.000000 | 0.001091 | 0.192685 | 0.675090 | 1.000000 | 0.806543 |
| gpr1_x | 0.805541 | 0.042286 | 1.000000 | 0.892251 | 0.795418 | 0.823063 | 1.000000 | 0.542452 | 0.001091 | 0.852052 |
| chrm3_x | 0.001091 | 0.073638 | 0.168425 | 1.000000 | 0.632585 | 1.000000 | 0.102470 | 0.542452 | 1.000000 | 0.367649 |
| lmod2_x | 0.683091 | 0.000104 | 0.031086 | 0.220671 | 1.000000 | 0.683091 | 0.000818 | 0.367649 | 1.000000 | 0.017608 |
gc_op.plot_df_org(figsize=(4,4))
gc_op.plot_df_res(figsize=(4,4))
Documentation
Documentation can be found hosted on GitHub repository pages. Additionally you can find package manager specific guidelines on conda and pypi respectively.
Metadata
Release files for gnr 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gnr-0.0.4.tar.gz | 16.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gnr-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.3 kB
Release files / gnr-0.0.4.tar.gz
| Download URL | gnr-0.0.4.tar.gz |
|---|---|
| Size | 16.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
086b6a42722c0afa4c65ec0c39a3dde17ae1a1a032f38e4dd0681e71880dadf7
|
|
BLAKE2b-256 checksum How to use checksums |
7bf64d62dba254665d3fa33b116f41f6919cbf8deaf2ef80a8fa994e5791096a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / gnr-0.0.4-py3-none-any.whl
| Download URL | gnr-0.0.4-py3-none-any.whl |
|---|---|
| Size | 16.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
21ebfeed74e05dd28962dd100e5a76f5736f931984d4f4d7742413d0233da451
|
|
BLAKE2b-256 checksum How to use checksums |
615d42ab5ef75fcf7260839bef67086b8e1124fec8fa5b7c751f7c76b44440db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|