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

Possible solution to NAs in sleuth_lrt, addressing #68 #118

Merged
merged 4 commits into from
Nov 10, 2017

Conversation

warrenmcg
Copy link
Collaborator

Hi @pimentel,

Great work with the new release and all of the patches! Last suggestion from me before I turn it in for the weekend (I won't be available this weekend or all next week). As I commented in #68, I think the issue with NAs has to do with some target ids having mean observed counts outside of the bounds used to create the LOESS fit. The standard fit can't be extrapolated, which is what results in the NAs.

This is code that would attempt to pursue option 4, which is to produce an extrapolated value using the LOESS fit with surface = "direct" option. According to the documentation and my testing, the values can be extrapolated to the target ids that otherwise would have NAs. However, because the exact computation for the surface fit is much more expensive, I only recompute the fits for the target ids that are NA.

I also included a message that would let the user know when this occurs, and a column is included with the sleuth_object$fits[[fit_name]]$summary data.frame that indicates which target_ids failed the initial shrinkage estimation (abbreviated failed_ise), in case they want to follow-up or exclude those target_ids.

Let me know what you think!

@pimentel
Copy link
Collaborator

pimentel commented Jun 5, 2017

This looks great, @warrenmcg thanks!

I'm going to test this out on a bunch of different data sets over the next week and merge it then.

Best,

Harold

@pimentel pimentel merged commit ebeffe2 into pachterlab:devel Nov 10, 2017
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

Successfully merging this pull request may close these issues.

None yet

2 participants