[Seqinr-commits] r1765 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Feb 7 13:34:34 CET 2012
Author: simonpenel
Date: 2012-02-07 13:34:34 +0100 (Tue, 07 Feb 2012)
New Revision: 1765
Modified:
pkg/R/consensus.R
Log:
Changing 'superior' into 'superior or equal' in the consenus function with thershold option. Thanks to Dave Gerrard for signaling this bug
Modified: pkg/R/consensus.R
===================================================================
--- pkg/R/consensus.R 2011-12-07 16:21:05 UTC (rev 1764)
+++ pkg/R/consensus.R 2012-02-07 12:34:34 UTC (rev 1765)
@@ -32,7 +32,7 @@
profile <- consensus(matali, method = "profile")
profile.rf <- apply(profile, 2, function(x) x/sum(x))
res <- rownames(profile.rf)[apply(profile.rf, 2, which.max)]
- res <- ifelse(apply(profile.rf, 2, max) > threshold, res, NA)
+ res <- ifelse(apply(profile.rf, 2, max) >= threshold, res, NA)
names(res) <- NULL
return(res)
}
More information about the Seqinr-commits
mailing list