abichat / scimo

Provides extra recipes steps for dealing with omics data
https://abichat.github.io/scimo/
GNU General Public License v3.0
3 stars 1 forks source link

`step_taxonomy()` #3

Closed abichat closed 6 months ago

abichat commented 6 months ago

New function step_taxonomy().

> cheese_taxonomy %>%
+   select(asv, lineage) %>%
+   recipe(~ .) %>%
+   step_taxonomy(lineage, rank = c("order", "genus")) %>%
+   prep() %>% 
+   bake(new_data = NULL)
# A tibble: 74 × 3
   asv    lineage_order     lineage_genus
   <fct>  <chr>             <chr>        
 1 asv_01 Dothideales       Aureobasidium
 2 asv_02 Eurotiales        Aspergillus  
 3 asv_03 Eurotiales        Penicillium  
 4 asv_04 Eurotiales        Penicillium  
 5 asv_05 Eurotiales        Penicillium  
 6 asv_06 Eurotiales        Penicillium  
 7 asv_07 Eurotiales        Penicillium  
 8 asv_08 Eurotiales        Penicillium  
 9 asv_09 Eurotiales        Penicillium  
10 asv_10 Saccharomycetales Debaryomyces 
# ℹ 64 more rows
# ℹ Use `print(n = ...)` to see more rows

Before submitting your PR to this repo, please make sure that:

Thank you!