Re: [Bioc-devel] problem with class definitions between S4Vectors and RNeXML in using Summarized Experiment

2018-04-23 Thread Hervé Pagès

Completely agree on the importance of disambiguating class references
in the long term.

However I still think that just because we have a mechanism to
disambiguate means we shouldn't make an effort to avoid name clashes,
especially when the name clash is easy to avoid, like in the case
discussed here. Annotated is not a good name anyway. Something like
Annotatable would be more appropriate. Objects of this class **can**
be annotated but many of them are not.

H.

On 04/14/2018 12:25 PM, Michael Lawrence wrote:

Last night I checked in a workaround to S4Vectors. It just calls
getClass("Annotated") instead of passing the class name directly.

I'll check in a simple fix for is() today maybe to R 3.6 (devel) and
then we'll be good for now.

On Sat, Apr 14, 2018 at 8:59 AM, Martin Morgan
 wrote:

On 04/14/2018 07:21 AM, Vincent Carey wrote:


But Annotated is defined in S4Vectors and RNeXML; the latter is not a
Bioconductor package.

The likelihood of collisions among class names defined in different
packages seems pretty high
as S4 adoption grows.  So requiring a systematic approach to
disambiguating
class references seems inevitable.



I agree that renaming is not a robust solution, and would encourage Michael
to commit the change using the class definition in `is()` with more
elaborate solutions (really this is a problem with is(), where it should be
fixed, rather than introducing complicated syntax?) left for a later day.

Martin




On Sat, Apr 14, 2018 at 4:05 AM, Hervé Pagès  wrote:


How about renaming Annotated? Isn't having 2 classes around with the
same name fundamentally a bad situation? No amount of workarounds will
change that.

H.


On 04/12/2018 04:06 PM, Michael Lawrence wrote:


Yea, good idea, I was thinking of supporting :: in class names and
parsing them out. In code is better.  Maybe %::%? It wouldn't have to
get a class object (for one thing, a class might not exist), because
the methods package supports a 'package' attribute on the character
vector, abstracted by packageSlot().



On Thu, Apr 12, 2018 at 3:26 PM, Vincent Carey
 wrote:


If we need to disambiguate class references, perhaps an operator

could help?  Along the lines of base::"::" ...


"%c%" <- function(package,class) {

  pk = as.character(substitute(package))

  cl = as.character(substitute(class))

  getClass(cl, where=getNamespace(pk))

}


Biobase %c% ExpressionSet  # a classRepresentation instance


is(1:5, Biobase %c% ExpressionSet)  # FALSE


is(Biobase::ExpressionSet(), "ExpressionSet")  # TRUE


is(Biobase::ExpressionSet(),  Biobase %c% ExpressionSet) # TRUE






On Thu, Apr 12, 2018 at 3:57 PM, Michael Lawrence
 wrote:



Hi Davide,

We can get this fixed soon, but I was hoping to hear e.g. Herve's
opinion first if he has one.

Michael

On Thu, Apr 12, 2018 at 12:53 PM, Davide Risso

wrote:

Yea it's basically

library(S4Vectors)
library(RNeXML)
is(1:5, "Annotated")
# Found more than one class "Annotated" in cache; using the first,
from namespace 'S4Vectors'
# Also defined by ‘RNeXML’
# [1] FALSE

But can be worked around:

is(1:5, getClass("Annotated", where=getNamespace("S4Vectors"))

# [1] FALSE

Of course, using class objects instead of class names in every call
to
is() is not very palatable, but that's how it's done in all other
languages, as far as I know.

There is an inconsistency between new() and is() when resolving the
class name. new() looks into the calling package's namespace, while
is() looks at the package for the class of the 'object'. The new()
approach seems sensible for that function, since packages should be
abstracting the construction of their objects with constructors. The
is() approach is broken though, because it's easy to imagine cases
like where some foreign object is passed to a function, and the
function checks the type with is().

I can change is() to use the calling package as the fallback, so
DataFrame(1:5) no longer produces a message. But calling it from
another package, or global env, will still break, just like new().
How
does that sound?

On the other hand, maybe we should be more careful with calls to is()
and use class objects. That's a good workaround in this case, anyway,
since I probably can't get the change into R before release.

Michael


On Thu, Apr 12, 2018 at 9:03 AM, Aaron Lun  wrote:

Well, it's not really SingleCellExperiment's problem, either.

library(S4Vectors)
DataFrame(1:5) # Silent, okay.
library(RNeXML)

Re: [Bioc-devel] problem with class definitions between S4Vectors and RNeXML in using Summarized Experiment

2018-04-17 Thread Elizabeth Purdom
Dear Michael,

Thanks, that fixed the problem. The new version hasn’t shown up in a call to 
biocLite, but I was able to get it from the github repository and check it; 
also our package is now clearing bioconductor checks.

Just to note, our package has always gotten messages about the class conflicts 
during installation too. This was true with the previous patch to 
SummarizedExperiment and that is still the case with this new patch for 
S4Vectors. It doesn’t affect the user or our tests, so we’ve never tracked it 
down or asked about it, but since there has been a wider discussion about the 
question, I thought I’d mention it. You can see this in the output of our build 
of our 1.99.2 build in bioconductor:

http://bioconductor.org/checkResults/devel/bioc-LATEST/clusterExperiment/tokay2-install.html

(I have to assume it is using the new patch, 0.17.42, because before the 
package was not passing the checks and now it is)
> * installing *source* package 'clusterExperiment' ...
> ** R
> ** data
> ** byte-compile and prepare package for lazy loading
> Found more than one class "Annotated" in cache; using the first, from 
> namespace 'S4Vectors'
> Also defined by 'RNeXML'
> Found more than one class "Annotated" in cache; using the first, from 
> namespace 'S4Vectors'
> Also defined by 'RNeXML'
> Found more than one class "Annotated" in cache; using the first, from 
> namespace 'S4Vectors'
> Also defined by 'RNeXML'
> Found more than one class "Annotated" in cache; using the first, from 
> namespace 'S4Vectors'
> Also defined by 'RNeXML'
> Found more than one class "Annotated" in cache; using the first, from 
> namespace 'S4Vectors'
> Also defined by 'RNeXML'


All of the best,
Elizabeth

> On Apr 14, 2018, at 9:25 PM, Michael Lawrence  
> wrote:
> 
> Last night I checked in a workaround to S4Vectors. It just calls
> getClass("Annotated") instead of passing the class name directly.
> 
> I'll check in a simple fix for is() today maybe to R 3.6 (devel) and
> then we'll be good for now.
> 
> On Sat, Apr 14, 2018 at 8:59 AM, Martin Morgan
>  wrote:
>> On 04/14/2018 07:21 AM, Vincent Carey wrote:
>>> 
>>> But Annotated is defined in S4Vectors and RNeXML; the latter is not a
>>> Bioconductor package.
>>> 
>>> The likelihood of collisions among class names defined in different
>>> packages seems pretty high
>>> as S4 adoption grows.  So requiring a systematic approach to
>>> disambiguating
>>> class references seems inevitable.
>> 
>> 
>> I agree that renaming is not a robust solution, and would encourage Michael
>> to commit the change using the class definition in `is()` with more
>> elaborate solutions (really this is a problem with is(), where it should be
>> fixed, rather than introducing complicated syntax?) left for a later day.
>> 
>> Martin
>> 
>>> 
>>> 
>>> On Sat, Apr 14, 2018 at 4:05 AM, Hervé Pagès  wrote:
>>> 
 How about renaming Annotated? Isn't having 2 classes around with the
 same name fundamentally a bad situation? No amount of workarounds will
 change that.
 
 H.
 
 
 On 04/12/2018 04:06 PM, Michael Lawrence wrote:
 
> Yea, good idea, I was thinking of supporting :: in class names and
> parsing them out. In code is better.  Maybe %::%? It wouldn't have to
> get a class object (for one thing, a class might not exist), because
> the methods package supports a 'package' attribute on the character
> vector, abstracted by packageSlot().
> 
> 
> 
> On Thu, Apr 12, 2018 at 3:26 PM, Vincent Carey
>  wrote:
> 
>> If we need to disambiguate class references, perhaps an operator
>> 
>> could help?  Along the lines of base::"::" ...
>> 
>> 
>> "%c%" <- function(package,class) {
>> 
>> pk = as.character(substitute(package))
>> 
>> cl = as.character(substitute(class))
>> 
>> getClass(cl, where=getNamespace(pk))
>> 
>> }
>> 
>> 
>> Biobase %c% ExpressionSet  # a classRepresentation instance
>> 
>> 
>> is(1:5, Biobase %c% ExpressionSet)  # FALSE
>> 
>> 
>> is(Biobase::ExpressionSet(), "ExpressionSet")  # TRUE
>> 
>> 
>> is(Biobase::ExpressionSet(),  Biobase %c% ExpressionSet) # TRUE
>> 
>> 
>> 
>> 
>> 
>> 
>> On Thu, Apr 12, 2018 at 3:57 PM, Michael Lawrence
>>  wrote:
>> 
>>> 
>>> Hi Davide,
>>> 
>>> We can get this fixed soon, but I was hoping to hear e.g. Herve's
>>> opinion first if he has one.
>>> 
>>> Michael
>>> 
>>> On Thu, Apr 12, 2018 at 12:53 PM, Davide Risso
>>> >> wrote:
>>> 
 Hi Michael,
 
 Thanks for looking into this.
 
 Can you or someone with push permission to S4Vectors implement the
 

Re: [Bioc-devel] problem with class definitions between S4Vectors and RNeXML in using Summarized Experiment

2018-04-14 Thread Martin Morgan

On 04/14/2018 07:21 AM, Vincent Carey wrote:

But Annotated is defined in S4Vectors and RNeXML; the latter is not a
Bioconductor package.

The likelihood of collisions among class names defined in different
packages seems pretty high
as S4 adoption grows.  So requiring a systematic approach to disambiguating
class references seems inevitable.


I agree that renaming is not a robust solution, and would encourage 
Michael to commit the change using the class definition in `is()` with 
more elaborate solutions (really this is a problem with is(), where it 
should be fixed, rather than introducing complicated syntax?) left for a 
later day.


Martin




On Sat, Apr 14, 2018 at 4:05 AM, Hervé Pagès  wrote:


How about renaming Annotated? Isn't having 2 classes around with the
same name fundamentally a bad situation? No amount of workarounds will
change that.

H.


On 04/12/2018 04:06 PM, Michael Lawrence wrote:


Yea, good idea, I was thinking of supporting :: in class names and
parsing them out. In code is better.  Maybe %::%? It wouldn't have to
get a class object (for one thing, a class might not exist), because
the methods package supports a 'package' attribute on the character
vector, abstracted by packageSlot().



On Thu, Apr 12, 2018 at 3:26 PM, Vincent Carey
 wrote:


If we need to disambiguate class references, perhaps an operator

could help?  Along the lines of base::"::" ...


"%c%" <- function(package,class) {

 pk = as.character(substitute(package))

 cl = as.character(substitute(class))

 getClass(cl, where=getNamespace(pk))

}


Biobase %c% ExpressionSet  # a classRepresentation instance


is(1:5, Biobase %c% ExpressionSet)  # FALSE


is(Biobase::ExpressionSet(), "ExpressionSet")  # TRUE


is(Biobase::ExpressionSet(),  Biobase %c% ExpressionSet) # TRUE






On Thu, Apr 12, 2018 at 3:57 PM, Michael Lawrence
 wrote:



Hi Davide,

We can get this fixed soon, but I was hoping to hear e.g. Herve's
opinion first if he has one.

Michael

On Thu, Apr 12, 2018 at 12:53 PM, Davide Risso 
wrote:

Yea it's basically

library(S4Vectors)
library(RNeXML)
is(1:5, "Annotated")
# Found more than one class "Annotated" in cache; using the first,
from namespace 'S4Vectors'
# Also defined by ‘RNeXML’
# [1] FALSE

But can be worked around:

is(1:5, getClass("Annotated", where=getNamespace("S4Vectors"))

# [1] FALSE

Of course, using class objects instead of class names in every call to
is() is not very palatable, but that's how it's done in all other
languages, as far as I know.

There is an inconsistency between new() and is() when resolving the
class name. new() looks into the calling package's namespace, while
is() looks at the package for the class of the 'object'. The new()
approach seems sensible for that function, since packages should be
abstracting the construction of their objects with constructors. The
is() approach is broken though, because it's easy to imagine cases
like where some foreign object is passed to a function, and the
function checks the type with is().

I can change is() to use the calling package as the fallback, so
DataFrame(1:5) no longer produces a message. But calling it from
another package, or global env, will still break, just like new(). How
does that sound?

On the other hand, maybe we should be more careful with calls to is()
and use class objects. That's a good workaround in this case, anyway,
since I probably can't get the change into R before release.

Michael


On Thu, Apr 12, 2018 at 9:03 AM, Aaron Lun  wrote:

Well, it's not really SingleCellExperiment's problem, either.

library(S4Vectors)
DataFrame(1:5) # Silent, okay.
library(RNeXML)
DataFrame(1:5) # Prints out the message
## Found more than one class "Annotated" in cache; using the first,
from namespace 'S4Vectors'
## Also defined by ‘RNeXML’

Session information attached below.

-Aaron

sessionInfo()

R Under development (unstable) (2018-03-26 r74466)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS

Matrix products: default
BLAS: /home/cri.camres.org/lun01/Software/R/trunk/lib/libRblas.so
LAPACK: /home/cri.camres.org/lun01/Software/R/trunk/lib/libRlapack.so

locale:
[1] LC_CTYPE=en_GB.UTF-8   LC_NUMERIC=C
[3] LC_TIME=en_GB.UTF-8LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=en_GB.UTF-8   LC_NAME=C
[9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] 

Re: [Bioc-devel] problem with class definitions between S4Vectors and RNeXML in using Summarized Experiment

2018-04-14 Thread Vincent Carey
But Annotated is defined in S4Vectors and RNeXML; the latter is not a
Bioconductor package.

The likelihood of collisions among class names defined in different
packages seems pretty high
as S4 adoption grows.  So requiring a systematic approach to disambiguating
class references seems inevitable.


On Sat, Apr 14, 2018 at 4:05 AM, Hervé Pagès  wrote:

> How about renaming Annotated? Isn't having 2 classes around with the
> same name fundamentally a bad situation? No amount of workarounds will
> change that.
>
> H.
>
>
> On 04/12/2018 04:06 PM, Michael Lawrence wrote:
>
>> Yea, good idea, I was thinking of supporting :: in class names and
>> parsing them out. In code is better.  Maybe %::%? It wouldn't have to
>> get a class object (for one thing, a class might not exist), because
>> the methods package supports a 'package' attribute on the character
>> vector, abstracted by packageSlot().
>>
>>
>>
>> On Thu, Apr 12, 2018 at 3:26 PM, Vincent Carey
>>  wrote:
>>
>>> If we need to disambiguate class references, perhaps an operator
>>>
>>> could help?  Along the lines of base::"::" ...
>>>
>>>
>>> "%c%" <- function(package,class) {
>>>
>>> pk = as.character(substitute(package))
>>>
>>> cl = as.character(substitute(class))
>>>
>>> getClass(cl, where=getNamespace(pk))
>>>
>>> }
>>>
>>>
>>> Biobase %c% ExpressionSet  # a classRepresentation instance
>>>
>>>
>>> is(1:5, Biobase %c% ExpressionSet)  # FALSE
>>>
>>>
>>> is(Biobase::ExpressionSet(), "ExpressionSet")  # TRUE
>>>
>>>
>>> is(Biobase::ExpressionSet(),  Biobase %c% ExpressionSet) # TRUE
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Apr 12, 2018 at 3:57 PM, Michael Lawrence
>>>  wrote:
>>>

 Hi Davide,

 We can get this fixed soon, but I was hoping to hear e.g. Herve's
 opinion first if he has one.

 Michael

 On Thu, Apr 12, 2018 at 12:53 PM, Davide Risso 
 wrote:

> Hi Michael,
>
> Thanks for looking into this.
>
> Can you or someone with push permission to S4Vectors implement the
> workaround that you mentioned?
>
> Happy to create a pull request on Github if that helps.
>
> We’re trying to solve this to fix the clusterExperiment package build
> on
> Bioc-devel.
>
> Thanks,
> Davide
>
>
> On Apr 12, 2018, at 1:27 PM, Michael Lawrence
> 
> wrote:
>
> Yea it's basically
>
> library(S4Vectors)
> library(RNeXML)
> is(1:5, "Annotated")
> # Found more than one class "Annotated" in cache; using the first,
> from namespace 'S4Vectors'
> # Also defined by ‘RNeXML’
> # [1] FALSE
>
> But can be worked around:
>
> is(1:5, getClass("Annotated", where=getNamespace("S4Vectors"))
>
> # [1] FALSE
>
> Of course, using class objects instead of class names in every call to
> is() is not very palatable, but that's how it's done in all other
> languages, as far as I know.
>
> There is an inconsistency between new() and is() when resolving the
> class name. new() looks into the calling package's namespace, while
> is() looks at the package for the class of the 'object'. The new()
> approach seems sensible for that function, since packages should be
> abstracting the construction of their objects with constructors. The
> is() approach is broken though, because it's easy to imagine cases
> like where some foreign object is passed to a function, and the
> function checks the type with is().
>
> I can change is() to use the calling package as the fallback, so
> DataFrame(1:5) no longer produces a message. But calling it from
> another package, or global env, will still break, just like new(). How
> does that sound?
>
> On the other hand, maybe we should be more careful with calls to is()
> and use class objects. That's a good workaround in this case, anyway,
> since I probably can't get the change into R before release.
>
> Michael
>
>
> On Thu, Apr 12, 2018 at 9:03 AM, Aaron Lun  wrote:
>
> Well, it's not really SingleCellExperiment's problem, either.
>
> library(S4Vectors)
> DataFrame(1:5) # Silent, okay.
> library(RNeXML)
> DataFrame(1:5) # Prints out the message
> ## Found more than one class "Annotated" in cache; using the first,
> from namespace 'S4Vectors'
> ## Also defined by ‘RNeXML’
>
> Session information attached below.
>
> -Aaron
>
> sessionInfo()
>
> R Under development (unstable) (2018-03-26 r74466)
> Platform: x86_64-pc-linux-gnu (64-bit)
> Running under: Ubuntu 16.04.4 LTS
>
> Matrix products: default
> BLAS: /home/cri.camres.org/lun01/Software/R/trunk/lib/libRblas.so
> LAPACK: 

Re: [Bioc-devel] problem with class definitions between S4Vectors and RNeXML in using Summarized Experiment

2018-04-14 Thread Hervé Pagès

How about renaming Annotated? Isn't having 2 classes around with the
same name fundamentally a bad situation? No amount of workarounds will
change that.

H.

On 04/12/2018 04:06 PM, Michael Lawrence wrote:

Yea, good idea, I was thinking of supporting :: in class names and
parsing them out. In code is better.  Maybe %::%? It wouldn't have to
get a class object (for one thing, a class might not exist), because
the methods package supports a 'package' attribute on the character
vector, abstracted by packageSlot().



On Thu, Apr 12, 2018 at 3:26 PM, Vincent Carey
 wrote:

If we need to disambiguate class references, perhaps an operator

could help?  Along the lines of base::"::" ...


"%c%" <- function(package,class) {

pk = as.character(substitute(package))

cl = as.character(substitute(class))

getClass(cl, where=getNamespace(pk))

}


Biobase %c% ExpressionSet  # a classRepresentation instance


is(1:5, Biobase %c% ExpressionSet)  # FALSE


is(Biobase::ExpressionSet(), "ExpressionSet")  # TRUE


is(Biobase::ExpressionSet(),  Biobase %c% ExpressionSet) # TRUE






On Thu, Apr 12, 2018 at 3:57 PM, Michael Lawrence
 wrote:


Hi Davide,

We can get this fixed soon, but I was hoping to hear e.g. Herve's
opinion first if he has one.

Michael

On Thu, Apr 12, 2018 at 12:53 PM, Davide Risso 
wrote:

Hi Michael,

Thanks for looking into this.

Can you or someone with push permission to S4Vectors implement the
workaround that you mentioned?

Happy to create a pull request on Github if that helps.

We’re trying to solve this to fix the clusterExperiment package build on
Bioc-devel.

Thanks,
Davide


On Apr 12, 2018, at 1:27 PM, Michael Lawrence

wrote:

Yea it's basically

library(S4Vectors)
library(RNeXML)
is(1:5, "Annotated")
# Found more than one class "Annotated" in cache; using the first,
from namespace 'S4Vectors'
# Also defined by ‘RNeXML’
# [1] FALSE

But can be worked around:

is(1:5, getClass("Annotated", where=getNamespace("S4Vectors"))

# [1] FALSE

Of course, using class objects instead of class names in every call to
is() is not very palatable, but that's how it's done in all other
languages, as far as I know.

There is an inconsistency between new() and is() when resolving the
class name. new() looks into the calling package's namespace, while
is() looks at the package for the class of the 'object'. The new()
approach seems sensible for that function, since packages should be
abstracting the construction of their objects with constructors. The
is() approach is broken though, because it's easy to imagine cases
like where some foreign object is passed to a function, and the
function checks the type with is().

I can change is() to use the calling package as the fallback, so
DataFrame(1:5) no longer produces a message. But calling it from
another package, or global env, will still break, just like new(). How
does that sound?

On the other hand, maybe we should be more careful with calls to is()
and use class objects. That's a good workaround in this case, anyway,
since I probably can't get the change into R before release.

Michael


On Thu, Apr 12, 2018 at 9:03 AM, Aaron Lun  wrote:

Well, it's not really SingleCellExperiment's problem, either.

library(S4Vectors)
DataFrame(1:5) # Silent, okay.
library(RNeXML)
DataFrame(1:5) # Prints out the message
## Found more than one class "Annotated" in cache; using the first,
from namespace 'S4Vectors'
## Also defined by ‘RNeXML’

Session information attached below.

-Aaron

sessionInfo()

R Under development (unstable) (2018-03-26 r74466)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS

Matrix products: default
BLAS: /home/cri.camres.org/lun01/Software/R/trunk/lib/libRblas.so
LAPACK: /home/cri.camres.org/lun01/Software/R/trunk/lib/libRlapack.so

locale:
[1] LC_CTYPE=en_GB.UTF-8   LC_NUMERIC=C
[3] LC_TIME=en_GB.UTF-8LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=en_GB.UTF-8   LC_NAME=C
[9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] parallel  stats4stats graphics  grDevices
utils datasets
[8] methods   base

other attached packages:
[1] RNeXML_2.0.8ape_5.1 S4Vectors_0.17.41
[4] BiocGenerics_0.25.3

loaded via a namespace (and not attached):
[1] Rcpp_0.12.16compiler_3.6.0  pillar_1.2.1
[4] plyr_1.8.4  bindr_0.1.1 iterators_1.0.9
[7] tools_3.6.0 uuid_0.1-2  jsonlite_1.5
[10] tibble_1.4.2nlme_3.1-137lattice_0.20-35
[13] pkgconfig_2.0.1 rlang_0.2.0 foreach_1.4.4
[16] crul_0.5.2  curl_3.2bindrcpp_0.2.2
[19] httr_1.3.1  stringr_1.3.0   dplyr_0.7.4
[22] xml2_1.2.0  grid_3.6.0  reshape_0.8.7
[25] glue_1.2.0  

Re: [Bioc-devel] problem with class definitions between S4Vectors and RNeXML in using Summarized Experiment

2018-04-13 Thread Davide Risso
Hi Michael,

Thanks for looking into this.

Can you or someone with push permission to S4Vectors implement the workaround 
that you mentioned?

Happy to create a pull request on Github if that helps.

We’re trying to solve this to fix the clusterExperiment package build on 
Bioc-devel.

Thanks,
Davide


On Apr 12, 2018, at 1:27 PM, Michael Lawrence 
> wrote:

Yea it's basically

library(S4Vectors)
library(RNeXML)
is(1:5, "Annotated")
# Found more than one class "Annotated" in cache; using the first,
from namespace 'S4Vectors'
# Also defined by ‘RNeXML’
# [1] FALSE

But can be worked around:
is(1:5, getClass("Annotated", where=getNamespace("S4Vectors"))
# [1] FALSE

Of course, using class objects instead of class names in every call to
is() is not very palatable, but that's how it's done in all other
languages, as far as I know.

There is an inconsistency between new() and is() when resolving the
class name. new() looks into the calling package's namespace, while
is() looks at the package for the class of the 'object'. The new()
approach seems sensible for that function, since packages should be
abstracting the construction of their objects with constructors. The
is() approach is broken though, because it's easy to imagine cases
like where some foreign object is passed to a function, and the
function checks the type with is().

I can change is() to use the calling package as the fallback, so
DataFrame(1:5) no longer produces a message. But calling it from
another package, or global env, will still break, just like new(). How
does that sound?

On the other hand, maybe we should be more careful with calls to is()
and use class objects. That's a good workaround in this case, anyway,
since I probably can't get the change into R before release.

Michael


On Thu, Apr 12, 2018 at 9:03 AM, Aaron Lun 
> wrote:
Well, it's not really SingleCellExperiment's problem, either.

library(S4Vectors)
DataFrame(1:5) # Silent, okay.
library(RNeXML)
DataFrame(1:5) # Prints out the message
## Found more than one class "Annotated" in cache; using the first,
from namespace 'S4Vectors'
## Also defined by ‘RNeXML’

Session information attached below.

-Aaron

sessionInfo()
R Under development (unstable) (2018-03-26 r74466)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS

Matrix products: default
BLAS: 
/home/cri.camres.org/lun01/Software/R/trunk/lib/libRblas.so
LAPACK: 
/home/cri.camres.org/lun01/Software/R/trunk/lib/libRlapack.so

locale:
[1] LC_CTYPE=en_GB.UTF-8   LC_NUMERIC=C
[3] LC_TIME=en_GB.UTF-8LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=en_GB.UTF-8   LC_NAME=C
[9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] parallel  stats4stats graphics  grDevices
utils datasets
[8] methods   base

other attached packages:
[1] RNeXML_2.0.8ape_5.1 S4Vectors_0.17.41
[4] BiocGenerics_0.25.3

loaded via a namespace (and not attached):
[1] Rcpp_0.12.16compiler_3.6.0  pillar_1.2.1
[4] plyr_1.8.4  bindr_0.1.1 iterators_1.0.9
[7] tools_3.6.0 uuid_0.1-2  jsonlite_1.5
[10] tibble_1.4.2nlme_3.1-137lattice_0.20-35
[13] pkgconfig_2.0.1 rlang_0.2.0 foreach_1.4.4
[16] crul_0.5.2  curl_3.2bindrcpp_0.2.2
[19] httr_1.3.1  stringr_1.3.0   dplyr_0.7.4
[22] xml2_1.2.0  grid_3.6.0  reshape_0.8.7
[25] glue_1.2.0  data.table_1.10.4-3 R6_2.2.2
[28] XML_3.98-1.10   purrr_0.2.4 reshape2_1.4.3
[31] tidyr_0.8.0 magrittr_1.5codetools_0.2-15
[34] assertthat_0.2.0bold_0.5.0  taxize_0.9.3
[37] stringi_1.1.7   lazyeval_0.2.1  zoo_1.8-1


On Thu, 2018-04-12 at 17:40 +0200, Elizabeth Purdom wrote:
Just to follow up on my previous post. I am able to replicate the
problem in the problem like in the github post from 2 years ago (http
s://github.com/epurdom/clusterExperiment/issues/66
)
 only now it
is not the SummarizedExperiment class but the SingleCellExperiment
class that has the problem. [And I was incorrect, the problem does
occur in  development version 2018-03-22 r74446].

So this is actually a problem with the SingleCellExperiment package —
sorry for the incorrect subject line.

All of the best,
Elizabeth



library(SingleCellExperiment)
SingleCellExperiment()
class: SingleCellExperiment
dim: 0 0

Re: [Bioc-devel] problem with class definitions between S4Vectors and RNeXML in using Summarized Experiment

2018-04-12 Thread Michael Lawrence
Yea, good idea, I was thinking of supporting :: in class names and
parsing them out. In code is better.  Maybe %::%? It wouldn't have to
get a class object (for one thing, a class might not exist), because
the methods package supports a 'package' attribute on the character
vector, abstracted by packageSlot().



On Thu, Apr 12, 2018 at 3:26 PM, Vincent Carey
 wrote:
> If we need to disambiguate class references, perhaps an operator
>
> could help?  Along the lines of base::"::" ...
>
>
> "%c%" <- function(package,class) {
>
>pk = as.character(substitute(package))
>
>cl = as.character(substitute(class))
>
>getClass(cl, where=getNamespace(pk))
>
> }
>
>
> Biobase %c% ExpressionSet  # a classRepresentation instance
>
>
> is(1:5, Biobase %c% ExpressionSet)  # FALSE
>
>
> is(Biobase::ExpressionSet(), "ExpressionSet")  # TRUE
>
>
> is(Biobase::ExpressionSet(),  Biobase %c% ExpressionSet) # TRUE
>
>
>
>
>
>
> On Thu, Apr 12, 2018 at 3:57 PM, Michael Lawrence
>  wrote:
>>
>> Hi Davide,
>>
>> We can get this fixed soon, but I was hoping to hear e.g. Herve's
>> opinion first if he has one.
>>
>> Michael
>>
>> On Thu, Apr 12, 2018 at 12:53 PM, Davide Risso 
>> wrote:
>> > Hi Michael,
>> >
>> > Thanks for looking into this.
>> >
>> > Can you or someone with push permission to S4Vectors implement the
>> > workaround that you mentioned?
>> >
>> > Happy to create a pull request on Github if that helps.
>> >
>> > We’re trying to solve this to fix the clusterExperiment package build on
>> > Bioc-devel.
>> >
>> > Thanks,
>> > Davide
>> >
>> >
>> > On Apr 12, 2018, at 1:27 PM, Michael Lawrence
>> > 
>> > wrote:
>> >
>> > Yea it's basically
>> >
>> > library(S4Vectors)
>> > library(RNeXML)
>> > is(1:5, "Annotated")
>> > # Found more than one class "Annotated" in cache; using the first,
>> > from namespace 'S4Vectors'
>> > # Also defined by ‘RNeXML’
>> > # [1] FALSE
>> >
>> > But can be worked around:
>> >
>> > is(1:5, getClass("Annotated", where=getNamespace("S4Vectors"))
>> >
>> > # [1] FALSE
>> >
>> > Of course, using class objects instead of class names in every call to
>> > is() is not very palatable, but that's how it's done in all other
>> > languages, as far as I know.
>> >
>> > There is an inconsistency between new() and is() when resolving the
>> > class name. new() looks into the calling package's namespace, while
>> > is() looks at the package for the class of the 'object'. The new()
>> > approach seems sensible for that function, since packages should be
>> > abstracting the construction of their objects with constructors. The
>> > is() approach is broken though, because it's easy to imagine cases
>> > like where some foreign object is passed to a function, and the
>> > function checks the type with is().
>> >
>> > I can change is() to use the calling package as the fallback, so
>> > DataFrame(1:5) no longer produces a message. But calling it from
>> > another package, or global env, will still break, just like new(). How
>> > does that sound?
>> >
>> > On the other hand, maybe we should be more careful with calls to is()
>> > and use class objects. That's a good workaround in this case, anyway,
>> > since I probably can't get the change into R before release.
>> >
>> > Michael
>> >
>> >
>> > On Thu, Apr 12, 2018 at 9:03 AM, Aaron Lun  wrote:
>> >
>> > Well, it's not really SingleCellExperiment's problem, either.
>> >
>> > library(S4Vectors)
>> > DataFrame(1:5) # Silent, okay.
>> > library(RNeXML)
>> > DataFrame(1:5) # Prints out the message
>> > ## Found more than one class "Annotated" in cache; using the first,
>> > from namespace 'S4Vectors'
>> > ## Also defined by ‘RNeXML’
>> >
>> > Session information attached below.
>> >
>> > -Aaron
>> >
>> > sessionInfo()
>> >
>> > R Under development (unstable) (2018-03-26 r74466)
>> > Platform: x86_64-pc-linux-gnu (64-bit)
>> > Running under: Ubuntu 16.04.4 LTS
>> >
>> > Matrix products: default
>> > BLAS: /home/cri.camres.org/lun01/Software/R/trunk/lib/libRblas.so
>> > LAPACK: /home/cri.camres.org/lun01/Software/R/trunk/lib/libRlapack.so
>> >
>> > locale:
>> > [1] LC_CTYPE=en_GB.UTF-8   LC_NUMERIC=C
>> > [3] LC_TIME=en_GB.UTF-8LC_COLLATE=en_GB.UTF-8
>> > [5] LC_MONETARY=en_GB.UTF-8LC_MESSAGES=en_GB.UTF-8
>> > [7] LC_PAPER=en_GB.UTF-8   LC_NAME=C
>> > [9] LC_ADDRESS=C   LC_TELEPHONE=C
>> > [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
>> >
>> > attached base packages:
>> > [1] parallel  stats4stats graphics  grDevices
>> > utils datasets
>> > [8] methods   base
>> >
>> > other attached packages:
>> > [1] RNeXML_2.0.8ape_5.1 S4Vectors_0.17.41
>> > [4] BiocGenerics_0.25.3
>> >
>> > loaded via a namespace (and not attached):
>> > [1] Rcpp_0.12.16compiler_3.6.0  pillar_1.2.1
>> > [4] plyr_1.8.4  bindr_0.1.1 iterators_1.0.9
>> > [7] tools_3.6.0  

Re: [Bioc-devel] problem with class definitions between S4Vectors and RNeXML in using Summarized Experiment

2018-04-12 Thread Vincent Carey
If we need to disambiguate class references, perhaps an operator

could help?  Along the lines of base::"::" ...


"%c%" <- function(package,class) {

   pk = as.character(substitute(package))

   cl = as.character(substitute(class))

   getClass(cl, where=getNamespace(pk))

}


Biobase %c% ExpressionSet  # a classRepresentation instance


is(1:5, Biobase %c% ExpressionSet)  # FALSE

is(Biobase::ExpressionSet(), "ExpressionSet")  # TRUE


is(Biobase::ExpressionSet(),  Biobase %c% ExpressionSet) # TRUE






On Thu, Apr 12, 2018 at 3:57 PM, Michael Lawrence  wrote:

> Hi Davide,
>
> We can get this fixed soon, but I was hoping to hear e.g. Herve's
> opinion first if he has one.
>
> Michael
>
> On Thu, Apr 12, 2018 at 12:53 PM, Davide Risso 
> wrote:
> > Hi Michael,
> >
> > Thanks for looking into this.
> >
> > Can you or someone with push permission to S4Vectors implement the
> > workaround that you mentioned?
> >
> > Happy to create a pull request on Github if that helps.
> >
> > We’re trying to solve this to fix the clusterExperiment package build on
> > Bioc-devel.
> >
> > Thanks,
> > Davide
> >
> >
> > On Apr 12, 2018, at 1:27 PM, Michael Lawrence  >
> > wrote:
> >
> > Yea it's basically
> >
> > library(S4Vectors)
> > library(RNeXML)
> > is(1:5, "Annotated")
> > # Found more than one class "Annotated" in cache; using the first,
> > from namespace 'S4Vectors'
> > # Also defined by ‘RNeXML’
> > # [1] FALSE
> >
> > But can be worked around:
> >
> > is(1:5, getClass("Annotated", where=getNamespace("S4Vectors"))
> >
> > # [1] FALSE
> >
> > Of course, using class objects instead of class names in every call to
> > is() is not very palatable, but that's how it's done in all other
> > languages, as far as I know.
> >
> > There is an inconsistency between new() and is() when resolving the
> > class name. new() looks into the calling package's namespace, while
> > is() looks at the package for the class of the 'object'. The new()
> > approach seems sensible for that function, since packages should be
> > abstracting the construction of their objects with constructors. The
> > is() approach is broken though, because it's easy to imagine cases
> > like where some foreign object is passed to a function, and the
> > function checks the type with is().
> >
> > I can change is() to use the calling package as the fallback, so
> > DataFrame(1:5) no longer produces a message. But calling it from
> > another package, or global env, will still break, just like new(). How
> > does that sound?
> >
> > On the other hand, maybe we should be more careful with calls to is()
> > and use class objects. That's a good workaround in this case, anyway,
> > since I probably can't get the change into R before release.
> >
> > Michael
> >
> >
> > On Thu, Apr 12, 2018 at 9:03 AM, Aaron Lun  wrote:
> >
> > Well, it's not really SingleCellExperiment's problem, either.
> >
> > library(S4Vectors)
> > DataFrame(1:5) # Silent, okay.
> > library(RNeXML)
> > DataFrame(1:5) # Prints out the message
> > ## Found more than one class "Annotated" in cache; using the first,
> > from namespace 'S4Vectors'
> > ## Also defined by ‘RNeXML’
> >
> > Session information attached below.
> >
> > -Aaron
> >
> > sessionInfo()
> >
> > R Under development (unstable) (2018-03-26 r74466)
> > Platform: x86_64-pc-linux-gnu (64-bit)
> > Running under: Ubuntu 16.04.4 LTS
> >
> > Matrix products: default
> > BLAS: /home/cri.camres.org/lun01/Software/R/trunk/lib/libRblas.so
> > LAPACK: /home/cri.camres.org/lun01/Software/R/trunk/lib/libRlapack.so
> >
> > locale:
> > [1] LC_CTYPE=en_GB.UTF-8   LC_NUMERIC=C
> > [3] LC_TIME=en_GB.UTF-8LC_COLLATE=en_GB.UTF-8
> > [5] LC_MONETARY=en_GB.UTF-8LC_MESSAGES=en_GB.UTF-8
> > [7] LC_PAPER=en_GB.UTF-8   LC_NAME=C
> > [9] LC_ADDRESS=C   LC_TELEPHONE=C
> > [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
> >
> > attached base packages:
> > [1] parallel  stats4stats graphics  grDevices
> > utils datasets
> > [8] methods   base
> >
> > other attached packages:
> > [1] RNeXML_2.0.8ape_5.1 S4Vectors_0.17.41
> > [4] BiocGenerics_0.25.3
> >
> > loaded via a namespace (and not attached):
> > [1] Rcpp_0.12.16compiler_3.6.0  pillar_1.2.1
> > [4] plyr_1.8.4  bindr_0.1.1 iterators_1.0.9
> > [7] tools_3.6.0 uuid_0.1-2  jsonlite_1.5
> > [10] tibble_1.4.2nlme_3.1-137lattice_0.20-35
> > [13] pkgconfig_2.0.1 rlang_0.2.0 foreach_1.4.4
> > [16] crul_0.5.2  curl_3.2bindrcpp_0.2.2
> > [19] httr_1.3.1  stringr_1.3.0   dplyr_0.7.4
> > [22] xml2_1.2.0  grid_3.6.0  reshape_0.8.7
> > [25] glue_1.2.0  data.table_1.10.4-3 R6_2.2.2
> > [28] XML_3.98-1.10   purrr_0.2.4 reshape2_1.4.3
> > [31] tidyr_0.8.0 magrittr_1.5codetools_0.2-15
> > [34] 

Re: [Bioc-devel] problem with class definitions between S4Vectors and RNeXML in using Summarized Experiment

2018-04-12 Thread Michael Lawrence
Hi Davide,

We can get this fixed soon, but I was hoping to hear e.g. Herve's
opinion first if he has one.

Michael

On Thu, Apr 12, 2018 at 12:53 PM, Davide Risso  wrote:
> Hi Michael,
>
> Thanks for looking into this.
>
> Can you or someone with push permission to S4Vectors implement the
> workaround that you mentioned?
>
> Happy to create a pull request on Github if that helps.
>
> We’re trying to solve this to fix the clusterExperiment package build on
> Bioc-devel.
>
> Thanks,
> Davide
>
>
> On Apr 12, 2018, at 1:27 PM, Michael Lawrence 
> wrote:
>
> Yea it's basically
>
> library(S4Vectors)
> library(RNeXML)
> is(1:5, "Annotated")
> # Found more than one class "Annotated" in cache; using the first,
> from namespace 'S4Vectors'
> # Also defined by ‘RNeXML’
> # [1] FALSE
>
> But can be worked around:
>
> is(1:5, getClass("Annotated", where=getNamespace("S4Vectors"))
>
> # [1] FALSE
>
> Of course, using class objects instead of class names in every call to
> is() is not very palatable, but that's how it's done in all other
> languages, as far as I know.
>
> There is an inconsistency between new() and is() when resolving the
> class name. new() looks into the calling package's namespace, while
> is() looks at the package for the class of the 'object'. The new()
> approach seems sensible for that function, since packages should be
> abstracting the construction of their objects with constructors. The
> is() approach is broken though, because it's easy to imagine cases
> like where some foreign object is passed to a function, and the
> function checks the type with is().
>
> I can change is() to use the calling package as the fallback, so
> DataFrame(1:5) no longer produces a message. But calling it from
> another package, or global env, will still break, just like new(). How
> does that sound?
>
> On the other hand, maybe we should be more careful with calls to is()
> and use class objects. That's a good workaround in this case, anyway,
> since I probably can't get the change into R before release.
>
> Michael
>
>
> On Thu, Apr 12, 2018 at 9:03 AM, Aaron Lun  wrote:
>
> Well, it's not really SingleCellExperiment's problem, either.
>
> library(S4Vectors)
> DataFrame(1:5) # Silent, okay.
> library(RNeXML)
> DataFrame(1:5) # Prints out the message
> ## Found more than one class "Annotated" in cache; using the first,
> from namespace 'S4Vectors'
> ## Also defined by ‘RNeXML’
>
> Session information attached below.
>
> -Aaron
>
> sessionInfo()
>
> R Under development (unstable) (2018-03-26 r74466)
> Platform: x86_64-pc-linux-gnu (64-bit)
> Running under: Ubuntu 16.04.4 LTS
>
> Matrix products: default
> BLAS: /home/cri.camres.org/lun01/Software/R/trunk/lib/libRblas.so
> LAPACK: /home/cri.camres.org/lun01/Software/R/trunk/lib/libRlapack.so
>
> locale:
> [1] LC_CTYPE=en_GB.UTF-8   LC_NUMERIC=C
> [3] LC_TIME=en_GB.UTF-8LC_COLLATE=en_GB.UTF-8
> [5] LC_MONETARY=en_GB.UTF-8LC_MESSAGES=en_GB.UTF-8
> [7] LC_PAPER=en_GB.UTF-8   LC_NAME=C
> [9] LC_ADDRESS=C   LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] parallel  stats4stats graphics  grDevices
> utils datasets
> [8] methods   base
>
> other attached packages:
> [1] RNeXML_2.0.8ape_5.1 S4Vectors_0.17.41
> [4] BiocGenerics_0.25.3
>
> loaded via a namespace (and not attached):
> [1] Rcpp_0.12.16compiler_3.6.0  pillar_1.2.1
> [4] plyr_1.8.4  bindr_0.1.1 iterators_1.0.9
> [7] tools_3.6.0 uuid_0.1-2  jsonlite_1.5
> [10] tibble_1.4.2nlme_3.1-137lattice_0.20-35
> [13] pkgconfig_2.0.1 rlang_0.2.0 foreach_1.4.4
> [16] crul_0.5.2  curl_3.2bindrcpp_0.2.2
> [19] httr_1.3.1  stringr_1.3.0   dplyr_0.7.4
> [22] xml2_1.2.0  grid_3.6.0  reshape_0.8.7
> [25] glue_1.2.0  data.table_1.10.4-3 R6_2.2.2
> [28] XML_3.98-1.10   purrr_0.2.4 reshape2_1.4.3
> [31] tidyr_0.8.0 magrittr_1.5codetools_0.2-15
> [34] assertthat_0.2.0bold_0.5.0  taxize_0.9.3
> [37] stringi_1.1.7   lazyeval_0.2.1  zoo_1.8-1
>
>
> On Thu, 2018-04-12 at 17:40 +0200, Elizabeth Purdom wrote:
>
> Just to follow up on my previous post. I am able to replicate the
> problem in the problem like in the github post from 2 years ago (http
> s://github.com/epurdom/clusterExperiment/issues/66
> )
> only now it
>
> is not the SummarizedExperiment class but the SingleCellExperiment
> class that has the problem. [And I was incorrect, the problem does
> occur in  development version 2018-03-22 

Re: [Bioc-devel] problem with class definitions between S4Vectors and RNeXML in using Summarized Experiment

2018-04-12 Thread Michael Lawrence
Yea it's basically

library(S4Vectors)
library(RNeXML)
is(1:5, "Annotated")
# Found more than one class "Annotated" in cache; using the first,
from namespace 'S4Vectors'
# Also defined by ‘RNeXML’
# [1] FALSE

But can be worked around:
> is(1:5, getClass("Annotated", where=getNamespace("S4Vectors"))
# [1] FALSE

Of course, using class objects instead of class names in every call to
is() is not very palatable, but that's how it's done in all other
languages, as far as I know.

There is an inconsistency between new() and is() when resolving the
class name. new() looks into the calling package's namespace, while
is() looks at the package for the class of the 'object'. The new()
approach seems sensible for that function, since packages should be
abstracting the construction of their objects with constructors. The
is() approach is broken though, because it's easy to imagine cases
like where some foreign object is passed to a function, and the
function checks the type with is().

I can change is() to use the calling package as the fallback, so
DataFrame(1:5) no longer produces a message. But calling it from
another package, or global env, will still break, just like new(). How
does that sound?

On the other hand, maybe we should be more careful with calls to is()
and use class objects. That's a good workaround in this case, anyway,
since I probably can't get the change into R before release.

Michael


On Thu, Apr 12, 2018 at 9:03 AM, Aaron Lun  wrote:
> Well, it's not really SingleCellExperiment's problem, either.
>
> library(S4Vectors)
> DataFrame(1:5) # Silent, okay.
> library(RNeXML)
> DataFrame(1:5) # Prints out the message
> ## Found more than one class "Annotated" in cache; using the first,
>  from namespace 'S4Vectors'
> ## Also defined by ‘RNeXML’
>
> Session information attached below.
>
> -Aaron
>
>> sessionInfo()
> R Under development (unstable) (2018-03-26 r74466)
> Platform: x86_64-pc-linux-gnu (64-bit)
> Running under: Ubuntu 16.04.4 LTS
>
> Matrix products: default
> BLAS: /home/cri.camres.org/lun01/Software/R/trunk/lib/libRblas.so
> LAPACK: /home/cri.camres.org/lun01/Software/R/trunk/lib/libRlapack.so
>
> locale:
>  [1] LC_CTYPE=en_GB.UTF-8   LC_NUMERIC=C
>  [3] LC_TIME=en_GB.UTF-8LC_COLLATE=en_GB.UTF-8
>  [5] LC_MONETARY=en_GB.UTF-8LC_MESSAGES=en_GB.UTF-8
>  [7] LC_PAPER=en_GB.UTF-8   LC_NAME=C
>  [9] LC_ADDRESS=C   LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] parallel  stats4stats graphics  grDevices
> utils datasets
> [8] methods   base
>
> other attached packages:
> [1] RNeXML_2.0.8ape_5.1 S4Vectors_0.17.41
> [4] BiocGenerics_0.25.3
>
> loaded via a namespace (and not attached):
>  [1] Rcpp_0.12.16compiler_3.6.0  pillar_1.2.1
>  [4] plyr_1.8.4  bindr_0.1.1 iterators_1.0.9
>  [7] tools_3.6.0 uuid_0.1-2  jsonlite_1.5
> [10] tibble_1.4.2nlme_3.1-137lattice_0.20-35
> [13] pkgconfig_2.0.1 rlang_0.2.0 foreach_1.4.4
> [16] crul_0.5.2  curl_3.2bindrcpp_0.2.2
> [19] httr_1.3.1  stringr_1.3.0   dplyr_0.7.4
> [22] xml2_1.2.0  grid_3.6.0  reshape_0.8.7
> [25] glue_1.2.0  data.table_1.10.4-3 R6_2.2.2
> [28] XML_3.98-1.10   purrr_0.2.4 reshape2_1.4.3
> [31] tidyr_0.8.0 magrittr_1.5codetools_0.2-15
> [34] assertthat_0.2.0bold_0.5.0  taxize_0.9.3
> [37] stringi_1.1.7   lazyeval_0.2.1  zoo_1.8-1
>
>
> On Thu, 2018-04-12 at 17:40 +0200, Elizabeth Purdom wrote:
>> Just to follow up on my previous post. I am able to replicate the
>> problem in the problem like in the github post from 2 years ago (http
>> s://github.com/epurdom/clusterExperiment/issues/66
>> ) only now it
>> is not the SummarizedExperiment class but the SingleCellExperiment
>> class that has the problem. [And I was incorrect, the problem does
>> occur in  development version 2018-03-22 r74446].
>>
>> So this is actually a problem with the SingleCellExperiment package —
>> sorry for the incorrect subject line.
>>
>> All of the best,
>> Elizabeth
>>
>> >
>> > >
>> > > library(SingleCellExperiment)
>> > > SingleCellExperiment()
>> > class: SingleCellExperiment
>> > dim: 0 0
>> > metadata(0):
>> > assays(0):
>> > rownames: NULL
>> > rowData names(0):
>> > colnames: NULL
>> > colData names(0):
>> > reducedDimNames(0):
>> > spikeNames(0):
>> > >
>> > > library(RNeXML)
>> > Loading required package: ape
>> > >
>> > >
>> > > SingleCellExperiment()
>> > Found more than one class "Annotated" in cache; using the first,
>> > from namespace 'S4Vectors'
>> > Also defined by ‘RNeXML’
>> > Found more than one class "Annotated" in cache; using the first,
>> > from namespace 'S4Vectors'
>> > Also defined by ‘RNeXML’
>> > class: SingleCellExperiment
>> > dim: 0 0
>> > metadata(0):
>> > assays(0):

Re: [Bioc-devel] problem with class definitions between S4Vectors and RNeXML in using Summarized Experiment

2018-04-12 Thread Aaron Lun
Well, it's not really SingleCellExperiment's problem, either.

library(S4Vectors)
DataFrame(1:5) # Silent, okay.
library(RNeXML)
DataFrame(1:5) # Prints out the message
## Found more than one class "Annotated" in cache; using the first,
 from namespace 'S4Vectors'
## Also defined by ‘RNeXML’

Session information attached below.

-Aaron

> sessionInfo()
R Under development (unstable) (2018-03-26 r74466)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS

Matrix products: default
BLAS: /home/cri.camres.org/lun01/Software/R/trunk/lib/libRblas.so
LAPACK: /home/cri.camres.org/lun01/Software/R/trunk/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_GB.UTF-8   LC_NUMERIC=C  
 [3] LC_TIME=en_GB.UTF-8LC_COLLATE=en_GB.UTF-8
 [5] LC_MONETARY=en_GB.UTF-8LC_MESSAGES=en_GB.UTF-8   
 [7] LC_PAPER=en_GB.UTF-8   LC_NAME=C 
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C   

attached base packages:
[1] parallel  stats4stats graphics  grDevices
utils datasets 
[8] methods   base 

other attached packages:
[1] RNeXML_2.0.8ape_5.1 S4Vectors_0.17.41  
[4] BiocGenerics_0.25.3

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.16compiler_3.6.0  pillar_1.2.1   
 [4] plyr_1.8.4  bindr_0.1.1 iterators_1.0.9
 [7] tools_3.6.0 uuid_0.1-2  jsonlite_1.5   
[10] tibble_1.4.2nlme_3.1-137lattice_0.20-35
[13] pkgconfig_2.0.1 rlang_0.2.0 foreach_1.4.4  
[16] crul_0.5.2  curl_3.2bindrcpp_0.2.2 
[19] httr_1.3.1  stringr_1.3.0   dplyr_0.7.4
[22] xml2_1.2.0  grid_3.6.0  reshape_0.8.7  
[25] glue_1.2.0  data.table_1.10.4-3 R6_2.2.2   
[28] XML_3.98-1.10   purrr_0.2.4 reshape2_1.4.3 
[31] tidyr_0.8.0 magrittr_1.5codetools_0.2-15   
[34] assertthat_0.2.0bold_0.5.0  taxize_0.9.3   
[37] stringi_1.1.7   lazyeval_0.2.1  zoo_1.8-1          


On Thu, 2018-04-12 at 17:40 +0200, Elizabeth Purdom wrote:
> Just to follow up on my previous post. I am able to replicate the
> problem in the problem like in the github post from 2 years ago (http
> s://github.com/epurdom/clusterExperiment/issues/66
> ) only now it
> is not the SummarizedExperiment class but the SingleCellExperiment
> class that has the problem. [And I was incorrect, the problem does
> occur in  development version 2018-03-22 r74446]. 
> 
> So this is actually a problem with the SingleCellExperiment package —
> sorry for the incorrect subject line.
> 
> All of the best,
> Elizabeth
> 
> > 
> > > 
> > > library(SingleCellExperiment)
> > > SingleCellExperiment()
> > class: SingleCellExperiment 
> > dim: 0 0 
> > metadata(0):
> > assays(0):
> > rownames: NULL
> > rowData names(0):
> > colnames: NULL
> > colData names(0):
> > reducedDimNames(0):
> > spikeNames(0):
> > > 
> > > library(RNeXML)
> > Loading required package: ape
> > > 
> > > 
> > > SingleCellExperiment()
> > Found more than one class "Annotated" in cache; using the first,
> > from namespace 'S4Vectors'
> > Also defined by ‘RNeXML’
> > Found more than one class "Annotated" in cache; using the first,
> > from namespace 'S4Vectors'
> > Also defined by ‘RNeXML’
> > class: SingleCellExperiment 
> > dim: 0 0 
> > metadata(0):
> > assays(0):
> > rownames: NULL
> > rowData names(0):
> > colnames: NULL
> > colData names(0):
> > reducedDimNames(0):
> > spikeNames(0):
> 
> 
> 
> > 
> > > 
> > > sessionInfo()
> > R Under development (unstable) (2018-03-22 r74446)
> > Platform: x86_64-apple-darwin15.6.0 (64-bit)
> > Running under: OS X El Capitan 10.11.6
> > 
> > Matrix products: default
> > BLAS:
> > /System/Library/Frameworks/Accelerate.framework/Versions/A/Framewor
> > ks/vecLib.framework/Versions/A/libBLAS.dylib
> > LAPACK:
> > /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapa
> > ck.dylib
> > 
> > locale:
> > [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
> > 
> > attached base packages:
> > [1] parallel  stats4stats graphics  grDevices
> > utils datasets  methods   base 
> > 
> > other attached packages:
> >  [1]
> > RNeXML_2.0.8ape_5.1 SingleCellE
> > xperiment_1.1.2 
> >  [4] SummarizedExperiment_1.9.16
> > DelayedArray_0.5.30 BiocParallel_1.13.3
> >  [7]
> > matrixStats_0.53.1  Biobase_2.39.2  GenomicRang
> > es_1.31.23  
> > [10]
> > GenomeInfoDb_1.15.5 IRanges_2.13.28 S4Vectors_0
> > .17.41  
> > [13] BiocGenerics_0.25.3
> > 
> > loaded via a namespace (and not attached):
> >  [1]
> > Rcpp_0.12.16   pillar_1.2.1   bindr_0.1.1  
> >   compiler_3.5.0
> >  [5]
> > plyr_1.8.4 

Re: [Bioc-devel] problem with class definitions between S4Vectors and RNeXML in using Summarized Experiment

2018-04-12 Thread Elizabeth Purdom
Just to follow up on my previous post. I am able to replicate the problem in 
the problem like in the github post from 2 years ago 
(https://github.com/epurdom/clusterExperiment/issues/66 
) only now it is not 
the SummarizedExperiment class but the SingleCellExperiment class that has the 
problem. [And I was incorrect, the problem does occur in  development version 
2018-03-22 r74446]. 

So this is actually a problem with the SingleCellExperiment package — sorry for 
the incorrect subject line.

All of the best,
Elizabeth

> > library(SingleCellExperiment)
> > SingleCellExperiment()
> class: SingleCellExperiment 
> dim: 0 0 
> metadata(0):
> assays(0):
> rownames: NULL
> rowData names(0):
> colnames: NULL
> colData names(0):
> reducedDimNames(0):
> spikeNames(0):
> > library(RNeXML)
> Loading required package: ape
> > 
> > SingleCellExperiment()
> Found more than one class "Annotated" in cache; using the first, from 
> namespace 'S4Vectors'
> Also defined by ‘RNeXML’
> Found more than one class "Annotated" in cache; using the first, from 
> namespace 'S4Vectors'
> Also defined by ‘RNeXML’
> class: SingleCellExperiment 
> dim: 0 0 
> metadata(0):
> assays(0):
> rownames: NULL
> rowData names(0):
> colnames: NULL
> colData names(0):
> reducedDimNames(0):
> spikeNames(0):




> > sessionInfo()
> R Under development (unstable) (2018-03-22 r74446)
> Platform: x86_64-apple-darwin15.6.0 (64-bit)
> Running under: OS X El Capitan 10.11.6
> 
> Matrix products: default
> BLAS: 
> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
> LAPACK: 
> /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
> 
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
> 
> attached base packages:
> [1] parallel  stats4stats graphics  grDevices utils datasets  
> methods   base 
> 
> other attached packages:
>  [1] RNeXML_2.0.8ape_5.1 
> SingleCellExperiment_1.1.2 
>  [4] SummarizedExperiment_1.9.16 DelayedArray_0.5.30 
> BiocParallel_1.13.3
>  [7] matrixStats_0.53.1  Biobase_2.39.2  
> GenomicRanges_1.31.23  
> [10] GenomeInfoDb_1.15.5 IRanges_2.13.28 
> S4Vectors_0.17.41  
> [13] BiocGenerics_0.25.3
> 
> loaded via a namespace (and not attached):
>  [1] Rcpp_0.12.16   pillar_1.2.1   bindr_0.1.1
> compiler_3.5.0
>  [5] plyr_1.8.4 XVector_0.19.9 iterators_1.0.9
> bitops_1.0-6  
>  [9] tools_3.5.0zlibbioc_1.25.0uuid_0.1-2 
> tibble_1.4.2  
> [13] jsonlite_1.5   nlme_3.1-137   lattice_0.20-35
> pkgconfig_2.0.1   
> [17] rlang_0.2.0Matrix_1.2-14  foreach_1.4.4  
> crul_0.5.2
> [21] curl_3.2   bindrcpp_0.2.2 GenomeInfoDbData_1.1.0 
> dplyr_0.7.4   
> [25] httr_1.3.1 stringr_1.3.0  xml2_1.2.0 
> grid_3.5.0
> [29] glue_1.2.0 reshape_0.8.7  data.table_1.10.4-3
> R6_2.2.2  
> [33] XML_3.98-1.10  purrr_0.2.4tidyr_0.8.0
> reshape2_1.4.3
> [37] magrittr_1.5   codetools_0.2-15   assertthat_0.2.0   
> bold_0.5.0
> [41] taxize_0.9.3   stringi_1.1.7  lazyeval_0.2.1 
> RCurl_1.95-4.10   
> [45] zoo_1.8-1 


> On Apr 11, 2018, at 10:25 AM, Elizabeth Purdom  
> wrote:
> 
> Hello,
> 
> Our package clusterExperiment has suddenly started producing errors in the 
> bioconductor devel branch because our unit tests are failing, even though we 
> haven’t pushed any changes and they passed previously. We first noticed this 
> on April 5th. 
> 
> I believe the source of these errors likely do to calls to 
> SummarizedExperiment() creating the following messages due to conflicts in 
> ‘RNeXML’ and ’S4Vectors’ both defining class ‘Annotated':
> 
>> Found more than one class "Annotated" in cache; using the first, from 
>> namespace 'S4Vectors'
>> Also defined by ‘RNeXML’
> This is killing a vast number of our tests where we repeatedly use 
> ‘expect_silent’ calls in our unit tests and SummarizedExperiment calls 
> underlie everything.
> 
> We had this message issue two years ago 
> (https://github.com/epurdom/clusterExperiment/issues/66 
> ), when it appeared 
> to be a problem with two definitions of the ‘Annotated’ class in two packages 
> that are both dependencies of packages we call. At that time, Michael 
> Lawrence posted that he would fix the problem, and it was then fixed in later 
> versions of bioconductor/R. But it appears to be back.  I am unfortunately 
> unable to get the RNeXML package to compile from 

[Bioc-devel] problem with class definitions between S4Vectors and RNeXML in using Summarized Experiment

2018-04-11 Thread Elizabeth Purdom
Hello,

Our package clusterExperiment has suddenly started producing errors in the 
bioconductor devel branch because our unit tests are failing, even though we 
haven’t pushed any changes and they passed previously. We first noticed this on 
April 5th. 

I believe the source of these errors likely do to calls to 
SummarizedExperiment() creating the following messages due to conflicts in 
‘RNeXML’ and ’S4Vectors’ both defining class ‘Annotated':

> Found more than one class "Annotated" in cache; using the first, from 
> namespace 'S4Vectors'
> Also defined by ‘RNeXML’
This is killing a vast number of our tests where we repeatedly use 
‘expect_silent’ calls in our unit tests and SummarizedExperiment calls underlie 
everything.

We had this message issue two years ago 
(https://github.com/epurdom/clusterExperiment/issues/66), when it appeared to 
be a problem with two definitions of the ‘Annotated’ class in two packages that 
are both dependencies of packages we call. At that time, Michael Lawrence 
posted that he would fix the problem, and it was then fixed in later versions 
of bioconductor/R. But it appears to be back.  I am unfortunately unable to get 
the RNeXML package to compile from source on my computer with the current Mac 
OS X development binary which I just downloaded (2018-04-05 r74542), so I 
haven’t been able to completely redo the code that we presented in that earlier 
github issue to confirm it is the exact same problem. I am having to rely on 
the error reports/logs from both Bioconductor and TravisCI (e.g. 2018-04-07 
r74551), where this message shows up everywhere and didn’t before. Thus I’m 
guessing that since they are the same messages from before that the source is 
again the call to SummarizedExperiment. 

I would note that in development version 2018-03-22 r74446, where I was able to 
install all of the packages, I was not getting these messages. 

Thanks,
Elizabeth Purdom
[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel