mirror of
https://github.com/gladstone-institutes/Bioinformatics-Workshops.git
synced 2025-11-30 09:45:43 -08:00
Add files via upload
This commit is contained in:
parent
3480239892
commit
00aaa4e8be
2 changed files with 13 additions and 5 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#GWAS
|
||||
########################################################################
|
||||
plink_dir=~/Desktop/handson_plink
|
||||
cd ~/Desktop/handson_plink/GWAS
|
||||
mkdir plink_results/
|
||||
#linear model --glm or --linear
|
||||
#no covariates
|
||||
|
|
@ -31,7 +32,7 @@ $plink_dir/plink2 --pfile genotypes/unrelated_hg38_auto_maf_0.05_500k_snp_filter
|
|||
#logistic model --glm or --logistic
|
||||
$plink_dir/plink2 --1 --pfile genotypes/unrelated_hg38_auto_maf_0.05_500k_snp_filtered \
|
||||
--covar covariates/covariates_with_10PCs.csv --covar-variance-standardize \
|
||||
--glm omit-ref cols=+beta,+orbeta,+ci hide-covar \
|
||||
--glm omit-ref cols=+orbeta,+ci hide-covar \
|
||||
--pheno phenotypes/phenofile.csv --pheno-name obesity --ci 0.95 \
|
||||
--out plink_results/sex.age.PCs.adj
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#Visualization in R
|
||||
##################
|
||||
#manhattan plot
|
||||
install.packages("qqman")
|
||||
#install.packages("qqman")
|
||||
library(qqman)
|
||||
|
||||
setwd("~/Desktop/handson_plink/GWAS/")
|
||||
|
|
@ -44,15 +44,22 @@ qq(gwas_BMI_sex_age_adj$P, main="quantile-quantile plot - sex, age adjusted BMI"
|
|||
qq(gwas_BMI_sex_age_PCs_adj$P, main="quantile-quantile plot - sex, age, PCs adjusted BMI")
|
||||
|
||||
dev.off()
|
||||
#include
|
||||
#pvals <- read.table("AMH_all_FVG_rs_pvalue", header=T)
|
||||
|
||||
#observed <- sort(pvals$pgc)
|
||||
|
||||
#alternative to calculate x and y axes for qqplot
|
||||
|
||||
#observed <- sort(gwas_obesity$P)
|
||||
#lobs <- -(log10(observed))
|
||||
|
||||
#expected <- c(1:length(observed))
|
||||
#lexp <- -(log10(expected / (length(expected)+1)))
|
||||
|
||||
#pdf("R_plots/obesity_qqplot.pdf", width=480, height=480)
|
||||
#plot(c(0,8), c(0,8), col="red", lwd=3, type="l", xlab="Expected (-logP)", ylab="Observed (-logP)", main="quantile-quantile plot - sex, age, PCs adjusted obesity", xlim=c(0,8), ylim=c(0,8), las=1, xaxs="i", yaxs="i", bty="l")
|
||||
#points(lexp, lobs, pch=23, cex=.4, bg="black")
|
||||
#dev.off()
|
||||
|
||||
|
||||
|
||||
########################################################################
|
||||
#open and run step05_Plink_PRS.sh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue