I also discovered another apparent bug later in the same function. The
second to last line of makeVectorsAffyBatch is
vers <- ifelse(!is.null(cdfname),
as.character(packageVersion(cdfname)), "")
If cdfname is NULL, this line will throw an error because the second
argument to ifelse will have length zero and "ifelse" does NOT do lazy
evaluation.
On 07/06/2015 12:21 PM, Ryan C. Thompson wrote:
Hello,
I just encountered a bug in frmaTools that makes it impossible to use
on certain array platforms. The following lines in
makeVectorsAffyBatch fail on an AffyBatch object on the hthgu133pluspm
platform:
pms <- pm(object)
pns <- probeNames(object)
pmi <- unlist(pmindex(object))
if (!identical(as.character(pmi), rownames(pms)))
stop("Mismatch between pmindex and rownames of pms")
I isolated the problem to five probes:
> i <- which(as.character(pmi) != rownames(pms))
> pmi[i]
1564498_PM_at9 205398_PM_s_at8 217695_PM_x_at7 223446_PM_s_at7
237802_PM_at3
3e+05 5e+05 2e+05 1e+05 4e+05
> rownames(pms)[i]
[1] "300000" "500000" "200000" "100000" "400000"
> as.character(pmi)[i]
[1] "3e+05" "5e+05" "2e+05" "1e+05" "4e+05"
As you can see, the problem is that as.character will happily use
scientific notation when it feels like it, which then fails a test for
string equality. I believe the solution is to replace that test with:
all(sprintf("%i", pmi) == rownames(pms))
-Ryan
_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel