[CHNOSZ-commits] r59 - in pkg/CHNOSZ: . R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Dec 15 00:56:57 CET 2013
Author: jedick
Date: 2013-12-15 00:56:57 +0100 (Sun, 15 Dec 2013)
New Revision: 59
Modified:
pkg/CHNOSZ/DESCRIPTION
pkg/CHNOSZ/R/read.expr.R
pkg/CHNOSZ/R/revisit.R
pkg/CHNOSZ/R/util.fasta.R
pkg/CHNOSZ/inst/NEWS
Log:
read.expr() allows multiple filters; read.fasta() gets protein name before first space in header line
Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION 2013-11-24 22:13:51 UTC (rev 58)
+++ pkg/CHNOSZ/DESCRIPTION 2013-12-14 23:56:57 UTC (rev 59)
@@ -1,6 +1,6 @@
-Date: 2013-11-24
+Date: 2013-12-15
Package: CHNOSZ
-Version: 1.0.2
+Version: 1.0.2-1
Title: Chemical Thermodynamics and Activity Diagrams
Author: Jeffrey M. Dick
Maintainer: Jeffrey Dick <j3ffdick at gmail.com>
Modified: pkg/CHNOSZ/R/read.expr.R
===================================================================
--- pkg/CHNOSZ/R/read.expr.R 2013-11-24 22:13:51 UTC (rev 58)
+++ pkg/CHNOSZ/R/read.expr.R 2013-12-14 23:56:57 UTC (rev 59)
@@ -88,9 +88,9 @@
edata <- edata[!ina, ]
# apply a filter if requested
if(!is.null(filter)) {
- jfilter <- match(names(filter), colnames(edata))
- ifilter <- grep(filter[[1]], edata[, jfilter])
- edata <- edata[ifilter, ]
+ ifilter <- 1:nrow(edata)
+ for(i in 1:length(filter)) ifilter <- intersect(ifilter, grep(filter[[i]], edata[, names(filter)[[i]]]))
+ edata <- edata[unique(ifilter), ]
}
# that should be it
protein <- edata[, iid]
Modified: pkg/CHNOSZ/R/revisit.R
===================================================================
--- pkg/CHNOSZ/R/revisit.R 2013-11-24 22:13:51 UTC (rev 58)
+++ pkg/CHNOSZ/R/revisit.R 2013-12-14 23:56:57 UTC (rev 59)
@@ -163,6 +163,8 @@
# plot the points for a referenced objective
ylab <- "loga1"
xlab <- "loga2"
+ if(is.null(xlim)) xlim <- extendrange(loga2)
+ if(is.null(ylim)) ylim <- extendrange(loga1)
plot(loga2, loga1, xlab=xlab, ylab=ylab, pch=pch, col=col, xlim=xlim, ylim=ylim)
# add a 1:1 line
lines(range(loga2), range(loga2), col="grey")
Modified: pkg/CHNOSZ/R/util.fasta.R
===================================================================
--- pkg/CHNOSZ/R/util.fasta.R 2013-11-24 22:13:51 UTC (rev 58)
+++ pkg/CHNOSZ/R/util.fasta.R 2013-12-14 23:56:57 UTC (rev 59)
@@ -107,7 +107,7 @@
bnf <- strsplit(basename(file),split=".",fixed=TRUE)[[1]][1]
organism <- bnf
# protein/gene name is from header line for entry
- # (strip the ">" and go to the first space or underscore)
+ # (strip the ">" and go to the first space)
if(is.null(id)) id <- as.character(palply(1:length(i), function(j) {
# get the text of the line
f1 <- linefun(i[j],i[j])
@@ -118,9 +118,7 @@
# discard the leading '>'
f2 <- substr(f1, 2, nchar(f1))
# keep everything before the first space
- f3 <- strsplit(f2," ")[[1]][1]
- # then before or after the first underscore
- return(strsplit(f3,"_")[[1]][1])
+ return(strsplit(f2," ")[[1]][1])
} ))
if(ret=="count") {
counts <- count.aa(sequences, start, stop, type)
Modified: pkg/CHNOSZ/inst/NEWS
===================================================================
--- pkg/CHNOSZ/inst/NEWS 2013-11-24 22:13:51 UTC (rev 58)
+++ pkg/CHNOSZ/inst/NEWS 2013-12-14 23:56:57 UTC (rev 59)
@@ -1,4 +1,4 @@
-CHANGES IN CHNOSZ 1.0.2 (2013-11-24)
+CHANGES IN CHNOSZ 1.0.2-1 (2013-12-15)
--------------------------------------
- Updated extdata/protein/Sce.csv.xz using Saccharomyces Genome Database
@@ -13,6 +13,9 @@
- read.fasta() gets new argument 'id'; when supplied, it skips reading
the protein names from the FASTA headers.
+- When reading protein names from the FASTA headers, read.fasta() stops
+ only at the first space, not space or underscore as before.
+
- info() no longer specially sets state of "O2" or "oxygen" to gas.
- In thermo$obigt, names of gases (e.g. "oxygen") are used only for the
@@ -20,7 +23,11 @@
63-79. Both gases and aqueous species can continue to be referenced by
their chemical formula.
+- In read.expr(), allow multiple filter specifications.
+- In revisit(), extend ranges of axes of scatter plots.
+
+
CHANGES IN CHNOSZ 1.0.1 (2013-07-04)
------------------------------------
More information about the CHNOSZ-commits
mailing list