forked from McGranahanLab/CONIPHER-wrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRunning.longitudinal.cluster.buildtree.clonemap.sh
46 lines (34 loc) · 1.38 KB
/
Running.longitudinal.cluster.buildtree.clonemap.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
#!/bin/bash
################################################################################## Input parameters
###################################################################################################
case_id=$1
scriptDir="path/to/src/"
Workdir="path/to/workdir"
sampleinfo="${Workdir}/SampleInfo.txt"
inputDir="${Workdir}/input/"
outDir="${Workdir}/results/"
############################################################### Running clustering and treebuilding
###################################################################################################
clusteringDir=${outDir}"/Clustering/"
treeDir=${outDir}"/TreeBuilding/"
mkdir -p ${clusteringDir}
mkdir -p ${treeDir}
## prepare forcecalling annovar table to conipher tsv file
## prepare forcecalling annovar table to conipher tsv file
Rscript ${scriptDir}force_calling_annovar_to_conipher.R $case_id $sampleinfo $inputDir
# run clustering
Rscript ${scriptDir}run_clustering.R \
--case_id ${case_id} \
--script_dir ${scriptDir} \
--input_tsv ${inputDir}${case_id}".input.tsv" \
--working_dir ${clusteringDir} \
--nProcs 20
# run treebuild
Rscript ${scriptDir}run_treebuilding.R \
--input_tsv ${clusteringDir}${case_id}".SCoutput.CLEAN.tsv" \
--out_dir ${treeDir} \
--script_dir ${scriptDir} \
--prefix ${case_id}
module load R
# plot clonemap and write the shannon index
Rscript ${scriptDir}clonemap.diversity.R $treeDir $case_id