From cc7deb4de05bdd37dafe7642b9710a8a56f4ce14 Mon Sep 17 00:00:00 2001 From: Tiffany Amariuta Date: Tue, 25 Apr 2023 10:35:18 -0700 Subject: [PATCH 1/2] Update README.md Fixed broken path to 1KG files --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e40e63956..999a7d75f 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,8 @@ git clone https://github.com/gusevlab/fusion_twas 4. Download and unzip LD reference files for 1000 Genomes European population ``` -wget https://storage.googleapis.com/broad-alkesgroup-public/LDSCORE/1000G_Phase3_plinkfiles.tgz -tar zxvf 1000G_Phase3_plinkfiles.tgz +wget https://data.broadinstitute.org/alkesgroup/FUSION/LDREF.tar.bz2 +tar xjvf LDREF.tar.bz2 ``` 5. Download and unzip TCSC gene expression weight files @@ -70,7 +70,7 @@ for tissue in `cat TissuesA.txt` do for chr in {1..22} do -Rscript fusion_twas-master/FUSION.assoc_test.R --sumstats $your_genomewide_sumstats --weights TCSC/weights/320EUR_metatissues/${tissue}.pos --weights_dir TCSC_weight_files/weights/v8_320EUR --ref_ld_chr 1000G_EUR_Phase3_plink/1000G.EUR.QC. --chr $chr --out results_320/v8_320EUR.${trait}/v8_320EUR.${trait}.${tissue}.${chr}.dat +Rscript fusion_twas-master/FUSION.assoc_test.R --sumstats $your_genomewide_sumstats --weights TCSC/weights/320EUR_metatissues/${tissue}.pos --weights_dir TCSC_weight_files/weights/v8_320EUR --ref_ld_chr LDREF/1000G.EUR. --chr $chr --out results_320/v8_320EUR.${trait}/v8_320EUR.${trait}.${tissue}.${chr}.dat done done @@ -79,7 +79,7 @@ for tissue in `cat TissuesB.txt` do for chr in {1..22} do -Rscript fusion_twas-master/FUSION.assoc_test.R --sumstats $your_genomewide_sumstats --weights TCSC/weights/allEUR_tissues/v8_allEUR_${tissue}_blup.pos --weights_dir TCSC_weight_files/weights --ref_ld_chr 1000G_EUR_Phase3_plink/1000G.EUR.QC. --chr $chr --out results_all/v8_allEUR.${trait}/v8_allEUR.${trait}.${tissue}.${chr}.dat +Rscript fusion_twas-master/FUSION.assoc_test.R --sumstats $your_genomewide_sumstats --weights TCSC/weights/allEUR_tissues/v8_allEUR_${tissue}_blup.pos --weights_dir TCSC_weight_files/weights --ref_ld_chr LDREF/1000G.EUR. --chr $chr --out results_all/v8_allEUR.${trait}/v8_allEUR.${trait}.${tissue}.${chr}.dat done done @@ -88,7 +88,7 @@ for tissue in `cat TissuesC.txt` do for chr in {1..22} do -Rscript TCSC/analysis/FUSION.assoc_test.meta.R --sumstats $your_genomewide_sumstats --weights TCSC/weights/320EUR_metatissues/${tissue}.pos --weights_dir TCSC_weight_files/weights/v8_320EUR --ref_ld_chr 1000G_EUR_Phase3_plink/1000G.EUR.QC. --chr $chr --out results_320/v8_320EUR.${trait}/v8_320EUR.${trait}.${tissue}.${chr}.dat +Rscript TCSC/analysis/FUSION.assoc_test.meta.R --sumstats $your_genomewide_sumstats --weights TCSC/weights/320EUR_metatissues/${tissue}.pos --weights_dir TCSC_weight_files/weights/v8_320EUR --ref_ld_chr LDREF/1000G.EUR. --chr $chr --out results_320/v8_320EUR.${trait}/v8_320EUR.${trait}.${tissue}.${chr}.dat done done ``` From bda46e4a8f62ad0be5bfcb096103715c50033644 Mon Sep 17 00:00:00 2001 From: Tiffany Amariuta Date: Tue, 25 Apr 2023 10:37:08 -0700 Subject: [PATCH 2/2] Update Run_TCSC.R Fixed path bug on lines 40-42 --- analysis/Run_TCSC.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/analysis/Run_TCSC.R b/analysis/Run_TCSC.R index ab4a8a1d4..a283a457f 100644 --- a/analysis/Run_TCSC.R +++ b/analysis/Run_TCSC.R @@ -37,9 +37,9 @@ transcript_key <- fread(paste0("TCSC/weights/heritablegenes/Nall/TranscriptsIn", keep <- fread(paste0("TCSC/weights/heritablegenes/Nall/TranscriptsIn",tissues[i],"Model_keep.txt"), header = F)$V1 z <- fread(paste0("TCSC/twas_statistics/allEUR_GTEx/",trait,"/Marginal_alphas_",trait,"_",tissues[i],".txt.gz"), header = F)$V1 }else{ -transcript_key <- fread(paste0("weights/heritablegenes/N320/TranscriptsIn",tissues[i],"Model.txt"), header = F)$V1 -keep <- fread(paste0("weights/heritablegenes/N320/TranscriptsIn",tissues[i],"Model_keep.txt"), header = F)$V1 -z <- fread(paste0("twas_statistics/320EUR_GTEx/",trait,"/Marginal_alphas_",trait,"_",tissues[i],".txt.gz"), header = F)$V1 +transcript_key <- fread(paste0("TCSC/weights/heritablegenes/N320/TranscriptsIn",tissues[i],"Model.txt"), header = F)$V1 +keep <- fread(paste0("TCSC/weights/heritablegenes/N320/TranscriptsIn",tissues[i],"Model_keep.txt"), header = F)$V1 +z <- fread(paste0("TCSC/twas_statistics/320EUR_GTEx/",trait,"/Marginal_alphas_",trait,"_",tissues[i],".txt.gz"), header = F)$V1 } w <- which(transcript_key %in% keep) transcript_key <- transcript_key[w]