Thanks Martin,
I have dropped the @ call. Best wishes. *Stefano * Stefano Mangiola | Postdoctoral fellow Papenfuss Laboratory The Walter Eliza Hall Institute of Medical Research +61 (0)466452544 *From: *Martin Morgan <mtmorgan.b...@gmail.com> *Sent: *Wednesday, 10 March 2021 11:36 AM *To: *stefano <mangiolastef...@gmail.com>; bioc-devel <bioc-devel@r-project.org> *Subject: *Re: [Bioc-devel] False positive BiocCheck? Packages providing 5 object(s) used in this package should be imported in the NAMESPACE It looks like you're assigning to assays, `assays(x) <- ...`, so you need to import `assays<-`, and not just `assays`. But this assays(new_obj)@listData <- looks VERY BAD. The internal structure of the assays slot (accessed with @) should NEVER be accessed directly; use the public 'API' only. Martin On 3/9/21, 6:15 PM, "Bioc-devel on behalf of stefano" < bioc-devel-boun...@r-project.org on behalf of mangiolastef...@gmail.com> wrote: Hello, I have a trouble for tidySummarizedExperiment package BiocCheck() This is BiocCheck version 1.26.0. BiocCheck is a work in progress. Output and severity of issues may change. Installing package...* Checking Package Dependencies...* Checking if other packages can import this one... * ERROR: Packages providing 5 object(s) used in this package should be imported in the NAMESPACE file, otherwise packages importing this package may fail. package::object in function() SummarizedExperiment::assays<- in bind_rows.SummarizedExperiment() However NAMESPACE includes importFrom(SummarizedExperiment,assays) And my method is specified as #' @importFrom rlang dots_values #' @importFrom rlang flatten_if #' @importFrom rlang is_spliced #' @importFrom SummarizedExperiment cbind #' @importFrom SummarizedExperiment assays #' #' @export #' bind_rows.SummarizedExperiment <- function(..., .id=NULL, add.cell.ids=NULL) { tts <- flatten_if(dots_values(...), is_spliced) new_obj <- cbind(tts[[1]], tts[[2]]) # If duplicated cell names if (new_obj %>% colnames() %>% duplicated() %>% which() %>% length() %>% gt(0)) { warning("tidySummarizedExperiment says: you have duplicated sample names, they will be made unique.") } unique_colnames <- make.unique(colnames(new_obj), sep="_") colnames(new_obj) <- unique_colnames # Change also all assays colnames assays(new_obj)@listData <- assays(new_obj)@listData %>% map(~ { colnames(.x) <- unique_colnames .x }) new_obj } Is there something I am missing? Best wishes. *Stefano * Stefano Mangiola | Postdoctoral fellow Papenfuss Laboratory The Walter Eliza Hall Institute of Medical Research +61 (0)466452544 [[alternative HTML version deleted]] _______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel [[alternative HTML version deleted]] _______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel