-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
There was a problem hiding this 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.
example/dissim-plot/plot_kde.py
Outdated
plt.ylabel('Density', size = font_size) | ||
plt.xlabel(xlabel, size = font_size) | ||
plt.legend(loc='best', fontsize = font_size) | ||
plt.savefig(output) |
There was a problem hiding this comment.
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()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
example/dissim-plot/plot_kde.py
Outdated
|
||
def plot_and_save(scores_and_labels, xlabel, output, | ||
xmin=0.0, | ||
xmax=0.6, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
example/dissim-plot/plot_kde.py
Outdated
plot_and_save(plots, 'Dissimilarity scores', args.output) | ||
|
||
|
||
# Load |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleaned this up!
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 thedata
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
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.)