for i in $(seq 1 22) do echo$i plink --bfile ./1000G_EUR_Phase3_plink/1000G.EAS.QC.$i --extract ./tempfile/Disease_SNP_list.txt --noweb --make-bed --out ./tempfile/1000G.EAS.QC.Disease_${i}_filtered done
连锁不平衡过滤
1 2 3 4 5 6 7 8
for i in $(seq 1 22) do echo$i plink --bfile ./tempfile/1000G.EAS.QC.Disease_${i}_filtered --indep-pairwise 50 5 0.8 --out ./tempfile/Disease_${i}_plink_prune_EAS_filtered_LD0.8 done
#Obtain the top 500 genes with the highest PCC. n_topgenes=500 scPagwas_topgenes <- rownames(Pagwas$PCC)[order(Pagwas$PCC, decreasing =T)[1:n_topgenes]] scPagwas_upgenes <- rownames(Pagwas$PCC_up)[1:n_topgenes] scPagwas_downgenes <- rownames(Pagwas$PCC_down)[1:n_topgenes] #Single_data refers to the single-cell data initially inputted. Single_data <- Seurat::AddModuleScore(Single_data, assay ="RNA",list(scPagwas_topgenes,scPagwas_upgenes,scPagwas_downgenes), name =c("scPagwas.TRS.Score","scPagwas.upTRS.Score","scPagwas.downTRS.Score")) #Calculate the p-values for scPagwas.TRS.Score of single cells after background correction. correct_pdf<-Get_CorrectBg_p(Single_data=Single_data, scPagwas.TRS.Score=Single_data$scPagwas.TRS.Score1, iters_singlecell=100, n_topgenes=1000, scPagwas_topgenes=scPagwas_topgenes) Pagwas$Random_Correct_BG_pdf <- correct_pdf #Merge the p-values of cells belonging to the same cell type into a single p-value for each cell type. Pagwas$Merged_celltype_pvalue<-Merge_celltype_p(single_p=correct_pdf$pooled_p,celltype=Pagwas$Celltype_anno$annotation)