{"id":18256429,"url":"https://github.com/baderlab/pnc_pathwayanalysis","last_synced_at":"2025-04-08T22:27:46.274Z","repository":{"id":82810194,"uuid":"157639730","full_name":"BaderLab/PNC_PathwayAnalysis","owner":"BaderLab","description":"Pathway analysis pipeline for PNC data (GWAS + GSEA)","archived":false,"fork":false,"pushed_at":"2018-11-15T02:28:28.000Z","size":37786,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-02-14T17:42:41.438Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaderLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-15T02:21:43.000Z","updated_at":"2019-04-22T16:27:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"3e01bfce-1d23-43ee-9c0b-1d46b5dd8a94","html_url":"https://github.com/BaderLab/PNC_PathwayAnalysis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaderLab%2FPNC_PathwayAnalysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaderLab%2FPNC_PathwayAnalysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaderLab%2FPNC_PathwayAnalysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaderLab%2FPNC_PathwayAnalysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaderLab","download_url":"https://codeload.github.com/BaderLab/PNC_PathwayAnalysis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247937459,"owners_count":21021264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T10:21:52.029Z","updated_at":"2025-04-08T22:27:46.253Z","avatar_url":"https://github.com/BaderLab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"* Instructions on how to run the Pathway Analysis pipeline for PNC data\n* Nov 9, 2018\n* By Shirley Hui\n\nA) PERMUTE PHENOTYPES\n\n1) Permute phenotypes\n\nFile: ROOT_DIR/permutePhenos.R\n- This file permutes phenotype status in the phenoFile (see code). \n- Subjects with status -9 are not included in the permutation\n\nRun: \n\u003e Rscript perumtePhenos.R \n\n * Note: Set variables inside script before running\n\nOutput: \n * Each permutation is written out to a file with the same format as phenoFile\n * Note: pemutations are written to files to ensure reproducibility \n\nB) PERFORM GWAS (genome-wide associations)\n\n1) Make gwas batch and submit scripts\n\nFile: ROOT_DIR/make_plink_assoc_bin_jobfiles.sh\n- This script make a txt file that contains the call to run gwas (logistic regression + PC covariates) to compute snp-phenotype associations using plink.\n\nRun:\n\u003e ./make_plink_assoc_bin_jobfiles.sh \u003cphenotype\u003e 0 \u003cnum_perms\u003e \u003ccovars\u003e\n\nExample: ./make_plink_assoc_bin_jobfiles.sh volt_svt 0 100 1-5\n\nOutput:\n * a file called ROOT_DIR/jobfiles/plink_assoc_\u003cphenotype\u003e_0-\u003cnum_perms\u003e-covar-\u003ccovars\u003e.txt that contains the call to run one permutation of gwas (one call per line)\n * a file called ROOT_DIR/run_gwas_bin_\u003cphenotype\u003e_0-\u003cnum_perms\u003e-covar-\u003ccovars\u003e.sh that calls the txt file above via parallel\n\n2) Compute gene-phenotype associations \n- Run ROOT_DIR/run_gwas_bin_\u003cphenotype\u003e_0-\u003cnum_perms\u003e-covar-\u003ccovars\u003e.sh script from previous\n- The script runs GWAS (runGWAS.R) 0 to \u003cnum_perms\u003e times for pheno of interest using logistic regression and 0-n PC covariates supplied by the user \n\nOutput:\n * pvalues for each SNP outputted to a file for each permuation (0 to \u003cnum_perms\u003e)\n\nC) PERFORM PATHWAY GSEA\n\nThe following assumes the pipeline is running on a high \n\n1) Make gsea batch and submit scripts\n\nFile: ROOT_DIR/code/src/MakeJobs.java\n- This script will make a bunch of .sh files that contain the 8 parallel jobs that will run when it is called.\n- If num perm = 100, 13 .sh files will be made.  If num perm= 1000, 125 .sh files will be made.  Note code doesn't really support num perms not equal to 100 or 1000.\n- If you make any code changes, to compile script, run the ./compile.sh at the prompt\n\nRun: \n\u003e module load java\n\u003e java -cp ../out MakeJobs \u003cphenotype\u003e \u003cnum_perms\u003e bin \u003ccovars\u003e\n\nExample: java -cp ../out MakeJobs volt_svt 100 bin 1-5\n\nOutput:\n  * a bunch of job files located in ROOT_DIR/job_scripts/gsea/run-gsea-\u003cphenotype\u003e-\u003cperm\u003e-bin-covars\u003ccovars\u003e.sh\n  * a master submit script located in ROOT_DIR/submit-gsea-\u003cphenotype\u003e-bin-covars\u003ccovars\u003e.sh\n\n2) Run gsea \n- Run submit script from previous\n- You will get a bunch of warnings (which is ok) about how the submitted job time is the minimum of 15 mins.\n- This will create several directories (one for each permutation).  In each directory there will be two output files (*gsea.txt - gsea output, *genes.txt - detailed output)\n\n3) Move gsea output files into one directory\n\nFile: ROOT_DIR/moveFiles.sh\n- This will move all output files into ROOT_DIR/gsea/bin/gsea-\u003cphenotype\u003e_covars\u003ccovars\u003e where:\n  * gsea.txt files get moved to obs directory,for perm0 or perm directory, for all other permutations\n  * genes.txt files get moved to genes directory for all perms\n\nRun: \n\u003e moveFiles.sh \u003cphenotype\u003e bin \u003ccovars\u003e \u003cnumperms\u003e\n\nExample: moveFiles.sh volt_svt bin 1-5 100\n\n- Delete empty directories and run txt and log files:\n\u003e rm -r Gsea-\u003cphenotype\u003e_bin-covars\u003ccovars\u003e_*\n\u003e rm run_gsea_\u003cphenotype\u003e-\u003cbatch_num\u003e-bin-covars\u003ccovars\u003e*\n\n4) Normalize ES scores\n\nFile: ROOT_DIR/mygseaCalcNES.py\n- This script will normalize the enrichment scores from step 2 above.\n\nRun: \n\u003e module load python/2.7.14-anaconda5.1.0\n\u003e python mygseaCalcNES.py \u003cphenotype\u003e bin \u003ccovars\u003e \u003cnumperm\u003e   \n  \nExample: python mygseaCalcNES.py volt_svt bin 1-5 100\n\nOutput:\n- This will create a bunch of nes*.txt in the ROOT_DIR/nes/\u003cphenotype\u003e directory\n\n5) Compute FDR score\n\nFile: ROOT_DIR/compareFDR.R\n- This script will compute FDR scores using NES from step 4)\n\nRun: \n\u003e module load r/3.4.3-anaconda5.1.0\n\u003e Rscript computeFDR.R \u003cphenotype\u003e bin \u003ccovars\u003e \u003cnumperm\u003e\n  \nExample: Rscript computeFDR.R volt_svt bin 1-5 8\n\nOutput: - This will create a file fdr-\u003cphenotype\u003e-bin-covars\u003ccovars\u003e-\u003cnumperm\u003e.txt in the ROOT_DIR/fdr directory\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaderlab%2Fpnc_pathwayanalysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaderlab%2Fpnc_pathwayanalysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaderlab%2Fpnc_pathwayanalysis/lists"}