[Genabel-commits] r2011 - pkg/MultiABEL/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Aug 10 15:39:25 CEST 2015
Author: shenxia
Date: 2015-08-10 15:39:25 +0200 (Mon, 10 Aug 2015)
New Revision: 2011
Modified:
pkg/MultiABEL/R/load.summary.R
Log:
load.summary() case not sensitive anymore for file headers
Modified: pkg/MultiABEL/R/load.summary.R
===================================================================
--- pkg/MultiABEL/R/load.summary.R 2015-07-31 14:08:45 UTC (rev 2010)
+++ pkg/MultiABEL/R/load.summary.R 2015-08-10 13:39:25 UTC (rev 2011)
@@ -5,7 +5,7 @@
#'
#' @param files A vector of file names as strings. Each file name should contain summary statistics of
#' one trait to be included in the multi-trait analysis. The columns of the summary statistics have to
-#' contain \code{'snp'} (marker ID), \code{'a1'} (the first allele), \code{'freq'}
+#' contain (uppercase or lowercase does not matter) \code{'snp'} (marker ID), \code{'a1'} (the first allele), \code{'freq'}
#' (frequency of the first allele), \code{'beta'} (effect size), \code{'se'} (standard error), and
#' \code{'n'} (sample size).
#' @param cor.pheno A #traits x #traits matrix of correlation matrix of the phenotypes, to be used to
@@ -75,6 +75,7 @@
fn <- rev(files)
for (i in m:1) {
dd <- read.table(fn[i], header = TRUE)
+ colnames(dd) <- tolower(colnames(dd))
idx <- which(duplicated(dd$snp))
if (length(idx) > 0) {
data[[i]] <- dd[-idx,]
More information about the Genabel-commits
mailing list