[Genabel-commits] r1554 - pkg/MetABEL/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jan 21 16:06:23 CET 2014
Author: lckarssen
Date: 2014-01-21 16:06:22 +0100 (Tue, 21 Jan 2014)
New Revision: 1554
Modified:
pkg/MetABEL/R/metagwa.tables.R
Log:
In MetABEL:
- Fixed two 'NOTE's in as-cran compilation (lower argument should be lower.tail)
- Fixed a few typo's in error/warning messages
Modified: pkg/MetABEL/R/metagwa.tables.R
===================================================================
--- pkg/MetABEL/R/metagwa.tables.R 2014-01-21 15:00:30 UTC (rev 1553)
+++ pkg/MetABEL/R/metagwa.tables.R 2014-01-21 15:06:22 UTC (rev 1554)
@@ -50,7 +50,7 @@
err1 <- which(df$allele1.x != df$effallele.x &
df$allele2.x != df$effallele.x)
if (length(err1) > 0) {
- cat("Effective allele does not correspond to neither allele1 nor allele2 in",
+ cat("Effective allele does not correspond to either allele1 or allele2 in",
name.x, "for SNPs\n")
print(df$name[err1])
stop("Stopped")
@@ -59,7 +59,7 @@
err2 <- which(df$allele1.y != df$effallele.y &
df$allele2.y != df$effallele.y)
if (length(err1) > 0) {
- cat("Effective allele does not correspond to neither allele1 nor allele2 in",
+ cat("Effective allele does not correspond to either allele1 or allele2 in",
name.x, "for SNPs\n")
print(df$name[err1])
stop("Stopped")
@@ -183,7 +183,7 @@
df$allele1.x != df$allele1.y |
df$allele2.x != df$allele2.y)
if (length(swcode) > 0) {
- cat("Different coding in two populaions\n")
+ cat("Different coding in two populations\n")
cat(length(swcode), "SNPs removed\n")
tmp <- df[swcode, ]
write.csv(tmp, file="failedcode.csv", row.names=FALSE)
@@ -193,7 +193,7 @@
swcode <- which(is.na(df$beta.x) & is.na(df$beta.y))
if (length(swcode)>0) {
- cat("NA for betas in both populaions\n")
+ cat("NA for betas in both populations\n")
cat(length(swcode), "SNPs removed\n")
df <- df[!(c(1:(dim(df)[1])) %in% swcode), ]
}
@@ -236,11 +236,11 @@
cat("Lambda", name.y, "=", lam.y, "\n")
if (lam.x < 1) {
- warning(paste("Lambda", name.x, "<1; constrained to 1"),
+ warning(paste("Lambda", name.x, "< 1; constrained to 1"),
immediate.=TRUE); lam.x <- 1
}
if (lam.y < 1) {
- warning(paste("Lambda", name.y, "<1; constrained to 1"),
+ warning(paste("Lambda", name.y, "< 1; constrained to 1"),
immediate.=TRUE); lam.y <- 1
}
if (precorrect & name.x!="POOLED") {
@@ -264,7 +264,7 @@
invsumw2 <- 1./(w2.x + w2.y)
mbeta <- (b.x*w2.x + b.y*w2.y)*invsumw2
mse <- sqrt(invsumw2)
- mp <- pchisq(mbeta*mbeta/(mse*mse), 1, lower=FALSE)
+ mp <- pchisq(mbeta*mbeta/(mse*mse), 1, lower.tail=FALSE)
if (name.x != "POOLED") {
npops <- 1*(!is.na(data$beta.x)) + 1*(!is.na(data$beta.y))
@@ -380,7 +380,7 @@
cat("Lambda POOLED data =", median((out$beta / out$sebeta)^2,
na.rm=TRUE) / chi2med, "\n")
out$chi2 <- out$beta * out$beta / (out$sebeta * out$sebeta)
- out$p <- pchisq(out$chi2, 1, lower=FALSE)
+ out$p <- pchisq(out$chi2, 1, lower.tail=FALSE)
out
}
More information about the Genabel-commits
mailing list