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

Added helper to get single gene normalized rates #580

Merged

Conversation

vals
Copy link
Contributor

@vals vals commented Feb 10, 2020

I made a helper method for Posterior which lets you get expression rates at a normalized library size for a single gene of interest. This way you can e.g. plot the expression of a particular gene without needing to store the 'imputed' matrix for the entire dataset in RAM.

@adamgayoso
Copy link
Member

It seems like this could all be options in the already existing get_sample_scale() method. We should also add an option that averages the value over many samples. What do you think @romain-lopez ?

@romain-lopez
Copy link
Member

Hi Valentine,

Thanks for contributing. Indeed, I think we could refactor this to be a modification of get_sample_scale by adding some options to it!

Best,
Romain

@vals
Copy link
Contributor Author

vals commented Feb 11, 2020

Sure! I'll take a stab at making a refactored version

@adamgayoso adamgayoso self-requested a review February 11, 2020 16:59
Copy link
Member

@adamgayoso adamgayoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @vals. Please let me know what you think.

scvi/inference/posterior.py Outdated Show resolved Hide resolved
scvi/inference/posterior.py Outdated Show resolved Hide resolved
@vals
Copy link
Contributor Author

vals commented Mar 5, 2020

It seems the tool black is failing on the CI. I'm not familiar with it, do you have any guidance on how I can address it?

@adamgayoso
Copy link
Member

@vals sorry I missed this. I'll give a review now, but perhaps upgrading your black will help fix this.

scvi/inference/posterior.py Show resolved Hide resolved
scvi/inference/posterior.py Outdated Show resolved Hide resolved
@adamgayoso
Copy link
Member

@vals, we'd like to get 0.6.2 out soon. If you're able to address these items soon we could include this. No rush, but just wanted to keep you in the loop.

@vals vals requested a review from adamgayoso April 7, 2020 19:52
@adamgayoso adamgayoso changed the base branch from master to sample_scale_feats April 7, 2020 21:36
Copy link
Member

@adamgayoso adamgayoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, not sure what's happening with CI. Might have to merge into a temporary branch and make a new PR. Also I'll add a test for this.

@adamgayoso adamgayoso changed the base branch from sample_scale_feats to master April 7, 2020 21:37
@adamgayoso adamgayoso changed the base branch from master to sample_scale_feats April 7, 2020 21:39
@adamgayoso adamgayoso merged commit ff4b439 into scverse:sample_scale_feats Apr 7, 2020
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

3 participants