-
Notifications
You must be signed in to change notification settings - Fork 14
/
analysis_pipeline.sh
executable file
·55 lines (44 loc) · 2.07 KB
/
analysis_pipeline.sh
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
#!/bin/bash
# The following scripts will reproduce the analysis pipeline for the PDX
# whole exome sequencing project. The pipeline will also output a series of
# html notebooks for easy viewing.
# Exit on error
set -o errexit
execute_time=10000000
# Convert notebooks to scripts
jupyter nbconvert --to=script --FilesWriter.build_directory=scripts/nbconverted *.ipynb
# Run all files in order
# Notebook 1 - Visualize read depth across the genome
jupyter nbconvert --to=html \
--FilesWriter.build_directory=html \
--ExecutePreprocessor.kernel_name=python3 \
--ExecutePreprocessor.timeout=$execute_time \
--execute 1.read-depth-stats.ipynb
# Notebook 2 - Determine the proportion of reads mapping to mouse and human
jupyter nbconvert --to=html \
--FilesWriter.build_directory=html \
--ExecutePreprocessor.kernel_name=python3 \
--ExecutePreprocessor.timeout=$execute_time \
--execute 2.disambiguate-reads.ipynb
# Notebook 3 - Observe variant SIFT by gnomAD allele frequency
jupyter nbconvert --to=html \
--FilesWriter.build_directory=html \
--ExecutePreprocessor.kernel_name=python3 \
--ExecutePreprocessor.timeout=$execute_time \
--execute 3.filter-variants.ipynb
# Notebook 4 - Process the variant calls to output final VCF files
jupyter nbconvert --to=html \
--FilesWriter.build_directory=html \
--ExecutePreprocessor.kernel_name=python3 \
--ExecutePreprocessor.timeout=$execute_time \
--execute 4.variant-allele-frequency.ipynb
# Notebook 5 - Visualize overlaps across patient sets (mutation passage flow)
Rscript --vanilla scripts/nbconverted/5.upset-plots.r
# Notebook 6 - Generate data to visualize common mutations across samples
jupyter nbconvert --to=html \
--FilesWriter.build_directory=html \
--ExecutePreprocessor.kernel_name=python3 \
--ExecutePreprocessor.timeout=$execute_time \
--execute 6.generate-oncoprint-data.ipynb
# Notebook 7 - Visualize mutations across samples (oncoprint diagrams)
Rscript --vanilla scripts/nbconverted/7.visualize-oncoprint.r