Skip to content

Commit

Permalink
Merge pull request #634 from PatrickDeelen/master
Browse files Browse the repository at this point in the history
Recount3 scripts and new release for genotype harmonizer
  • Loading branch information
CAWarmerdam authored Oct 24, 2022
2 parents 028213b + 887cd41 commit 9300129
Show file tree
Hide file tree
Showing 22 changed files with 3,507 additions and 183 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ deconvolutionTestResults/
.Rproj.user
.Rhistory
/DEPICT2/src/main/r/downstreamer_main/downstreamer_main.Rproj
Downstreamer/src/main/r/downstreamer_main/.remoterserverlog
2 changes: 1 addition & 1 deletion Downstreamer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<version>1.0.4-SNAPSHOT</version>
</parent>
<artifactId>Downstreamer</artifactId>
<version>1.29-SNAPSHOT</version>
<version>1.30-SNAPSHOT</version>
<packaging>jar</packaging>
<build>
<resources>
Expand Down
13 changes: 13 additions & 0 deletions Downstreamer/src/main/r/downstreamer_main/downstreamer_main.Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@ combinedMeta$CelllineName[studySamples] <- ""
combinedMeta$Cancer[studySamples] <- FALSE

#SRP081020 is mis-anotated in SRA as PBMC, paper and clustering both state wholeblood
studySamples <- combinedMeta$study %in% c("ERP114104", "SRP051848", "SRP056784", "SRP071965", "SRP077975", "SRP081020", "SRP098758", "SRP113245", "SRP126580", "SRP126582", "SRP126583", "SRP136057", "SRP144583", "SRP150872", "SRP214077")
studySamples <- combinedMeta$study %in% c("ERP114104", "SRP051848", "SRP056784", "SRP071965", "SRP077975", "SRP081020", "SRP098758", "SRP113245", "SRP126580", "SRP126582", "SRP126583", "SRP136057", "SRP144583", "SRP150872", "SRP214077", "SRP056443")
combinedMeta$Tissue[studySamples] <- ""
combinedMeta$Tissue2[studySamples] <- ""
combinedMeta$Cellline[studySamples] <- NA
Expand All @@ -1573,6 +1573,9 @@ combinedMeta$Cancer[studySamples] <- NA






combinedMeta$Cellline[!is.na(combinedMeta$CelllineName)&combinedMeta$CelllineName=="iPSC"] <- TRUE
combinedMeta$Cancer[!is.na(combinedMeta$Cellline) & combinedMeta$Cellline] <- NA

Expand Down Expand Up @@ -1613,7 +1616,7 @@ combinedMeta$Tissue[combinedMeta$Cohort == "GSA"]



#save(combinedMeta, file = "combinedMeta_2022_09_02.RData")
#save(combinedMeta, file = "combinedMeta_2022_09_15.RData")

load(file = "combinedMeta_2022_08_19.RData")

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
setwd("D:\\UMCG\\Genetica\\Projects\\Depict2Pgs")

source(paste0("C:\\Users\\patri\\Documents\\GitHub\\systemsgenetics\\Downstreamer\\src\\main\\r\\downstreamer_main/downstreamer_functions.r"))

traits <- read.delim("MetaBrain/traits.txt")


i <- 1

pdf("MetaBrain/withAndWithoutEqtls.pdf", height = 20, width = 10)
#png("MetaBrain/withAndWithoutEqtls.png", height = 2000, width = 1000)
layout(matrix(1:8, ncol =2))
par(pty="s")
for(i in 1:nrow(traits)){



trait <- traits[i, "trait"]
name <- traits[i, "name"]

enrichments <- read.depict2(paste0("MetaBrain/normal/",trait,"_enrichtments.xlsx"))$GenePrioritization_MetaBrain
enrichmentsIncEqtl <- read.depict2(paste0("MetaBrain/inceqt/",trait,"_enrichtments.xlsx"))$GenePrioritization_MetaBrain

enrichmentsBoth <- merge(enrichments, enrichmentsIncEqtl, "Gene.ID" , suffixes= c("Normal", "incEqtl"))

maxZ <- max(range(enrichmentsBoth$Enrichment.Z.scoreNormal, enrichmentsBoth$Enrichment.Z.scoreincEqtl))
r <- cor(enrichmentsBoth$Enrichment.Z.scoreNormal, enrichmentsBoth$Enrichment.Z.scoreincEqtl)
plot(enrichmentsBoth$Enrichment.Z.scoreNormal, enrichmentsBoth$Enrichment.Z.scoreincEqtl, bg = adjustcolor("dodgerblue2", alpha.f = 0.3), pch = 21, col=adjustcolor("dodgerblue2", alpha.f = 0.5), asp = 1, xlab = "Key gene score without eqtl information", ylab = "Key gene score without eqtl information", xlim = c(-maxZ,maxZ), ylim = c(-maxZ,maxZ), main = name)
mtext(paste0("Pearson r: ", signif(r,2)))
}
dev.off()
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,6 @@ plot(log(expSvd$d))
abline(v=60)


library(rpca)


expRpca <- rpca(t(expSub2))



library(corpcor)
expSvdFast <- fast.svd(expSubScale)
Expand Down

This file was deleted.

Loading

0 comments on commit 9300129

Please sign in to comment.