Chaining target factories: target not found #1162
Replies: 1 comment 2 replies
-
Looks like one issue is how tar_decontaminate_phyloseq(rrna_16s_phyloseq, "Control")
#> Error: object 'rrna_16s_phyloseq' not found If you want to pass the name as a symbol, tar_decontaminate_phyloseq <- function(phyloseq, neg = NULL, batch = NULL) {
target_name <- deparse(substitute(phyloseq))
...
} Once you fix this, I recommend checking Unfortunately I cannot test the pipeline because I do not have the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Help
Description
Trying to build a set of target factories to abstract away some repetitive tasks I'll need to run a lot. I am quite new to the concept of metaprogramming, so there's probably something obvious I've missed.
There are two factories: the first (tar_read_ampliseq) reads in the data and creates an output (phyloseq) object, and the second (tar_decontaminate_phyloseq) does some processing of this object downstream. However, the second factory gives me an error saying the object is not found. Running the first target factory on its own works, and the target is listed in
tar_manifest()
. I can also access the target subsequently with a call totar_target()
- just not my second factory:Target factories:
_targets.R file:
If anyone has any insight, it would be much appreciated - I can't see for the life of me what I've missed!
Beta Was this translation helpful? Give feedback.
All reactions