-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_gistic_plots.sh
More file actions
33 lines (22 loc) · 1.11 KB
/
create_gistic_plots.sh
File metadata and controls
33 lines (22 loc) · 1.11 KB
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
#!/bin/bash
# Settings
subsets=( tumor metastasis ) # pattern to recognize desired files (from sample_id) tumor metastasis
aceseq_seg_path=.
project_path=/dh-projects/pedion/A05R/analysis
gistic_path=/applications/otp/software/gistic2/2.0.23
ref_gene_path=/applications/otp/software/gistic2/2.0.23/refgenefiles/hg19.mat
conda_path=~/miniconda3/bin
ctrl=control # blood-01
# Processing
pid_path="$project_path/whole_genome_sequencing/results_per_pid"
source $conda_path/activate gistic
for sub in "${subsets[@]}"; do # The quotes are necessary here
files=$(ls $pid_path/*/ACEseq*$sub*$ctrl*/*desired_info.txt | paste -s -d, -)
# gistic requires the folder to exist
mkdir -p $sub
perl $aceseq_seg_path/aceseq2seg.pl -f $files > $sub/$sub.seg
# $gistic_path/gp_gistic2_from_seg -b $sub -seg $sub.seg -refgene $ref_gene_path
$gistic_path/gistic2 -b $sub -seg $sub/$sub.seg -refgene $ref_gene_path
perl gistic_2_dataframe_for_plotting.pl $sub/scores.gistic $sub/del_genes.conf_75.txt $sub/amp_genes.conf_75.txt > $sub/gistic_table.tsv
R -f plot_gistic_table.r --args $sub/gistic_table.tsv
done