Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
randef1ned committed Apr 26, 2024
1 parent 7980fd4 commit de8cf11
Show file tree
Hide file tree
Showing 21 changed files with 2,234 additions and 37 deletions.
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@
^docs$
^doc$
^Meta$
^CODE_OF_CONDUCT\.md$
^tools$
^vignettes/*\.md$
15 changes: 8 additions & 7 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,16 @@ jobs:
Rscript -e "install.packages(c('matrixStats', 'RcppProgress', 'rpca', 'BiocManager'), repo = 'https://cloud.r-project.org/')"
Rscript -e "BiocManager::install('sparseMatrixStats', ask = FALSE, update = FALSE)"
# Clone `diffusr` package
git clone https://github.com/randef1ned/diffusr.git
R CMD INSTALL diffusr
# git clone https://github.com/randef1ned/diffusr.git
# R CMD INSTALL diffusr
Rscript -e "remotes::install_github('randef1ned/diffusr', upgrade = 'always')"
- name: Update docs
run: devtools::document()
shell: Rscript {0}

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = TRUE)
run: |
devtools::document()
devtools::load_all()
pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
pkgdown::build_reference(topics = 'random_walk')
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,7 @@ src/*.dll
Rcpp.pro
Rcpp.pro.user
*.autosave
/doc/
/doc/*.R
/doc/*.html
/doc/*.Rmd
/Meta/
134 changes: 134 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@

# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[INSERT CONTACT METHOD].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Description: One paragraph description of what the package does
License: GPL (>= 2)
URL: https://github.com/randef1ned/labyrinth
BugReports: https://github.com/randef1ned/labyrinth/issues
biocViews: limma
Imports:
checkmate,
Matrix,
Expand Down
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ importFrom(checkmate,assert_string)
importFrom(checkmate,check_numeric)
importFrom(checkmate,test_atomic_vector)
importFrom(checkmate,test_matrix)
importFrom(diffusr,assert_dgCMatrix)
importFrom(diffusr,hub.correction)
importFrom(diffusr,is.dgCMatrix)
importFrom(diffusr,normalize.stochastic)
importFrom(dplyr,"%>%")
importFrom(dplyr,arrange)
Expand Down
22 changes: 11 additions & 11 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
# labyrinth v0.2.3
## labyrinth v0.2.3

* Added `predict()` function
* Added several data
* Bug fix

# labyrinth v0.2.2
## labyrinth v0.2.2

* Added multi-threaded capability
* Added random walk
* Bug fix

# labyrinth v0.2.1
## labyrinth v0.2.1

* Performance improvement
* Bug fix

# labyrinth v0.2.0
## labyrinth v0.2.0

* Rewrote all codes
* Dropped robust z score
* Applied Eigen and MKL

# labyrinth v0.1.1
## labyrinth v0.1.1

* Bug fix

# labyrinth v0.1.0
## labyrinth v0.1.0

* Bug fix

# labyrinth v0.0.5
## labyrinth v0.0.5

* Bug fix
* Remove stopword file

# labyrinth v0.0.4
## labyrinth v0.0.4

* Bug fix
* Added stopword file

# labyrinth v0.0.3
## labyrinth v0.0.3

* Bug fix

# labyrinth v0.0.2
## labyrinth v0.0.2

* Added Windows support
* Added C++ version of robust z score

# labyrinth v0.0.1
## labyrinth v0.0.1

* Initial submission

3 changes: 1 addition & 2 deletions R/random_walk.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@
#' @importFrom checkmate assert_number assert_int assert_logical assert_numeric
#' assert test_matrix check_numeric test_atomic_vector
#' @importFrom methods as
#' @importFrom diffusr normalize.stochastic hub.correction is.dgCMatrix
#' assert_dgCMatrix
#' @importFrom diffusr normalize.stochastic hub.correction
#' @importFrom Rcpp sourceCpp
#'
#' @examples
Expand Down
113 changes: 112 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,114 @@
I am currently rewriting this R package
# Labyrinth

[![Current devel version: 0.2.3](https://img.shields.io/badge/devel%20version-0.2.3-blue.svg)](https://github.com/randef1ned/labyrinth)
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![License: GPL v2](https://img.shields.io/badge/License-GPL_v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/09b138b2fa9242229f081cd180f6fc91)](https://app.codacy.com/gh/randef1ned/labyrinth/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://makeapullrequest.com)
[![Last commit](https://img.shields.io/github/last-commit/randef1ned/labyrinth.svg)](https://github.com/randef1ned/labyrinth/commits/master)
[![Code size](https://img.shields.io/github/languages/code-size/randef1ned/labyrinth.svg)](https://github.com/randef1ned/labyrinth)

Labyrinth is a human-inspired computational framework for personalized drug prioritization.

## Introduction

`labyrinth` is a computational framework designed at drug prioritization at both the population and individual levels. It integrates multiple sources of prior medical knowledge, including:

- Clinical trial information.
- Co-occurrence networks from literature citations.
- Drug-target interactions.
- Drug-indication importance.
- Disease-drug distance.

`labyrinth` emphasizes the importance of aligning computational models with intuitive human reasoning. Thus, it employs a human-like knowledge retrieval methodology to identify potential drug candidates for various diseases. `labyrinth` aims to strike a balance between predictive accuracy and model interpretability, as demonstrated by its robust performance across diverse diseases, evaluated using ROC-AUC metrics.

![A simple schema of the labyrinth](man/figures/intro.jpg)


## A notice on operating system compatibility

I developed and tested `labyrinth` on Fedora Linux version 38 and 39. While this package does not contain any operating system-specific code, it has not been tested on other operating systems. In theory, `labyrinth` should work on other Unix-like operating systems as long as the required dependencies are installed.

We recommended these dependencies to be installed:

- **R (≥ 4.3.0)**: We developed this R package using R version 4.3.3.
- **Python**: Python is required for drawing plots in demos. It is recommended to have Python and `seaborn` installed, as the `reticulate` package will use the system's Python installation.
- **OpenMP**: This package uses OpenMP for parallelization and multithreading if OpenMP exists. Having OpenMP installed can significantly improve performance.
- **Intel oneAPI Math Kernel Library (oneMKL)**: This library can further enhance mathematical performance, especially on Intel processors. oneMKL is not required but highly recommended.

If you encounter any issues while running this package on other operating system, please open an [issue](https://github.com/randef1ned/labyrinth/issues).


## Before installation

Before installation, we recommended you install Intel oneAPI Math Kernel Library (oneMKL) to optimize the computational performance of linear algebra.

Windows users can download oneMKL from [Intel's website](https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-download.html) and install it in the default directory. The default directory is: `C:\Program Files (x86)\Intel\oneAPI`.

Debian and Ubuntu users can download oneMKL using apt in the non-free repo:

``` bash
# Install oneMKL version 2020.4.304-4
sudo apt install intel-mkl-full
```

Or using the Intel repo:

``` bash
# Set up the repository and signed the entry
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
# Update the package list
sudo apt update
# Install the latest oneMKL (version 2024.1)
sudo apt install intel-oneapi-mkl
```

Fedora users can download oneMKL by using dnf:

``` bash
# Create dnf repository file
tee > /tmp/oneAPI.repo << EOF
[oneAPI]
name=Intel® oneAPI repository
baseurl=https://yum.repos.intel.com/oneapi
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
EOF
sudo mv /tmp/oneAPI.repo /etc/yum.repos.d
# Install the latest oneMKL (version 2024.0)
sudo dnf install intel-oneapi-mkl
```


## Installation

Install `labyrinth` using:

``` r
install.packages(c('devtools', 'BiocManager'))
remotes::install_github("randef1ned/labyrinth")
```

Or you can download the pre-built binary packages from [Releases](https://github.com/randef1ned/labyrinth/releases).


## Usage

Load the package using `library(labyrinth)`. We provide a vignette for the package that can be called using: `vignette("labyrinth")`. Alternatively, you can view the online version on [website](https://labyrinth.yinchun.su/articles/labyrinth) or [GitHub](doc/labyrinth_knit.md). Basically that is all you have to know.

[This documentation](doc/training_knit.md) contains information about the contents and the necessary information for training the model used in this project. The `tools/` folder contains all the code and scripts required for constructing your own model, so that you can understand the technical details. Besides, you can refer to [this documentation](doc/preface_knit.md) for the background and inspirations behind the overall workflow of `labyrinth.


## Changelog

Changelog: [see this](NEWS.md)

<!--
## Star history
[![Star History Chart](https://api.star-history.com/svg?repos=randef1ned/labyrinth&type=Date)](https://star-history.com/#randef1ned/labyrinth&Date)
-->
3 changes: 3 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
url: https://labyrinth.yinchun.su
template:
bootstrap: 5
5 changes: 5 additions & 0 deletions doc/labyrinth_knit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- [Introduction](#introduction)

## Introduction

ab
Loading

0 comments on commit de8cf11

Please sign in to comment.