Skip to content

Commit

Permalink
MetaSTAAR v0.9.6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Xihao Li authored and xihaoli committed Nov 18, 2023
1 parent 3bda79c commit ecaf236
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 128 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
with:
r-version: 4.3.0
r-version: 4.2.3
- name: Install BiocManager
run: |
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")
Expand Down
15 changes: 3 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,12 @@ branches:
language: r
r:
- 4.1.2

before_install:
- mkdir -p ~/.R
- echo 'CXX17 = g++-7 -std=gnu++17 -fPIC' > ~/.R/Makevars
- while travis_wait 50 sleep 300 &> /tmp/build.log || (tail -n 100 /tmp/build.log && exit 1); do echo "=====[ $SECONDS seconds, buildroot still building... ]====="; done

addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- g++-7

warnings_are_errors: false

r_binary_packages:
- glmnet

bioc_packages:
- GENESIS

Expand Down
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Package: MetaSTAAR
Type: Package
Title: Meta-Analysis of STAAR (MetaSTAAR) Procedure for Dynamic Incorporation of Multiple Functional Annotations in Whole Genome Sequencing Studies
Version: 0.9.6.2
Date: 2023-07-05
Version: 0.9.6.3
Date: 2023-11-18
Author: Xihao Li [aut, cre], Zilin Li [aut, cre], Corbin Quick [aut]
Maintainer: Xihao Li <xihaoli@g.harvard.edu>, Zilin Li <[email protected].edu>
Maintainer: Xihao Li <xihaoli@unc.edu>, Zilin Li <[email protected].edu>
Description: An R package for performing MetaSTAAR procedure in whole genome sequencing studies.
License: GPL-3
Copyright: See COPYRIGHTS for details.
Expand Down
5 changes: 1 addition & 4 deletions R/MetaSTAAR_individual_analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ MetaSTAAR_individual_analysis <- function(chr,start.loc,end.loc,study.names,samp
if (end.loc <= segment * segment.size) {
### summary statistics
sumstat.files <- paste0(sumstat.dir,"/summary.stat.",trait,".",study.names,".chr",chr,".segment",segment,".Rdata")
sumstat.list <- lapply(sumstat.files, function(x) {
load(file = x)
get(ls()[ls()!= "summary.stat"])
})
sumstat.list <- sapply(sumstat.files, function(x) mget(load(x)), simplify = TRUE)
sumstat.list <- lapply(sumstat.list, 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
30 changes: 6 additions & 24 deletions R/MetaSTAAR_merge.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ MetaSTAAR_merge <- function(chr,start.loc,end.loc,study.names,sample.sizes,sumst
if (end.loc <= segment * segment.size) {
### summary statistics
sumstat.files <- paste0(sumstat.dir,"/summary.stat.",trait,".",study.names,".chr",chr,".segment",segment,".Rdata")
sumstat.list <- lapply(sumstat.files, function(x) {
load(file = x)
get(ls()[ls()!= "summary.stat"])
})
sumstat.list <- sapply(sumstat.files, function(x) mget(load(x)), simplify = TRUE)
sumstat.list <- lapply(sumstat.list, 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 Expand Up @@ -113,10 +110,7 @@ MetaSTAAR_merge <- function(chr,start.loc,end.loc,study.names,sample.sizes,sumst

### covariance matrices
cov.files <- paste0(cov.dir,"/GTSinvG.rare.",trait,".",study.names,".chr",chr,".segment",segment,".Rdata")
cov.list <- lapply(cov.files, function(x) {
load(file = x)
get(ls()[ls()!= "cov"])
})
cov.list <- sapply(cov.files, function(x) mget(load(x)), simplify = TRUE)
cov.list <- lapply(cov.list, function(x) {
if (is.null(x)) {
as(matrix(nrow=0,ncol=0),"dgCMatrix")
Expand Down Expand Up @@ -147,10 +141,7 @@ MetaSTAAR_merge <- function(chr,start.loc,end.loc,study.names,sample.sizes,sumst
}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 @@ -169,10 +160,7 @@ MetaSTAAR_merge <- function(chr,start.loc,end.loc,study.names,sample.sizes,sumst
}, 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 Expand Up @@ -247,10 +235,7 @@ MetaSTAAR_merge <- function(chr,start.loc,end.loc,study.names,sample.sizes,sumst

### covariance matrices
cov.files1 <- paste0(cov.dir,"/GTSinvG.rare.",trait,".",study.names,".chr",chr,".segment",segment,".Rdata")
cov.list1 <- lapply(cov.files1, function(x) {
load(file = x)
get(ls()[ls()!= "cov"])
})
cov.list1 <- sapply(cov.files1, function(x) mget(load(x)), simplify = TRUE)
cov.list1 <- mapply(function(x,y,z) {
if (is.null(x)) {
x <- as(matrix(nrow=length(y),ncol=(length(y)+length(z))),"dgCMatrix")
Expand All @@ -259,10 +244,7 @@ MetaSTAAR_merge <- function(chr,start.loc,end.loc,study.names,sample.sizes,sumst
}, x = cov.list1, y = position.index1, z = position.index2, SIMPLIFY = FALSE)

cov.files2 <- paste0(cov.dir,"/GTSinvG.rare.",trait,".",study.names,".chr",chr,".segment",segment+1,".Rdata")
cov.list2 <- lapply(cov.files2, function(x) {
load(file = x)
get(ls()[ls()!= "cov"])
})
cov.list2 <- sapply(cov.files2, function(x) mget(load(x)), simplify = TRUE)
cov.list2 <- lapply(cov.list2, function(x) {
if (is.null(x)) {
as(matrix(nrow=0,ncol=0),"dgCMatrix")
Expand Down
35 changes: 7 additions & 28 deletions R/MetaSTAAR_merge_cond.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ MetaSTAAR_merge_cond <- function(chr,start.loc,end.loc,study.names,sample.sizes,
if (end.loc <= segment * segment.size) {
### summary statistics
sumstat.files <- paste0(sumstat.dir,"/summary.stat.",trait,".",study.names,".chr",chr,".segment",segment,".Rdata")
sumstat.list <- lapply(sumstat.files, function(x) {
load(file = x)
get(ls()[ls()!= "summary.stat"])
})
sumstat.list <- sapply(sumstat.files, function(x) mget(load(x)), simplify = TRUE)
sumstat.list <- lapply(sumstat.list, 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 Expand Up @@ -125,10 +122,7 @@ MetaSTAAR_merge_cond <- function(chr,start.loc,end.loc,study.names,sample.sizes,

### covariance matrices
cov.files <- paste0(cov.dir,"/GTSinvG.rare.",trait,".",study.names,".chr",chr,".segment",segment,".Rdata")
cov.list <- lapply(cov.files, function(x) {
load(file = x)
get(ls()[ls()!= "cov"])
})
cov.list <- sapply(cov.files, function(x) mget(load(x)), simplify = TRUE)
cov.list <- lapply(cov.list, function(x) {
if (is.null(x)) {
as(matrix(nrow=0,ncol=0),"dgCMatrix")
Expand Down Expand Up @@ -159,10 +153,7 @@ MetaSTAAR_merge_cond <- function(chr,start.loc,end.loc,study.names,sample.sizes,
}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 @@ -181,10 +172,7 @@ MetaSTAAR_merge_cond <- function(chr,start.loc,end.loc,study.names,sample.sizes,
}, 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 Expand Up @@ -259,10 +247,7 @@ MetaSTAAR_merge_cond <- function(chr,start.loc,end.loc,study.names,sample.sizes,

### covariance matrices
cov.files1 <- paste0(cov.dir,"/GTSinvG.rare.",trait,".",study.names,".chr",chr,".segment",segment,".Rdata")
cov.list1 <- lapply(cov.files1, function(x) {
load(file = x)
get(ls()[ls()!= "cov"])
})
cov.list1 <- sapply(cov.files1, function(x) mget(load(x)), simplify = TRUE)
cov.list1 <- mapply(function(x,y,z) {
if (is.null(x)) {
x <- as(matrix(nrow=length(y),ncol=(length(y)+length(z))),"dgCMatrix")
Expand All @@ -271,10 +256,7 @@ MetaSTAAR_merge_cond <- function(chr,start.loc,end.loc,study.names,sample.sizes,
}, x = cov.list1, y = position.index1, z = position.index2, SIMPLIFY = FALSE)

cov.files2 <- paste0(cov.dir,"/GTSinvG.rare.",trait,".",study.names,".chr",chr,".segment",segment+1,".Rdata")
cov.list2 <- lapply(cov.files2, function(x) {
load(file = x)
get(ls()[ls()!= "cov"])
})
cov.list2 <- sapply(cov.files2, function(x) mget(load(x)), simplify = TRUE)
cov.list2 <- lapply(cov.list2, function(x) {
if (is.null(x)) {
as(matrix(nrow=0,ncol=0),"dgCMatrix")
Expand Down Expand Up @@ -326,10 +308,7 @@ MetaSTAAR_merge_cond <- function(chr,start.loc,end.loc,study.names,sample.sizes,

### covariance files for conditional analysis
covcond.files <- paste0(covcond.dir,"/cov.cond.",trait,".",study.names,".chr",chr,".region.",region,".Rdata")
covcond.list <- lapply(covcond.files, function(x) {
load(file = x)
get(ls()[ls()!= "cov.cond"])
})
covcond.list <- sapply(covcond.files, function(x) mget(load(x)), simplify = TRUE)
variant_info_list <- lapply(covcond.list, function(x) {x$variant_info})
variant_info_merge <- do.call("rbind",variant_info_list)
variant_info_nodup <- variant_info_merge[!duplicated(variant_info_merge),]
Expand Down
30 changes: 6 additions & 24 deletions R/MetaSTAAR_merge_varlist.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ MetaSTAAR_merge_varlist <- function(chr,variant_pos,study.names,sample.sizes,sum
if (max(variant_pos) <= segment * segment.size) {
### summary statistics
sumstat.files <- paste0(sumstat.dir,"/summary.stat.",trait,".",study.names,".chr",chr,".segment",segment,".Rdata")
sumstat.list <- lapply(sumstat.files, function(x) {
load(file = x)
get(ls()[ls()!= "summary.stat"])
})
sumstat.list <- sapply(sumstat.files, function(x) mget(load(x)), simplify = TRUE)
sumstat.list <- lapply(sumstat.list, 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 Expand Up @@ -114,10 +111,7 @@ MetaSTAAR_merge_varlist <- function(chr,variant_pos,study.names,sample.sizes,sum

### covariance matrices
cov.files <- paste0(cov.dir,"/GTSinvG.rare.",trait,".",study.names,".chr",chr,".segment",segment,".Rdata")
cov.list <- lapply(cov.files, function(x) {
load(file = x)
get(ls()[ls()!= "cov"])
})
cov.list <- sapply(cov.files, function(x) mget(load(x)), simplify = TRUE)
cov.list <- lapply(cov.list, function(x) {
if (is.null(x)) {
as(matrix(nrow=0,ncol=0),"dgCMatrix")
Expand Down Expand Up @@ -148,10 +142,7 @@ MetaSTAAR_merge_varlist <- function(chr,variant_pos,study.names,sample.sizes,sum
}else if (max(variant_pos) <= (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 @@ -170,10 +161,7 @@ MetaSTAAR_merge_varlist <- function(chr,variant_pos,study.names,sample.sizes,sum
}, 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 Expand Up @@ -248,10 +236,7 @@ MetaSTAAR_merge_varlist <- function(chr,variant_pos,study.names,sample.sizes,sum

### covariance matrices
cov.files1 <- paste0(cov.dir,"/GTSinvG.rare.",trait,".",study.names,".chr",chr,".segment",segment,".Rdata")
cov.list1 <- lapply(cov.files1, function(x) {
load(file = x)
get(ls()[ls()!= "cov"])
})
cov.list1 <- sapply(cov.files1, function(x) mget(load(x)), simplify = TRUE)
cov.list1 <- mapply(function(x,y,z) {
if (is.null(x)) {
x <- as(matrix(nrow=length(y),ncol=(length(y)+length(z))),"dgCMatrix")
Expand All @@ -260,10 +245,7 @@ MetaSTAAR_merge_varlist <- function(chr,variant_pos,study.names,sample.sizes,sum
}, x = cov.list1, y = position.index1, z = position.index2, SIMPLIFY = FALSE)

cov.files2 <- paste0(cov.dir,"/GTSinvG.rare.",trait,".",study.names,".chr",chr,".segment",segment+1,".Rdata")
cov.list2 <- lapply(cov.files2, function(x) {
load(file = x)
get(ls()[ls()!= "cov"])
})
cov.list2 <- sapply(cov.files2, function(x) mget(load(x)), simplify = TRUE)
cov.list2 <- lapply(cov.list2, function(x) {
if (is.null(x)) {
as(matrix(nrow=0,ncol=0),"dgCMatrix")
Expand Down
35 changes: 7 additions & 28 deletions R/MetaSTAAR_merge_varlist_cond.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ MetaSTAAR_merge_varlist_cond <- function(chr,variant_pos,study.names,sample.size
if (max(variant_pos) <= segment * segment.size) {
### summary statistics
sumstat.files <- paste0(sumstat.dir,"/summary.stat.",trait,".",study.names,".chr",chr,".segment",segment,".Rdata")
sumstat.list <- lapply(sumstat.files, function(x) {
load(file = x)
get(ls()[ls()!= "summary.stat"])
})
sumstat.list <- sapply(sumstat.files, function(x) mget(load(x)), simplify = TRUE)
sumstat.list <- lapply(sumstat.list, 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 Expand Up @@ -126,10 +123,7 @@ MetaSTAAR_merge_varlist_cond <- function(chr,variant_pos,study.names,sample.size

### covariance matrices
cov.files <- paste0(cov.dir,"/GTSinvG.rare.",trait,".",study.names,".chr",chr,".segment",segment,".Rdata")
cov.list <- lapply(cov.files, function(x) {
load(file = x)
get(ls()[ls()!= "cov"])
})
cov.list <- sapply(cov.files, function(x) mget(load(x)), simplify = TRUE)
cov.list <- lapply(cov.list, function(x) {
if (is.null(x)) {
as(matrix(nrow=0,ncol=0),"dgCMatrix")
Expand Down Expand Up @@ -160,10 +154,7 @@ MetaSTAAR_merge_varlist_cond <- function(chr,variant_pos,study.names,sample.size
}else if (max(variant_pos) <= (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 @@ -182,10 +173,7 @@ MetaSTAAR_merge_varlist_cond <- function(chr,variant_pos,study.names,sample.size
}, 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 Expand Up @@ -260,10 +248,7 @@ MetaSTAAR_merge_varlist_cond <- function(chr,variant_pos,study.names,sample.size

### covariance matrices
cov.files1 <- paste0(cov.dir,"/GTSinvG.rare.",trait,".",study.names,".chr",chr,".segment",segment,".Rdata")
cov.list1 <- lapply(cov.files1, function(x) {
load(file = x)
get(ls()[ls()!= "cov"])
})
cov.list1 <- sapply(cov.files1, function(x) mget(load(x)), simplify = TRUE)
cov.list1 <- mapply(function(x,y,z) {
if (is.null(x)) {
x <- as(matrix(nrow=length(y),ncol=(length(y)+length(z))),"dgCMatrix")
Expand All @@ -272,10 +257,7 @@ MetaSTAAR_merge_varlist_cond <- function(chr,variant_pos,study.names,sample.size
}, x = cov.list1, y = position.index1, z = position.index2, SIMPLIFY = FALSE)

cov.files2 <- paste0(cov.dir,"/GTSinvG.rare.",trait,".",study.names,".chr",chr,".segment",segment+1,".Rdata")
cov.list2 <- lapply(cov.files2, function(x) {
load(file = x)
get(ls()[ls()!= "cov"])
})
cov.list2 <- sapply(cov.files2, function(x) mget(load(x)), simplify = TRUE)
cov.list2 <- lapply(cov.list2, function(x) {
if (is.null(x)) {
as(matrix(nrow=0,ncol=0),"dgCMatrix")
Expand Down Expand Up @@ -371,10 +353,7 @@ MetaSTAAR_merge_varlist_cond <- function(chr,variant_pos,study.names,sample.size

### covariance files for conditional analysis
covcond.files <- paste0(covcond.dir,"/cov.cond.",trait,".",study.names,".chr",chr,".region.",region,".Rdata")
covcond.list <- lapply(covcond.files, function(x) {
load(file = x)
get(ls()[ls()!= "cov.cond"])
})
covcond.list <- sapply(covcond.files, function(x) mget(load(x)), simplify = TRUE)
variant_info_list <- lapply(covcond.list, function(x) {x$variant_info})
variant_info_merge <- do.call("rbind",variant_info_list)
variant_info_nodup <- variant_info_merge[!duplicated(variant_info_merge),]
Expand Down
2 changes: 1 addition & 1 deletion R/MetaSTAAR_worker_cov.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
MetaSTAAR_worker_cov <- function(genotype,obj_nullmodel,cov_maf_cutoff,
variant_pos,region_midpos,qc_label=NULL,segment.size=5e5,signif.digits=3){

if(!inherits(genotype, "matrix") && !inherits(genotype, "sparseMatrix")){
if(!inherits(genotype, "matrix") && !inherits(genotype, "Matrix")){
stop("genotype is not a matrix!")
}

Expand Down
2 changes: 1 addition & 1 deletion R/MetaSTAAR_worker_cov_cond.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

MetaSTAAR_worker_cov_cond <- function(genotype,genotype_adj,obj_nullmodel,variant_info,variant_adj_info){

if(!inherits(genotype, "matrix") && !inherits(genotype, "sparseMatrix")){
if(!inherits(genotype, "matrix") && !inherits(genotype, "Matrix")){
stop("genotype is not a matrix!")
}

Expand Down
2 changes: 1 addition & 1 deletion R/MetaSTAAR_worker_sumstat.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

MetaSTAAR_worker_sumstat <- function(genotype,obj_nullmodel,variant_info,qc_label=NULL){

if(!inherits(genotype, "matrix") && !inherits(genotype, "sparseMatrix")){
if(!inherits(genotype, "matrix") && !inherits(genotype, "Matrix")){
stop("genotype is not a matrix!")
}

Expand Down
Loading

0 comments on commit ecaf236

Please sign in to comment.