-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Ran the sphinx quickstart, ignored mypy on docs * First version of docs * Added installation instructions for python * Finished installation page and added quickstart info (not done yet) * Finished v1 of the quickstart guide * Removed heterogeneous setup page and added todo for creating example * Added manpages for the datasets and algorithms * Added helpers and visualize documentation * Added placeholders for the Protein properties * Added methods of Protein to the documentation * Small changes * Reworked the README * Added whitespace for enter * Added github star and filler-logo * Starting on logo * Added logo * Removed github fork banner * Logo test * Changed logo loading * New test * Trying image tag * Trying image tag 2.0 * Trying image tag 2.0 * Trying relative link * New size * New logo test * New logo try * New logo * Reworked logo * Downgraded matplotlib to alllow CI pipeline * Added edittable logo, fixed small rst things, fixed compression of cores * Added some figures, added reference to license, added license
- Loading branch information
1 parent
4e14d09
commit ece8b0f
Showing
23 changed files
with
1,037 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Binary file not shown.
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
import seaborn as sns | ||
import pandas as pd | ||
from prospr import Protein | ||
from prospr.helpers import get_ordered_positions, get_scoring_pairs | ||
from matplotlib import pyplot as plt | ||
from matplotlib.path import Path | ||
import matplotlib.patches as patches | ||
|
||
|
||
if __name__ == "__main__": | ||
protein = Protein("HPPHP") | ||
protein.set_hash([1, -2, -1, -2]) | ||
|
||
fig = plt.figure(figsize=(8, 5)) | ||
sns.set_style("whitegrid") | ||
ax = fig.gca() | ||
|
||
df = pd.DataFrame( | ||
get_ordered_positions(protein), columns=["x", "y", "Type"] | ||
) | ||
df = df.astype({"x": "int32", "y": "int32"}) | ||
|
||
# Plot straight lines and add last amino acid. | ||
line_width = 8 | ||
alpha_val = 0.85 | ||
ax.plot( | ||
df["x"], | ||
df["y"], | ||
color="black", | ||
alpha=alpha_val, | ||
zorder=1, | ||
lw=line_width, | ||
) | ||
last_amino = {"x": 3.5, "y": -0.75, "Type": "H"} | ||
df = df.append(last_amino, ignore_index=True) | ||
|
||
# Plot curvy line. | ||
verts = [ | ||
(df.iloc[-2]["x"], df.iloc[-2]["y"]), | ||
(1.375, -0.5), | ||
(last_amino["x"], last_amino["y"]), | ||
] | ||
codes = [ | ||
Path.MOVETO, | ||
Path.CURVE3, | ||
Path.CURVE3, | ||
] | ||
path = Path(verts, codes) | ||
patch = patches.PathPatch( | ||
path, | ||
facecolor="none", | ||
edgecolor="black", | ||
lw=line_width, | ||
alpha=alpha_val, | ||
zorder=1, | ||
) | ||
ax.add_patch(patch) | ||
|
||
# Add amino acids. | ||
sns.scatterplot( | ||
x="x", | ||
y="y", | ||
data=df, | ||
hue="Type", | ||
hue_order=["H", "P"], | ||
style="Type", | ||
markers={"H": "o", "P": "s"}, | ||
palette={"H": "royalblue", "P": "orange"}, | ||
s=280, | ||
linewidth=0, | ||
zorder=2, | ||
ax=ax, | ||
) | ||
|
||
# Plot dotted lines between the aminos that increase the stability. | ||
pairs = get_scoring_pairs(protein) | ||
|
||
for pos1, pos2 in pairs: | ||
ax.plot( | ||
[pos1[0], pos2[0]], | ||
[pos1[1], pos2[1]], | ||
linestyle="dashed", | ||
color="indianred", | ||
alpha=1, | ||
zorder=1, | ||
lw=line_width, | ||
) | ||
|
||
# Plot text. | ||
ax.text(0.73, -1.88, "rospr", fontsize=121, fontstyle="italic") | ||
|
||
# Remove axis and legend. | ||
ax.get_xaxis().set_visible(False) | ||
ax.get_yaxis().set_visible(False) | ||
ax.get_legend().remove() | ||
|
||
fig.savefig( | ||
"source/_static/gen_logo.png", bbox_inches="tight", pad_inches=0 | ||
) | ||
plt.show() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=source | ||
set BUILDDIR=build | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.http://sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.