README.md 2.07 KB
Newer Older
1
# Integrative Network Fusion (INF)
Nicole Bussola's avatar
Nicole Bussola committed
2
![INF pipeline ](figs/INF_pipeline.jpeg)
3

4
## Setup
Alessia Marcolini's avatar
Alessia Marcolini committed
5
```bash
Alessia Marcolini's avatar
Alessia Marcolini committed
6
7
git clone https://gitlab.fbk.eu/MPBA/INF
cd INF
Alessia Marcolini's avatar
Alessia Marcolini committed
8
9
10
11
conda env create -f env.yml -n inf
conda activate inf
```

12
13
14
### Additional dependencies

#### R dependencies
Alessia Marcolini's avatar
Alessia Marcolini committed
15
16
17
18
19
To install the R dependencies (not in conda channels), run the following command via the R prompt:
```bash
install.packages("TunePareto")
```

20
21
22
23
24
25
#### MLPY
To install `mlpy` follow this instructions:

`mlpy` package is required for some operations included in the DAP procedure.

The `mlpy` package available on PyPI is outdated and not working on OSX platforms.
26

27
These are the steps to follow:
Alessia Marcolini's avatar
Alessia Marcolini committed
28

29
30
31
32
33
34
35
36
37
38
39
40
41
Let `<ANACONDA>` be your anaconda path (e.g., `/home/user/anaconda3`).

Adjust these environmental variables:
```bash
export LD_LIBRARY_PATH=<ANACONDA>/envs/<ENV>/lib:${LD_LIBRARY_PATH}
export CPATH=<ANACONDA>/envs/<ENV>/include:${CPATH}
```

and then install `mlpy` from GitLab:
```bash
pip install git+https://gitlab.fbk.eu/MPBA/mlpy.git
```

42

43
44
## Usage

45
46
47
48
49
50
51
52
53
**Input files**

* omics layer 1 data: samples x features, tab-separated, with row & column names
* omics layer 2 data: same as above (**samples must be in the same order as the first file**)
* omics layers 1+2 data: the juxtaposition of the above two files
* labels file: one column, just the labels, no header (**same order as the data files**)

**Example run**

Marco Chierici's avatar
Marco Chierici committed
54
55
56
57
58
59
60
61
The INF pipeline is implemented as a Snakefile.

The following directory tree is required:

* {datafolder}/{dataset}/{layer1}_{layer2}_{tr,ts}.txt
* {datafolder}/{dataset}/labels_{target}_{tr,ts}.txt
* {datafolder}/{dataset}/{layer1,layer2}_{tr,ts}.txt
* {outfolder}/{dataset}/{target}/{juxt,rSNF,rSNFi,single}/ _(these will be created if not present)_
62

Marco Chierici's avatar
Marco Chierici committed
63
All the {variables} can be specified either in a config.yaml file or on the command line; for example:
64

Marco Chierici's avatar
Marco Chierici committed
65
66
```{python}
snakemake --config datafolder="data" dataset="breast" target="ER" layer1="gene" layer2="cnv"
67
```
Marco Chierici's avatar
Marco Chierici committed
68
69
70
71
72

A maximum number of cores can also be set:

```{python}
snakemake [--config etc.] --cores 12
73
74
```

Marco Chierici's avatar
Marco Chierici committed
75
The pipeline can be "dry-run" using the `-n` flag:
76

Marco Chierici's avatar
Marco Chierici committed
77
78
79
```{python}
snakemake --cores 12 -n
```