Demographic and Genetic Factors Influence the Abundance of Infiltrating Immune Cells in Human Tissues
This repository contains all computer code to support the findings in the manuscript "Demographic and Genetic Factors Influence the Abundance of Infiltrating Immune Cells in Human Tissues". This manuscript describes an extensive analysis of GTEx data. Many scripts were used to support the findings. All scripts are written in the R or Bash programming languages.
Within the repository, analysis scripts are split by sections of the manuscript that contains the relevant results. Many of the scripts require certain dependencies and certain data files. The file spec-file.txt within the ./bin/ directory can be used for setting up the conda environment containing all required dependencies:
conda create --name GTEx --file spec-file.txt
The required data for analysis is described in the following file:
./bin/data_required.txt
The data files can then be downloaded by copying and pasting the wget commands into Terminal. Since genotype data is not public, we have simulated random genotypes using Plink which can be used to demo the scripts.
The analysis was performed on a linux system. Plots were created on a macOS Catalina system. The underlying raw data for the plots that do not contain genetic information can be found in the following directory:
/Users/andrewmarderstein/Documents/Research/GTEx/Infiltration/GTEx_infil/plot_data
If you can not find the code you are looking for or have any questions, please contact:
Andrew Marderstein
anm2868@med.cornell.edu
Directory: ./scripts/SynMix_Sims/
GenerateSyntheticMixture-ALL.sh
(TPMs were subsequently generated by an in-house pipeline developed by Akanksha Verma, which has been described within the methods section of the manuscript)
cibersort_simulations.R (using cibersort) \ xcell_sim_gen.R (using xcell) \
xcell_ciber_simComp.R
Directory: ./scripts/GTEx_Deconv/
running_cibersort.R (run CIBERSORT)
cibersort_out.R (process CIBERSORT output)
xCell_generation.R (run xCell)
xCell_process.R (process xCell output)
corr_heatmaps.R
xcell_cibersort_CaseExample.R
clustering_heatmap.R
celltype_boxplots2.R
immune_content_clusters_tsne.R
filter.R
generate_exprPCA_matrix.R (perform PCA of expression)
calculate_exprPCA_infil_cor.R (correlate expression PCs with immune cell scores)
generate_exprPCA_matrix.createTable2.R (for creating supplementary data file)
Directory: ./scripts/HotCold_Cluster/
ConsensusClusterPlus_mod.r
Final-GTExHotColdAnalysis.r
hot_tissueSpecific.R (for k-means clusters) hot_tissueSpecific_quintile.R (for quintile clusters) hot_tissueSpecific_quintile_spec.R (for whole blood & lung heatmap)
Directory: ./scripts/AgeSex/
AgeSex_Analysis.R
AgeSex_Plots2.R
age_sex_heatmap.R
breast_content_clusters_tsne.R
blood_MyeloidLymphoid/blood_MyeloidLymphoid_analysis.R # statistical analysis blood_MyeloidLymphoid/blood_MyeloidLymphoid_plots.R # accompanying figures
Directory: ./scripts/GeneticAnalysis/
./GTEx_Genetic_PCA/PCA_calc_all.sh
GWAS_preprocess.R
GWAS_local.sh (or GWAS.sh in parallel cloud computing environment)
Merge_Chr_GWAS_wrapper.sh (to merge different chromosomes together)
Empirical_Brown_pval_wrapper.sh
(runs Empirical_Brown_pval.R in parallel computing environment)
significant_results.R
extract_SNP.sh
figure_panel.R
separate_qq.R
GWAS_enrichment.R
iQTL_EBM_shuffle_analysis.R
All the following scripts are in the directory: ./scripts/GeneticAnalysis_2/
Analysis of related genetic variants also associated with thyroiditis using GeneHancer regions & phenoscanner
GWAS_search.R
eQTL_enrichment_method2.R
eqtl_enrich_plots.R
eQTL_network_gen.R (use eQTL_network_gen.R for *ieGene.txt output for input into GeneMania server)
pleiotropy.R
venndiagram.R