Closed RANSHOSHANI closed 2 years ago
Hi @RANSHOSHANI Apologies for the late reply, I do maintenance in my free time as volunteer, and I've been very busy lately.
It seems that the method we were using for the summary is now obsolete with the new dplyr version.
I am unable to test an older version at the moment, so I am not sure what it was returning before. But I think I got what you need.
Can you tell me if this is something you were expecting?
using your ploidy object which has 17 rows, if we do a summary of the counts per species and Gametophyc and sporophytic
library(tidyverse)
ploidy %>% count(resolved_binomial, gametophytic, sporophytic)
# A tibble: 7 x 4
resolved_binomial gametophytic sporophytic n
<chr> <chr> <chr> <int>
1 Allium_thunbergii "" "32" 1
2 Allium_thunbergii "13, 14,15, 16,17, 18" "" 1
3 Allium_thunbergii NA "16" 10
4 Allium_thunbergii NA "16,32+2,3B" 1
5 Allium_thunbergii NA "32" 1
6 Allium_thunbergii NA "32+0-1B" 1
7 Allium_thunbergii_var._deltoides NA "16" 2
Or maybe you only need the counts per species
library(tidyverse)
ploidy %>% count(resolved_binomial)
# A tibble: 2 x 2
resolved_binomial n
<chr> <int>
1 Allium_thunbergii 15
2 Allium_thunbergii_var._deltoides 2
Can you please provide feedback and let me know if this is what you need and what you will prefer as result of the summarize_counts, so I will update the package and you will call the function as before.
Hi thank you for the reply.
I actually already managed to summarize the results myself so its okey.
if you are interested, I was looking for the second option with count for species.
Thank you
thanks @RANSHOSHANI for the feedback. I will implement it. (I'm leaving this issue open for now.) i'm glad you were able to do the summary.
Hi, I'm having the same problem, how can I use the summarize_counts function?
I believe this is now fixed.
hi, i've tried to use the summarize_counts function but got the following error: Input must be a vector, not a
tbl_df/tbl/data.frame/chrom.counts
object.Backtrace:
the code I was trying to run was:
ploidy <- chrom_counts (taxa = 'Allium_thunbergii', rank = 'species') sum <- chromer::summarize_counts (ploidy)
Im using the latest version from Github and using R version 4.0.2.
Thank you for your help