Patch: bugs in sleuth_results & other miscellaneous fixes #163
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @pimentel,
sleuth_results
bugs:I discovered two bugs in
sleuth_results
:show_all = F
still results in all target_ids being returned.pvalue_aggregate = T
results in the extra annotation data being missing.I made the following changes to the function to hopefully correct this behavior.
spread_abundance_by
speed-upI also earlier had made a faster version of
spread_abundance_by
, and realized that it make it in the propagation forward of merged changes. That version is found below, and I have confirmed that it produces identical results in at least three separate datasets with differenttarget_ids
. Yet, it has a 3-fold increase in speed. It's a small gain overall, but it greatly affects thesleuth_live
experience since plotting functions heavily usespread_abundance_by
, and it affects to a small extent sleuth-ALR overall speed.NAMESPACE issue with
transform_status
When running
devtools::document()
, the NAMESPACE updatedtransform_status
from a regular method to an S3method.sample_to_covariates
data.table
error, addressing issue #153When a
sample_to_covariates
table is provided tosleuth_prep
as adata.table
object, it passes thedata frame
check in place, but causes downstream problems. I put in a line to coerce any table that passes the check to adata frame
.Best,
Warren