FredHutch / seatrac-hackday-2024

Contains info and code examples for the SEATRAC TB Hackday 2024
GNU General Public License v3.0
0 stars 0 forks source link

select calls fail in iv_bcg_immune_correlates.qmd #2

Closed ethanbustad closed 16 hours ago

ethanbustad commented 6 days ago

Whenever a ... %>% select(...) %>% ... function gets called in iv_bcg_immune_correlates.qmd, I get an error, e.g.,

Error in select(., animalid, protect_outcome) : 
  unused arguments (animalid, protect_outcome)

or

Error in select(., key, short_key, tissue, unit, tp) : 
  unused arguments (key, short_key, tissue, unit, tp)

Maybe we're missing an import, and the wrong select function is being called? I do see dplyr::select being explicitly used in that notebook.

This seems to only happen in this particular notebook -- it works fine in granuloma_tcell_dge.qmd and iv_bcg_dge.qmd.

agartland commented 21 hours ago

thanks @ethanbustad i will check on this and figure out the problem. were you able to get the kimma fitting to work? can you help debug that? e.g., here in iv_bcg_dge.qmd at line 174

ethanbustad commented 21 hours ago

No I haven't done any troubleshooting on kimma so far; I'll give it a go today. No promises I'll figure anything out, though -- R is not my forte :)

ethanbustad commented 18 hours ago

And as for select, yeah dplyr::select conflicting with other imported select functions. filter also potentially conflicts sometimes... Might be worth including the conflicted package and explicitly telling it we prefer dplyr::select, or just specifying dplyr::select whenever we use it (though that seems uglier).

agartland commented 17 hours ago

Thanks, I agree dplyr::select is preferred. For the kimma error I think I need to use voomWithQualityWeights which I should have known to do! Thanks for your help.