From 0ea5df517ca39dee8a3974e69afaf7993e606baf Mon Sep 17 00:00:00 2001 From: Zhongli Jiang Date: Sun, 1 May 2022 02:15:26 -0400 Subject: [PATCH] protein coding --- script/adj/adj_adjust_gtex.sh | 4 ++-- script/adj/protein_coding_gtex.R | 3 ++- script/adj_portal_gtex.sh | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/script/adj/adj_adjust_gtex.sh b/script/adj/adj_adjust_gtex.sh index ffe5ce7..4c172cd 100755 --- a/script/adj/adj_adjust_gtex.sh +++ b/script/adj/adj_adjust_gtex.sh @@ -17,7 +17,7 @@ empty.txt \ all_covs_withoutigtpc_${tissue}_no_peer && echo -e 'Begin Preprocessing ...\n' -cd $SIGNET_ROOT +cd $SIGNET_TMP_ROOT/tmpa ## adjust expression by the covariates: top pcs, without PEER factors, Sex, Platform, Protocol $SIGNET_SCRIPT_ROOT/adj/gexp_cov_adjust.py --expr ${rest}_expression_normalized_igt2log_GTEx_${tissue}.expression.bed.gz \ --covf $SIGNET_TMP_ROOT/tmpa/all_covs_withoutigt_${tissue}_no_peer.combined_covariates.txt \ @@ -27,4 +27,4 @@ $SIGNET_SCRIPT_ROOT/adj/gexp_cov_adjust.py --expr ${rest}_expression_normalized_ --covf $SIGNET_TMP_ROOT/tmpa/all_covs_withoutigtpc_${tissue}_no_peer.combined_covariates.txt \ --prefix tmp > log_lung_withoutigt_no_peer -Rscript protein_coding_gtex.R +Rscript $SIGNET_SCRIPT_ROOT/adj/protein_coding_gtex.R diff --git a/script/adj/protein_coding_gtex.R b/script/adj/protein_coding_gtex.R index 949a6df..09a01d4 100644 --- a/script/adj/protein_coding_gtex.R +++ b/script/adj/protein_coding_gtex.R @@ -2,7 +2,8 @@ ##Filter and order genes library(data.table) library(rtracklayer) -gtf <- rtracklayer::import(Sys.getenv(gtf)) +print(Sys.getenv("gtf")) +gtf <- rtracklayer::import(Sys.getenv("gtf")) gtf <- as.data.frame(gtf) gtf[, 1] <- substring(gtf[, 1], 4) diff --git a/script/adj_portal_gtex.sh b/script/adj_portal_gtex.sh index 9461e0a..39b64ff 100755 --- a/script/adj_portal_gtex.sh +++ b/script/adj_portal_gtex.sh @@ -10,7 +10,7 @@ usage() { } pheno=$($SIGNET_ROOT/signet -s --pheno | sed -r '/^\s*$/d' | xargs readlink -f) -gtf=$($SIGNET_ROOT/signet -s --gtf | sed -r '/^\s*$/d' | xargs readlink -f) +gtf=$($SIGNET_ROOT/signet -s --gtf.file | sed -r '/^\s*$/d' | xargs readlink -f) tissue=$($SIGNET_ROOT/signet -s --tissue | sed -r '/^\s*$/d') anno=$($SIGNET_ROOT/signet -s --anno | sed -r '/^\s*$/d' | xargs readlink -f) resa=$($SIGNET_ROOT/signet -s --resa.gtex | sed -r '/^\s*$/d' | xargs readlink -f) @@ -59,6 +59,7 @@ do export "${i}" done + # check file existence input_file="pheno anno" for i in $input_file