Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intermittent error in differentialAbundance? #28

Open
d-callan opened this issue Apr 26, 2024 · 2 comments
Open

intermittent error in differentialAbundance? #28

d-callan opened this issue Apr 26, 2024 · 2 comments

Comments

@d-callan
Copy link
Contributor

the following code:

myCollection <- getCollection(DiabImmune, '16S (V4) Species')

differentialAbundanceResults <- differentialAbundance(
  myCollection, 
  "breastfed_duration_days",
  groupA = function(x) {x < 300},
  groupB = function(x) {x >= 300},
  method = 'Maaslin2')  

sometimes produces this error:

Error in data.table::setnafill(df, fill = 0, cols = cols) :
  argument specifying columns received duplicate column(s)

and sometimes appears to not.. hard to diagnose until we manage to consistently repro.

@d-callan
Copy link
Contributor Author

its unlikely an issue w differentialAbundance directly.. its confirmed (see #27 ) that the above collection does in fact have duplicate labels for some taxa, but should not have duplicate variables .. getCollection is meant to distinguish these cases, but perhaps is sometimes failing to?

perhaps a first step could be adding more detailed logging to the failing function, so that at least if we do see this again, well have a bit more information next time.

@d-callan
Copy link
Contributor Author

i did manage to get my hands on a collection (using diabimmune genus again) w the following behavior, at one point:

> dupsIndex <- duplicated(getCollectionVariableNames(myCollection))
> getCollectionVariableNames(myCollection)[dupsIndex]
[1] "Coprobacter secundus"        "Eggerthella lenta"          
[3] "Flavonifractor plautii"      "unclassified Incertae Sedis"
[5] "unclassified Incertae Sedis" "unclassified Incertae Sedis"

but then requesting the collection again via getCollection only minutes later seemed to work properly..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant