Entering edit mode
Marco Blanchette
▴
220
@marco-blanchette-5439
Last seen 10.1 years ago
United States/Kansas City/Stowers Insti…
Dear all,
First, sorry for the double posting on the r-help and bioC, my mistake
Never meant to send it to the r-help list as it is a bioC question.
So here it is
I am writing a package with some of my favorite custom functions so
that I can share them with others. I do not have a lot of experience
building these packages and I apologize if this is a trivial question.
The issue I am having is with the generic function unlist used to
unlist GRangesList object (unlist(GRL) from the IRanges package)
I have a function A in myPkg calling function B (myPkg::A{myPkg::B;
}), which is in the same package and call the unlist function of a
GRangesList object (myPkg::B{ unlist(GRL);
}). For some reason, if I have the two function on the top level
namespace, everything works, but when loaded from a package
(library(myPkg); A(GRL)) it breaks at the unlist() step. However, if I
fully qualify the unlist function in myPkgB
(myPkg::B{IRanges::unlist(GRL);
} ), then calling A(GRL) after loading the myPkg library works.
So, are we expected to always fully qualify the unlist() function?
(i.e. Calling it with it's package name myPkg::B{ IRanges::unlist(GRL)
} ). I have been trying all strategy of Depends: and Imports: in my
DESCRIPTION file and nothing works unless I fully qualify this
function.
What is the best practice? I tried using only Imports: as suggested by
Chambers but it breaks. Using Depends does not help.
Am I having clashing namespace? Here is my Depends: (or Imports:)
line: Depends: Rsamtools, GenomicFeatures, parallel, rtracklayer,
edgeR
Am I simply missing something?
Thanks
-- Marco Blanchette, Ph.D.
Stowers Institute for Medical Research
1000 East 50th Street
Kansas City MO 64110
www.stowers.org
[[alternative HTML version deleted]]