adw96 / breakaway

Species richness with high diversity
68 stars 18 forks source link

breakaway::breakaway for deep-sequencing results having an evenly distributed frequency table #165

Closed minsiksudo closed 2 years ago

minsiksudo commented 2 years ago

Hi,

I am trying to employ breakaway::breakaway to my metagenomic sequenced data with deep sequencing depth.

Summary(phyloseq::sample_sums(water_order))

Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
18542  1678736  3186608  4292494  5373412 44187832 

Even though I have conducted deep sequencing with a medium of 3 M reads, there are still some correlations between sequencing depth and observed species.

Screen Shot 2022-09-16 at 3 35 56 PM

However, the breakaway::breakaway does not work well with our current dataset. I assume it is due to our nature of data; as I have conducted sequencing deeply, the frequency table is too well distributed.

 > head(freq_table)
 X354        Var1        X354.Freq
 1        20         1
 2        28         1
 3        31         1
 4        48         1
 5        49         1
 6        51         1

> tail(freq_table)
X354     Var1     X354.Freq
307     46580         1
308     48991         1
309     53463         1
310     67302         1
311    194621         1
312    587468         1

>plot(data$X354.Freq ~ data$X354.Var1, xlab = "Read counts", ylab = "frequency")

frequency

In these cases, what modifications should I give to run breakaway::breakaway successfully?

Thanks in advance!

adw96 commented 2 years ago

Hi @minsiksudo -- thanks for your patience and apologies on the delay. Unfortunately I don't have great options to suggest -- with your envy-inspiring deep sequencing, you are probably ok to just perform regression modeling on the sample richness (I expect you don't have unobserved diversity given the frequency count tables you have). You can use either lm or betta for this, and you could feed it breakaway::observed_richness as your response variable. I hope that helps -- thanks for asking, hope you're well!