added function to easily plot signatures from exposures signatures an… - #3
Open
wir963 wants to merge 1 commit into
Open
added function to easily plot signatures from exposures signatures an…#3wir963 wants to merge 1 commit into
wir963 wants to merge 1 commit into
Conversation
mdml
requested changes
Dec 19, 2018
mdml
left a comment
Member
There was a problem hiding this comment.
Code looks fine but we should clean up before merging:
- Describe contributions and testing in pull request. Also include an example output plot.
- The build is broken. What's going on there? Would be great to have one of these plots automatically produced by Travis as well
| # counts_df is samples-by-categories | ||
| # exposures_df samples-by-signatures | ||
| # signatures_df is signatures-by-categories | ||
| def plot_signatures(counts_df, signature_df, exposure_df, output_file): |
Member
There was a problem hiding this comment.
Add palette and ylabel as optional arguments
Member
There was a problem hiding this comment.
More specifically, try to make the function call match the sbs_signature_plot (since you are eventually calling tht)
| # and calculate the number of mutations attribution to signature i in sample j | ||
| contrib += exposure_df.loc[sample, sig]*counts_df.loc[sample].sum() # calculate the contribution | ||
| output.append(signature_df.loc[sig]*contrib) | ||
| #contribs[sig].append(phi[i]*contrib) |
Member
There was a problem hiding this comment.
Not sure we need to keep commented out code around
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
…d counts