You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: R/colocboost.R
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@
30
30
#' @param dict_sumstatLD A L by 2 matrix of dictionary for \code{sumstat} and \code{LD} if there exist subsets of traits corresponding to the same sumstat.
31
31
#' The first column should be 1:L for L sumstat The second column should be the index of \code{LD} corresponding to the sumstat.
32
32
#' The innovation: do not provide the same matrix in \code{LD} to reduce the computational burden.
33
-
#' @param traits_names The names of traits, which has the same order for Y.
33
+
#' @param outcome_names The names of traits, which has the same order for Y.
34
34
#' @param target_idx The index of the target trait if perform targeted ColocBoost
35
35
#' @param effect_est Matrix of snp regression coefficients (i.e. regression beta values) in the genomic region
36
36
#' @param effect_se Matrix of standard errors associated with the beta values
@@ -108,7 +108,7 @@ colocboost <- function(X = NULL, Y = NULL, # individual data
108
108
###### - index dict for X match multiple Y / LD match multiple sumstat
109
109
dict_YX=NULL, # Y index for 1st column, X index for 2nd column
110
110
dict_sumstatLD=NULL, # sumstat index for 1st column, LD index for 2nd column
111
-
traits_names=NULL, # the names of traits
111
+
outcome_names=NULL, # the names of outcomes
112
112
###### - HyPrColoc input
113
113
effect_est=NULL, # same as HyPrColoc, beta hat matrix: with rowname of snp names
114
114
effect_se=NULL, # same as HyPrColoc, sebeta hat matrix with rowname of snp names
@@ -140,7 +140,7 @@ colocboost <- function(X = NULL, Y = NULL, # individual data
140
140
median_abs_corr=NULL,
141
141
between_purity=0.8, # minimum LD between two csets
142
142
tol=1e-9, # tol for LD
143
-
merging=TRUE, # if merge two sets for one trait
143
+
merging=TRUE, # if merge two sets for one outcome
144
144
coverage_singlew=0.8,
145
145
lambda=0.5, # the ratio for z^2 and z in weight penalty
146
146
lambda_target=1,
@@ -244,10 +244,10 @@ colocboost <- function(X = NULL, Y = NULL, # individual data
244
244
for (iin1:length(Y)){
245
245
tmp<- unique(dict_YX[dict_YX[,1]==i,2])
246
246
if (length(tmp) ==0){
247
-
warning(paste("Error: You don't provide matched X for trait", i))
247
+
warning(paste("Error: You don't provide matched X for outcome", i))
248
248
return(NULL)
249
249
} elseif (length(tmp) !=1){
250
-
warning(paste("Error: You provide different matched X for trait", i))
250
+
warning(paste("Error: You provide different matched X for outcome", i))
251
251
return(NULL)
252
252
} else {
253
253
yx_dict[i] <-tmp
@@ -338,7 +338,7 @@ colocboost <- function(X = NULL, Y = NULL, # individual data
338
338
if ( !is.null(sumstat) ){
339
339
if (is.data.frame(sumstat)){ sumstat<-list(sumstat) }
340
340
if (!is.list(sumstat)){
341
-
warning("Error: Input sumstat must be the list containing summary level data for all traits!")
341
+
warning("Error: Input sumstat must be the list containing summary level data for all outcomes!")
342
342
return(NULL)
343
343
}
344
344
# --- check if variants names in summary data
@@ -359,7 +359,7 @@ colocboost <- function(X = NULL, Y = NULL, # individual data
359
359
360
360
# if no LD input, set diagonal matrix to LD
361
361
warning("Providing the LD for summary statistics data is highly recommended. ",
362
-
"Without LD, only a single iteration will be performed under the assumption of one causal variant per trait. ",
362
+
"Without LD, only a single iteration will be performed under the assumption of one causal variant per outcome. ",
363
363
"Additionally, the purity of CoS cannot be evaluated!")
364
364
365
365
p.sumstat<- sapply(keep.snp.sumstat, length)
@@ -431,7 +431,7 @@ colocboost <- function(X = NULL, Y = NULL, # individual data
431
431
warning("Providing the sample size (n), or even a rough estimate of n, ",
432
432
"is highly recommended. Without n, the implicit assumption is ",
433
433
"n is large (Inf) and the effect sizes are small (close to zero).",
434
-
"Trait", paste(p_no, collapse=","), " in sumstat don't contain 'n'!")
434
+
"outcome", paste(p_no, collapse=","), " in sumstat don't contain 'n'!")
0 commit comments