bramstone / qsip

R package to perform calculations on data produced from quantitative stable isotope probing (qSIP) experiments
6 stars 3 forks source link

Please provide a sample data #4

Open roey-angel opened 1 year ago

roey-angel commented 1 year ago

Hi, I'm trying to analyse a pretty standard 13C-labelled dataset. The conversion to a phylosip object worked (as far as I can tell), but afterwards, every function I tried gave an error (and not a very helpful one, I'm afraid).

ps_qsip <- specify_qsip(ps,
                        density = "Density..g.ml.1.",
                        abund = "X16S_copies",
                        rep_id = "Replicate",
                        rep_group = "Day",
                        iso = "13C",
                        iso_trt =  "Label..13C.")
class(ps_qsip)
# [1] "phylosip"
# attr(,"package")
# [1] "qsip"

plot_curve(ps_qsip)
# Error in .valueClassTest(ans, c("data.frame", "phyloseq", "phylosip"),  : 
#   c("invalid value from generic function ‘plot_curve’, class “gg”, expected “data.frame” or “phyloseq” or “phylosip”", "invalid value from generic function ‘plot_curve’, class “ggplot”, expected “data.frame” or “phyloseq” or “phylosip”")

calc_excess(ps_qsip,
            separate_label=T,
            filter=T,
            correction=T)
# Error in if (class(new_data) == "list") { : the condition has length > 1

qsmelt(ps_qsip)
# Error in qsmelt(ps_qsip) : No values to combine

It would be easier to debug if you could provide a sample phyloseq object.

Thanks in advance

bramstone commented 1 year ago

Hi @roey-angel – I apologize for the length of time it took me to respond to this issue. I imagine that after four months, you may have identified an alternative pathway.

The code for this repository is not very flexible to different experimental designs and so many functions fail if you provide treatment groupings that I did not account for. I'm working to find the time to revamp the code-base for this package entirely to be more versatile.

In the meantime, please see this qSIP tutorial which utilizes functionality from the data.table package and which is more flexible to different data organization: https://github.com/bramstone/qSIP_tutorial/blob/main/qsip_tutorial.md