Skip to content

Commit

Permalink
MetaSTAAR v0.9.6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
xihaoli committed Nov 18, 2023
1 parent c7c2677 commit 452dd2c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
run: |
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")
shell: Rscript {0}
- name: Install GENESIS
- name: Install GENESIS, GenomicFeatures
run: |
BiocManager::install("GENESIS")
BiocManager::install(c("GENESIS", "GenomicFeatures"))
shell: Rscript {0}
- name: Install dependencies
run: |
Expand Down
10 changes: 2 additions & 8 deletions R/MetaSTAAR_individual_analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,7 @@ MetaSTAAR_individual_analysis <- function(chr,start.loc,end.loc,study.names,samp
}else if (end.loc <= (segment + 1) * segment.size) {
### summary statistics
sumstat.files1 <- paste0(sumstat.dir,"/summary.stat.",trait,".",study.names,".chr",chr,".segment",segment,".Rdata")
sumstat.list1 <- lapply(sumstat.files1, function(x) {
load(file = x)
get(ls()[ls()!= "summary.stat"])
})
sumstat.list1 <- sapply(sumstat.files1, function(x) mget(load(x)), simplify = TRUE)
sumstat.list1 <- lapply(sumstat.list1, function(x) {
if (!(is.null(x)) && !("qc_label" %in% colnames(x))){
data.frame(x[,1:4],qc_label="PASS",x[,5:dim(x)[2]],stringsAsFactors = FALSE)
Expand All @@ -125,10 +122,7 @@ MetaSTAAR_individual_analysis <- function(chr,start.loc,end.loc,study.names,samp
}, x = sumstat.list1, y = cov_maf_cutoff, SIMPLIFY = FALSE)

sumstat.files2 <- paste0(sumstat.dir,"/summary.stat.",trait,".",study.names,".chr",chr,".segment",segment+1,".Rdata")
sumstat.list2 <- lapply(sumstat.files2, function(x) {
load(file = x)
get(ls()[ls()!= "summary.stat"])
})
sumstat.list2 <- sapply(sumstat.files2, function(x) mget(load(x)), simplify = TRUE)
sumstat.list2 <- lapply(sumstat.list2, function(x) {
if (!(is.null(x)) && !("qc_label" %in% colnames(x))){
data.frame(x[,1:4],qc_label="PASS",x[,5:dim(x)[2]],stringsAsFactors = FALSE)
Expand Down
Binary file modified docs/MetaSTAAR_manual.pdf
Binary file not shown.

0 comments on commit 452dd2c

Please sign in to comment.