-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.Rmd
122 lines (74 loc) · 3.42 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
---
output:
md_document:
variant: gfm
html_preview: false
---
<!-- README.md is generated from README.Rmd using devtools::build_readme(). Please edit that file -->
```{r echo=FALSE, results="hide", message=FALSE}
library("badger")
```
<!-- <img src="https://raw.githubusercontent.com/dputhier/scigenex/main/inst/sticker/scigenex_logo.png" width="150" align="right"/> -->
```{r, echo = FALSE, results='asis'}
cat(
badge_lifecycle(stage = "stable", color="green"),
badge_repostatus("Active"),
badge_license("MIT"),
badge_last_commit(ref="dputhier/scigenex"),
badge_codecov("dputhier/scigenex")
)
```
# SciGeneX repository
## :arrow_double_down: Installation
### System requirements
The partitioning steps are currently performed using a system call to the Markov Cluster (MCL) algorithm that presently limits the use of DBF-MCL to unix-like platforms. Importantly, the `mcl` command should be in your PATH and reachable from within R (see dedicated section).
### Step 1 - Installation of SciGeneX
#### From R
The scigenex library is currently not available in CRAN or Bioc. To install from github, use:
devtools::install_github("dputhier/scigenex")
library(scigenex)
#### From the terminal
Download the *tar.gz* from github or clone the main branch. Uncompress and run the following command from within the uncompressed scigenex folder:
R CMD INSTALL .
Then load the library from within R.
library(scigenex)
### Step 2 - Installation of MCL
You may skip this step as the latest versions of SciGeneX will call `scigenex::install_mcl()`to install MCL in `~/.scigenex` directory if this program is not found in the PATH.
#### Installation of MCL using install_mcl()
The `install_mcl()` has been developed to ease MCL installation. This function should be call automatically from within R when calling the `gene_clustering()` function. If `install_mcl()` does not detect MCL in the PATH it will install it in `~/.scigenex`.
#### Installation of MCL from source
One also can install MCL from source using the following code.
# Download the latest version of mcl
wget http://micans.org/mcl/src/mcl-latest.tar.gz
# Uncompress and install mcl
tar xvfz mcl-latest.tar.gz
cd mcl-xx-xxx
./configure
make
sudo make install
# You should get mcl in your path
mcl -h
#### Installation of MCL from sources
Finally you may install MCL using conda. Importantly, the mcl command should be available in your PATH from within R.
conda install -c bioconda mcl
## Example
The scigenex library contains several datasets including the pbmc3k_medium which is a subset from pbmc3k 10X dataset.
library(Seurat)
library(scigenex)
set_verbosity(1)
# Load a dataset
load_example_dataset("7871581/files/pbmc3k_medium")
# Select informative genes
res <- select_genes(pbmc3k_medium,
distance = "pearson",
row_sum=5)
# Cluster informative features
## Construct and partition the graph
res <- gene_clustering(res,
inflation = 1.5,
threads = 4)
# Display the heatmap of gene clusters
res <- top_genes(res)
plot_heatmap(res, cell_clusters = Seurat::Idents(pbmc3k_medium))
## :book: Documentation
Documentation (in progress) is available at [https://dputhier.github.io/scigenex/](https://dputhier.github.io/scigenex/).