[Bioc-devel] Building a package that depends on flowCore

Nishant Gopalakrishnan ngopalak at fhcrc.org
Thu Mar 31 23:14:54 CEST 2011


Hi Davide,

Its hard to guess exactly what the problem is considering that you have 
not even provided the error message.  It would have been easier for 
others to help you out if you provided a  snippet of code using which 
people can reproduce the error you get.

Before you put your class into a package, I would recommend sourcing 
your code for the class into an R session with the flowCore package 
loaded and making sure things work without errors.

representation=representation(
       flowframe = "flowFrame",
       [...]
)

 From your example above, it appears that you are  trying to create a 
new class with a flowFrame as one of its slots. After going through the 
code for the flowCore package,  I have noticed a bug in the initialize 
method for flowFrame class which would have prevented you from creating 
a flowFrame object using just new("flowFrame"). My guess is that you 
would have done the same for the prototype function for your class. You 
had to pass in a valid value for the exprs and parameters and 
description slots to instantiate an object.

I have checked in a fix for this in Version flowCore 1.17.5 and now you 
should be able to do new("flowFrame") to instantiate an object for 
filling the slot flowFrame in the prototype for your new class.

Nishant

On 03/30/2011 09:19 AM, Finak, Greg wrote:
> Hi, Davide
> I'm not as familiar with the R package build system as others on the list, so it's difficult for me to diagnose your problem from the information given, but I can offer a few suggestions. In the Namespace file, try explicitly importing just the classes, methods and functions from flowCore that your package actually uses. I think you woukd want flowCore in the Depends field of your Description file. Finally, have a look at other packages that extend flowCore, like the flowMerge package for example, and see how they handle it. In my experience, masked methods don't usually lead to installation failure. Perhaps you could provide more output from R CMD check, and the content of your Namespace and Description files.
> Cheers
> Greg
>
> Sent from my iPhone
>
> On 2011-03-30, at 2:10 AM, "Davide Rambaldi"<davide.rambaldi at ifom-ieo-campus.it>  wrote:
>
>> Hi all, I am trying to pack my code in a package for submission to bioconductor.
>>
>> The package depends on flowCore, so for example I have an S4 class with a "slot" that is a flowFrame object.
>>
>> representation=representation(
>>        flowframe = "flowFrame",
>>        [...]
>> )
>>
>> Now I am trying to build the package:
>>
>> without depends in DESCRIPTION or NAMESPACE:
>>
>> If I omit the dependecy from flowCore in the DESCRIPTION file I get this warning during R CMD check:
>>
>> Warning: undefined slot classes in definition of "GenData": flowframe(class "flowFrame")
>>
>>
>> Then I tried to define the dependency from flowCore:
>>
>> If I put the
>>
>> Depends: flowCore
>>
>> in DESCRIPTION
>>
>> I get:
>>
>> checking whether package ‘flowFit’ can be installed ... ERROR
>> Installation failed.
>>
>> The log file say:
>>
>> Attaching package: 'flowCore'
>>
>> The following object(s) are masked from 'package:stats':
>>
>>    alias, filter
>>
>> Execution halted
>>
>>
>> I tried to add in NAMESPACE:
>>
>> import(flowCore)
>>
>> I tried also to move flowCore from Depends to Imports in DESCRIPTION but seems that it always halt at that point.
>>
>> What I should try now?
>>
>> Thanks and Best Regards
>>
>>
>>
>>
>> Davide Rambaldi, Bioinformatics PostDoc.
>> -----------------------------------------------------
>> IFOM-IEO Campus
>> Via Adamello 16, Milano
>> I-20139 Italy
>> [t] +39 02574303870
>> [e] davide.rambaldi at ifom-ieo-campus.it
>>
>>
>>    [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> Bioc-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
aa



More information about the Bioc-devel mailing list