Skip to content

Commit

Permalink
RMA
Browse files Browse the repository at this point in the history
  • Loading branch information
elijahedmondson committed Sep 5, 2016
1 parent a1f6c7b commit 19839d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion 8. Resample model averaging.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
library(BSgenome.Mmusculus.UCSC.mm10)
library(doParallel)
library(VariantAnnotation)
library(survival)
library(GenomicRanges)
library(regress)
library(MASS)
Expand All @@ -13,6 +14,7 @@ library(dplyr)
library(sm)
options(stringsAsFactors = F)
load(file = "~/Desktop/R/QTL/WD/GRSD.Rdata")
load("/Users/elijah/Desktop/R/QTL/WD/hs.colors.Rdata")
setwd("~/Desktop/files")
outdir = "~/Desktop/files"
Total <- read.csv("~/Desktop/R/GRSD.phenotype/CSV/GRSD.pheno.csv")
Expand Down Expand Up @@ -49,7 +51,7 @@ pheno = data.frame(row.names = Total$row.names, rownames = Total$row.names,
endoderm = as.numeric(Total$Endoderm),
mesoderm = as.numeric(Total$Mesoderm),
PSC = as.numeric(Total$Pulmonary.Sarcomatoid.Carcinoma),
Cat2 = as.numeric(Total$Cataract.2.0.Score.Date),
Cat2 = as.numeric(Total$Cataract.2.0.Score.Event),
days2 = as.numeric(Total$Cataract.2.0.Score.Days))
addcovar = matrix(pheno$sex, ncol = 1, dimnames = list(row.names(pheno), "sex"))
HZE <- subset(pheno, group == "HZE")
Expand Down
4 changes: 2 additions & 2 deletions HS.cox.RMA.chrom.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ HS.cox.RMA.chrom = function(perms, chr, pheno, pheno.col, days.col, probs, K, ad
### WORK HORSE ###
### RETURN ANY POS FOR ENRIRE CHROMOSOME ###


load("/Users/elijah/Desktop/R/QTL/WD/hs.colors.Rdata")
result = GRSD.coxph4perms(data, chr = chr, pheno = phenoperm, pheno.col, days.col, addcovar, tx, sanger.dir)

top = max(-log10(result$pv))
Expand All @@ -88,7 +88,7 @@ HS.cox.RMA.chrom = function(perms, chr, pheno, pheno.col, days.col, probs, K, ad



print(paste0("Accepted locus: ", MegaBase, " Mb"))
#print(paste0("Accepted locus: ", MegaBase, " Mb"))



Expand Down

0 comments on commit 19839d4

Please sign in to comment.