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 directory and code to examples\ to reproduce Figure 2 with S.c and S.p #14

Merged
merged 7 commits into from
Apr 2, 2018

Conversation

theJasonFan
Copy link
Member

@theJasonFan theJasonFan commented Mar 26, 2018

Homologs are more similar in HANDL space than non-homologs

In this example, we show that HANDL scores are correlated with functional similarity by reproducing Figure 2a and Figure 2b (as well as Figure S1 and S2 in the S.I).

Usage

To produce Figure 2 from [REF] simply execute snakemake all --configfile configs/<configfile>

Provided configuration files:

We provide example configuration files for the following:

  • configs/sc-sp.yml is a configuration file to produce plots of HANDL dissimilarity scores between S.c and S.p proteins projected into HANDL space with S.c as the source and S.p as the target, respectively. PPI networks from which HANDL scores and embeddings are computed can be found in the data directory in the root folder and are obtained from BioGrid v3.4.157.
  • configs/human-sc.yml, configs/human-mouse.yml, configs/mouse-sc.yml, are a configuration files to produce plots of HANDL dissimilarity scores between homolog pairs and other pairs and plots of HANDL vs Resnik scores.

Data

  • Run snakemake in /data in the root directory to download PPI networks and Resnik scores required to produce plots. (Note that Resnik scores are precomputed and downloaded directly from the UMIACS Object Store.)

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.

A few small changes, but I did run the example successfully.

plt.ylabel('Density', size = font_size)
plt.xlabel(xlabel, size = font_size)
plt.legend(loc='best', fontsize = font_size)
plt.savefig(output)
Copy link
Member

Choose a reason for hiding this comment

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

Might add plt.tight_layout()

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.


def plot_and_save(scores_and_labels, xlabel, output,
xmin=0.0,
xmax=0.6,
Copy link
Member

Choose a reason for hiding this comment

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

Should the xmax provided in the config file? Or is this usually the same across species pairs?

Copy link
Member Author

Choose a reason for hiding this comment

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

xmax can be provided in the config file, 0.6 is just a value I picked as the default

Copy link
Member Author

Choose a reason for hiding this comment

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

xmax can be provided via the configuration file. There is no obvious way to figure out what xmax should be a priori, so I just picked a default.

plot_and_save(plots, 'Dissimilarity scores', args.output)


# Load
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 what this is...

Copy link
Member Author

Choose a reason for hiding this comment

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

Cleaned this up!

@theJasonFan theJasonFan merged commit 84d4702 into master Apr 2, 2018
@theJasonFan theJasonFan deleted the fig2 branch April 2, 2018 19:56
@theJasonFan theJasonFan mentioned this pull request Apr 10, 2018
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