-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbed-analysis.sh
18 lines (12 loc) · 1.65 KB
/
bed-analysis.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
### RUN FUNCTIONS ###
#printf "3-1. Custom TSVs to BED"
Rscript src/utils.r --tsv2bed --tsv $GNM_TSV --out $WORK_DIR"/summary_bed" > $TXT_LOG"/log3.1-custom_bed.txt"
#printf "3-2. ENCODE Tfbs in genome_dist to BED"
Rscript postgwas-exe.r --dbfilt dist --base $GNM_TSV"/encode_tfbs.tsv" --out $WORK_DIR"/summary_bed" > $TXT_LOG"/log3.2-encode_union.txt"
#printf "3-3. ENCODE Tfbs in encode_dist to BED by cells"
Rscript src/enrich.r --tfbs2bed --tfbs $ENCD_TSV --out $ENCD_BED > $TXT_LOG"/log3.3-encode_bed.txt"
#printf "3-4. EpiMap 18 Enhancer & Promoter to BED"
EP18ENHG1=`find $EPI_BED -name 'epimap_18_status-EnhG1_*.bed'` && EP18ENHG2=`find $EPI_BED -name 'epimap_18_status-EnhG2_*.bed'` && EP18ENHA1=`find $EPI_BED -name 'epimap_18_status-EnhA1_*.bed'` && EP18ENHA2=`find $EPI_BED -name 'epimap_18_status-EnhA2_*.bed'` && EP18ENHWK=`find $EPI_BED -name 'epimap_18_status-EnhWk_*.bed'` && EP18TSSA=`find $EPI_BED -name 'epimap_18_status-TssA_*.bed'` && EP18TSSF=`find $EPI_BED -name 'epimap_18_status-TssFlnk_*.bed'` && EP18TSSFU=`find $EPI_BED -name 'epimap_18_status-TssFlnkU_*.bed'` && EP18TSSFD=`find $EPI_BED -name 'epimap_18_status-TssFlnkD_*.bed'` && Rscript postgwas-exe.r --dbvenn uniset --base $EP18ENHG1,$EP18ENHG2,$EP18ENHA1,$EP18ENHA2,$EP18ENHWK,$EP18TSSA,$EP18TSSF,$EP18TSSFU,$EP18TSSFD --out $WORK_DIR"/summary_tsv/epimap_18-enh_prom" --out_bed $WORK_DIR"/summary_bed/epimap_18-enh_prom" > $TXT_LOG"/log3.4-epimap_18_enh_prom.txt"
#printf "3-5. GTEx eQTLs to union BED"
Rscript postgwas-exe.r --dbvenn uniset --base $GTEX_BED --out $WORK_DIR"/summary_tsv/gtex_eqtl" --out_bed $WORK_DIR"/summary_bed/gtex_eqtl" > $TXT_LOG"/log3.5-gtex_union.txt"
### END FUNCTION ###