Error merging samples with unite()

255 views
Skip to first unread message

EMILY KERNS

unread,
Aug 30, 2023, 1:46:04 PM8/30/23
to methylkit_discussion
Hello!

I am trying to merge my RRBS samples using the unite() function. It worked previously for me, and I haven't changed the argument at all. I did add a normalization step prior to merging my samples, and that's when I started getting this error. Last Friday I updated R and reinstalled all of my packages, and it worked for me again. However, I went to go try to run my code again today and it's not working. Does anyone know what might be causing this error?

myobj=methRead(file.list,
               sample.id=list("SampleIDs"),
               assembly="ReferenceGenome",
               treatment=c(treatments),
               context="CpG",
               mincov = 10
)

filtered.myobj=filterByCoverage(myobj,lo.count=10,lo.perc=NULL,
                                hi.count=NULL,hi.perc=99.9)

normalized.myobj=normalizeCoverage(filtered.myobj, method="median")

meth=unite(normalized.myobj, destrand=TRUE)

Error in `unite()`: ! Arguments in `...` must be passed by position, not name. Problematic argument: destrand = TRUE Run `rlang::last_trace()` to see where the error occurred. > rlang::last_trace() <error/rlib_error_dots_named> Error in `unite()`: ! Arguments in `...` must be passed by position, not name. Problematic argument: destrand = TRUE --- Backtrace: 1. └─tidyr::unite(normalized.myobj, destrand = TRUE) Run rlang::last_trace(drop = FALSE) to see 4 hidden frames. > rlang::last_trace(drop = FALSE) <error/rlib_error_dots_named> Error in `unite()`: ! Arguments in `...` must be passed by position, not name. Problematic argument: destrand = TRUE --- Backtrace: 1. └─tidyr::unite(normalized.myobj, destrand = TRUE) 2. └─rlang::check_dots_unnamed() 3. └─rlang:::action_dots(...) 4. ├─base (local) try_dots(...) 5. └─rlang (local) action(...)

Thanks!
Emily

Alexander Blume

unread,
Aug 31, 2023, 11:52:38 AM8/31/23
to methylkit_...@googlegroups.com
Hi Emily,

This sounds very much like the methylkit+tidyverse issue (https://github.com/al2na/methylKit/issues/132), which I thought was resolved since version 1.9.1 of methylKit. 
You should be able to fix the problem by explicitly using  methylKit::unite in your code.

Best,
Alex

--
You received this message because you are subscribed to the Google Groups "methylkit_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to methylkit_discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/methylkit_discussion/2f579429-1629-4a54-953c-2f6487bd0a22n%40googlegroups.com.

EMILY KERNS

unread,
Sep 1, 2023, 12:26:58 PM9/1/23
to methylkit_discussion
Hi Alex,

It worked! Thank you!

Cheers,
Emily

Reply all
Reply to author
Forward
0 new messages