Fig 1 ARE detection and annotation################### ./peakMergeNormal a.2.normalizePeakCounts.V1.4_H3K27ac.R a.2.normalizePeakCounts.V1.4_other.R a_2_peakHeightsNormalized_V1.4/ #all CREs detected ./peakVariationAcrossTiss/ #a.mergePeaksAcrossMarks.R a.mergePeaksAcross3actMarks.R a.2.extractRefSignalForMergedPeaksFromEpimap_V1.5_HM.R a.3.identifyAREModulesAcrossEpimap_V1.6.1_merge3ActiveMarks.R a.4.annotateModuleByrGREAT_3actMarks_Epimap.R a.pairwiseOvlpPeaks.R b.annotatePeak.byHomer.R b.annotatePeak.geneBody.R Fig 2 ARE differential signal################### #Deconv ./deconv #step a, signature peaks a.selectPeakAndSimulation_V1.7.2_colineariyAuto_rowNorm_6Celltypes.R => a_selectPeaksAndSimulation_V1.7.2_colinearAuto_rowNorm_6cellType #step b, estimate cell fraction b.real.estFract_V1.4.4_nnPoisR_noIntercept_6CellType.R => b_real_estFract_V1.4.4.1_nnPoisR_noIntcpt_peakNorm_6cellType_autoSig #filter further using the differential peaks background and TF enrichment ./peakMergeNormal c.getDiff_byLimma_V1.4.1_sva_NoEHR.R d.annotateDiffPeak_byrGREAT_V1.4.1_sva_NoEHR.R d.cmpBulkDPacrossHMs_byLimma_V1.1.R d.cmpBulkDPacrossHMs_byLimma_V1.2_cmpNumber.R d.getTFMotifsEnrichedForDP_V1.1_EpimapMotif.R (random bg) d.2.visTFMotifsEnrichedForDP_EpimapMotif.R #diagnose batch effect ./peakMergeNormal #a. identifiy dCRE by permuting group labeles of batch c.getDiff_byLimma_V1.4.1.1_sva_NoEHR_batchPerm_paral.R c.getDiff_byLimma_V1.4.1.1_sva_NoEHR_batchPerm.R c.getDiff_byLimma_V1.4.1.1_sva_NoEHR_batchPerm_Summary.R # #b. compare the differential signal when comparing one sample to samples from the same group or from the different group c.getDiff_byLimma_V1.4.1.2_sva_NoEHR_cmpBatch_paral.R c.getDiff_byLimma_V1.4.1.2_sva_NoEHR_cmpBatch.R c.getDiff_byLimma_V1.4.1.2_sva_NoEHR_cmpBatch_Summary.R evidence for gene body Marks d.calcHMCorrCrossIndivs_V1.2_promVSgeneBody.R DEG ./hiC.DiffPeakandDEGandTF genebody signal: a.geneBodyDP.meta_V1.2.1_allGenes.R a.2.cmpDPs.geneRegDomainAndGeneBody_V1.1_rmOvlp.R a.3.visDEG.metaDP_V1.2_5conds.R Fig 3 genetics################### ./haQTL a.identifyCovariatesForhaQTL_V1.2.3_filtPeakByMedianCV_geneINT.Peer.R a.2.callTisshaQTL_V1.2.3_filtPeaksByMedianCV_gINT.Peer_rmSexAge.R a.3.visHaQTLNumVSCovNum.R a.4.callTisshaQTL_fixedCov_V1.2.3_dp.bg.R a.5.multipleTestOnQTL_forPeer_V1.1_cutoffs.R #compare with hQTL calling with top 5 genotype PCs a.4.callTisshaQTL_fixedCov_V1.2.3.1_dp.bg_genotypePC.R c.comphQTL_amongDifferentVersions.R #Peer vs covariates a.2.testSampPeersWithCovariates.CellFract.R #hQTL vs GWAS: ./haQTLvsGWAS a.testBulkHaQTLVSGWAS_byColoc_V1.1_allGWAS.R a.testBulkHaQTLVSGWAS_byMR_V1.1_allGWAS.R #clump and summarize colocalization a.ClumpBDGWAS.R (Supp table 4) a.testBulkHaQTLVSGWAS_byColoc_V1.1_allGWAS_summary_byGWAS.loci.R #heritability ./heritability a.prepAnnotForLDSC.gARE.R a.prepAnnotForLDSC.CREGrpAndbulkDP.R a2.LDSCpartitionHeritab_AREGrp.bulkDP.gCREs_slctGWAS.R a3.visLDSC_AREGrp.bulkDP.gARE_slctGWAS.R #sharing across HMs and vs. hQTL-GWAS colocalization Xushen's method b.2.Comp.QTL.DirectionConsistEst.R a.2.BDGWASColocgARE.vs.hQTLSharingWithBrain.R Fig 4 causal gene and sharing###################### ./hiC.DiffPeakandDEGandTF #linking hiC.reg and links: a.buildHiCRegionLink.bulk.R differential signal at hiC block level: a.2.compDPs.hiCBlock.bulk.R => Supp. Fig. 4a ./haQTLvseQTL haQTL vs eQTL coloc: a.2.colocalizeTest.haQTLVSeQTL.coloc_V1.3.gARE_para.R haQTL vs eQTL MR: a.2.linkGenePeak_MR-Egger_V1.1.1_gARE_para.R FMeQTL linking: a.linkGenePeak_byFMeQTL_V1.1_gARE.R genetic linking: b.summaryLinks.coloc.MR.PRS_V1.3_gARE.R b.2.cmp.geneticLinks.vsHiC_V1.1_gARE.R (linkType="gene2Neighb") candidate genes: based on HiC links with TSS-asscoiated hiC regions, both hQTL-GWAS coloc and differential signal for all histone marks ./hiC.DiffPeakandDEGandTF gene Neigbhood and hic region annotation: a.gneighb.VisGWASANDBulkAnnot_v1.1_bulkLink.R DP enrichment at HiC block level: a.2.compDPs.hiCBlock.bulk.R # candidate genes: based on gLink, both hQTL-GWAS coloc, MR and differential signal, for only H3K4me1, H3K27me3, and H3K27ac ./haQTLvseQTL/c.gneighb.VisGWASANDBulkAnnot_linkFromGenetics_V1.1_3HM.R visualization of shared candidate genes from both linking scores ./haQTLvseQTL/c.2.gneighb.VisGWASANDBulkAnnot_HiCAndgLink.R #eQTL vs GWAS coloc signal ./eQTLvsGWAS a.testBlueprint.eQTLVSGWAS.coloc_byCellType.R a.testBrainScRNAeQTLVSGWAS.coloc_byCellType.R a.testGTExeQTLVSGWAS_byColoc.R compare eQTL Coloc + gLinking/diffPeak #c.2.cmbPotentialGenes_V1.1_cellsortedeQTL.R ./haQTLvseQTL/c.2.cmbPotentialGenes_V1.2_bulkAndcellsortedeQTL.R Fig 5 individual heterogeneity and subtype ################### ./sampleManifold b.factorAnalysis.across5HMs.MOFA_HiC.DP_V1.2_pvalCutoff.R b2.cmpMOFA.Factor.withEHR.R b3.clusterPatientsBasedOnMOFA.factor.V1.1_allSamps.R c.cmpPatientClusterWithEHR_byMOFA_V1.1.2_addNumericFeature.R c.cmpAllSampClusterWithEHR_byMOFA_V1.1.2_addNumericFeature.R #check EHR enrichment of all samples clustering c.findMarkerDPforCluster_V1.2_uniq.R c.2.annotateMarkDP_byrGREAT.R #subtype DP -> DEGs ./peakMergeNormal/c.getDiff_byLimma_V1.5.1_inflamSubgrps.R ./hiC.DiffPeakandDEGandTF/a.geneBodyDP.meta_V1.2.1_allGenes_subGrpDP.R ./hiC.DiffPeakandDEGandTF/a.2.cmpDPs.geneRegDomainAndGeneBody_V1.1_rmOvlp_subGrpDP.R ./hiC.DiffPeakandDEGandTF/a.3.visDEG.metaDP_V1.2_5conds_subGrpDP.R #PRS: Clumping+Threshold ./PRS/ a.baseGWASSummary.QC.R b.genomicRegions.forDecouplePRS.R b.targetMayoBD.V1.1.noSwap.QC.R c.PRS.byPlink_decoupleImmuneComp.R (ld0.4.clumpDis100kb.wind2kb) d.cmpPRS.MayoEHR_grps.R (LD 0.4, clumbDis 100kb, wind 2kb) #PRS: PRS-CS and compare with PRS-C+T ./PRS/ c.PRS.byPRS-CS.1.postEff.sh c.PRS.byPRS-CS.2.decoupleImmuneComp.R d.cmpPRS.MayoEHR_grps_V1.2_PRS_CS.R Fig 6 drugs ################### #BD drug response ./peakMergeNormal/c.getDiff_byLimma_V1.4_sva.R ./peakMergeNormal/d.annotateDiffPeak_byrGREAT_V1.4_sva.R => d_bulkDP_limma_V1.4_annotByrGREAT/ q0.2 #based on BD DEGs ./hiC.DiffPeakandDEGandTF/b.testEpiDEGvsCMapSignatures_V1.1_paral.R ./hiC.DiffPeakandDEGandTF/b.testEpiDEGvsCMapSignatures_V1.1.py #network visualization b2.visualizeEpiDEGvsCMap.R b2.visualizeEpiDEGvsCMap_subGrpDP_V1.2_cytoscape.R #vis signature genes across different perturbations ./hiC.DiffPeakandDEGandTF/b3.extractSlctExpForSignatures.py ./hiC.DiffPeakandDEGandTF/b4.visualizeEpiDEGvsCMap.heatmap.R #based on BD DEGs identified for each group of patients b.testEpiDEGvsCMapSignatures_subGrpDP_V1.1_paral.R b.testEpiDEGvsCMapSignatures_subGrpDP_V1.1.py #network visualization #b2.visualizeEpiDEGvsCMap_subGrpDP_V1.1.drugbank.R =>b_comp2CompoundSig_cMap_inflamSubGrps/a3_V1.2_subGrps b2.visualizeEpiDEGvsCMap_subGrpDP_V1.2_cytoscape.R=> b_comp2CompoundSig_cMap_inflamSubGrps/a3_V1.2_subGrps/b2_vis_V1.2_cytoscape