README.md 1.29 KB
Newer Older
Curtis Hendrickson's avatar
Curtis Hendrickson committed
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
# Snakemake CONDITIONAL

This pipeline shows how you can smoothly mix local raw samples with samples already pre-processed remotely

There are 3 inputs:
 * [sample_list.tsv](sample_list.tsv)
 * sample_list_ext.tsv (optional - example in [not_sample_list_ext.tsv](not_sample_list_ext.tsv))

Python code up front loads the two sample lists, and creates 3 lists
       SAMPLES_RAW
       SAMPLES_PROC
       SAMPLES_ALL
that can be used to control the rest of the flow

Step2 merges locally processed samples with remotely processed ones, if there are any remote ones. 

## To run local data only
```
module load snakemake
snakemake
```
outputs
```
Job counts:
    count	jobs
    1		all
    2		step1_wc_raw_data
    1		step2_rule
    4
Job 3: # ----- STEP1: process local raw data  ---------
Job 2: # ----- STEP1: process local raw data  ---------
Job 1: # ----- STEP2 (merge) ---------
6 local_data/sample1.txt
13 local_data/sample2.txt
```

## To run local raw data with externally processed data merged:
```
module load snakemake
ln -s not_sample_list_ext.tsv sample_list_ext.tsv
snakemake
```
outputs
```
Job counts:
    count	jobs
    1		all
    1		step2_rule
    2
Job 1: # ----- STEP2 (merge) ---------
6 local_data/sample1.txt
13 local_data/sample2.txt
18 ext_sample1_preprocessed
20 ext_sample2_preprocessed
```