forked from rstudio/bookdown-demo
-
Notifications
You must be signed in to change notification settings - Fork 359
/
main.nf
executable file
·53 lines (41 loc) · 1.06 KB
/
main.nf
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
Channel
.fromPath("$baseDir/course_files", type: 'dir')
.set { ch_course_files }
Channel
.fromPath('s3://singlecellcourse/data/', checkIfExists: false)
.set { ch_data }
Channel
.fromPath('s3://singlecellcourse/_bookdown_files/', checkIfExists: false)
.set { ch_cached_files }
process html {
echo true
input:
file 'course_dir_work/data' from ch_data
file 'course_dir' from ch_course_files
path '_bookdown_files' from ch_cached_files
output:
file 'course_dir_work/website'
shell:
'''
cp -r course_dir/* course_dir_work
cd course_dir_work
ln -s ../_bookdown_files .
Rscript -e "bookdown::render_book('index.Rmd', 'bookdown::gitbook')"
'''
}
/*
process latex {
echo true
input:
file 'course_dir_work/data' from ch_data2
file 'course_dir' from ch_course_files2
path '_bookdown_files' from ch_cached_files
shell::
'''
cp -r course_dir/* course_dir_work
cd course_dir_work
ln -s ../_bookdown_files .
Rscript -e "bookdown::render_book('index.html', 'bookdown::gitbook')"
```
}
*/