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 function to easily plot signatures from exposures signatures an… #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wir963
Copy link

@wir963 wir963 commented Dec 18, 2018

…d counts

@wir963 wir963 requested a review from mdml December 18, 2018 20:58
Copy link
Member

@mdml mdml left a comment

Choose a reason for hiding this comment

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

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):
Copy link
Member

Choose a reason for hiding this comment

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

Add palette and ylabel as optional arguments

Copy link
Member

Choose a reason for hiding this comment

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

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)
Copy link
Member

Choose a reason for hiding this comment

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

Not sure we need to keep commented out code around

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.

2 participants