README.md 1.57 KB
Newer Older
1
2
3
4
### INF pipeline

**Requirements**

Marco Chierici's avatar
Marco Chierici committed
5
6
7
Python3 with mlpy (!), numpy, scikit-learn, pandas, snakemake

R >= 3.2.3 with argparse, cvTools, doParallel, TunePareto, igraph, lubridate, data.table
8
9
10
11
12

To install R via Anaconda: [doc](https://docs.anaconda.com/anaconda/user-guide/tasks/using-r-language/)

To install the R dependencies, run the following command from the R prompt:

Marco Chierici's avatar
Marco Chierici committed
13
`install.packages(c("argparse", "cvTools", "doParallel", "TunePareto", "igraph", "lubridate", "data.table"))`
14
15
16
17
18
19
20
21
22
23

**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
24
25
26
27
28
29
30
31
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)_
32

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

Marco Chierici's avatar
Marco Chierici committed
35
36
```{python}
snakemake --config datafolder="data" dataset="breast" target="ER" layer1="gene" layer2="cnv"
37
```
Marco Chierici's avatar
Marco Chierici committed
38
39
40
41
42

A maximum number of cores can also be set:

```{python}
snakemake [--config etc.] --cores 12
43
44
```

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

Marco Chierici's avatar
Marco Chierici committed
47
48
49
```{python}
snakemake --cores 12 -n
```