-
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.
- Loading branch information
1 parent
55012cb
commit 957943b
Showing
147 changed files
with
3,297 additions
and
2,739 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
from aaanalysis.data_loader import load_dataset, load_scales | ||
from aaanalysis.aaclust import AAclust | ||
from aaanalysis.cpp import CPP, SequenceFeature, SplitRange | ||
from aaanalysis.cpp import CPP, CPPPlot, SequenceFeature, SplitRange | ||
from aaanalysis.dpulearn import dPULearn | ||
from aaanalysis.utils_plot import plot_settings, plot_set_legend, plot_gcfs | ||
from aaanalysis.plotting import plot_settings, plot_set_legend, plot_gcfs, plot_get_cmap, plot_get_cdict | ||
|
||
__all__ = ["load_dataset", "load_scales", | ||
"AAclust", | ||
"CPP", "SequenceFeature", "SplitRange", "dPULearn", | ||
"plot_settings", "plot_set_legend", "plot_gcfs"] | ||
"CPP", "CPPPlot", "SequenceFeature", "SplitRange", | ||
"dPULearn", | ||
"plot_settings", "plot_set_legend", "plot_gcfs", "plot_get_cmap", "plot_get_cdict"] |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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,71 @@ | ||
""" | ||
This is a script for constants (e.g., names or column names) | ||
""" | ||
|
||
|
||
# Default datasets for protein analysis | ||
STR_SCALES = "scales" # Min-max normalized scales (from AAontology) | ||
STR_SCALES_RAW = "scales_raw" # Raw scales (from AAontology) | ||
STR_SCALES_PC = "scales_pc" # AAclust pc-based scales (pc: principal component) | ||
STR_SCALE_CAT = "scale_classification" # AAontology | ||
STR_TOP60 = "top60" # AAclustTop60 | ||
STR_TOP60_EVAL = "top60_eval" # AAclustTop60 evaluation | ||
|
||
# Column name datasets (DOM_GSEC) | ||
COL_ENTRY = "entry" # ACC, protein entry, uniprot id | ||
COL_NAME = "name" # Entry name, Protein name, Uniprot Name | ||
COL_LABEL = "label" | ||
COL_SEQ = "sequence" | ||
COLS_PARTS = ["jmd_n", "tmd", "jmd_c"] | ||
COL_TMD_START = "tmd_start" | ||
COL_TMD_STOP = "tmd_stop" | ||
COLS_SEQ_INFO = [COL_SEQ, COL_TMD_START, COL_TMD_STOP] # TODO | ||
|
||
# Column names scales (scale_classification) | ||
COL_SCALE_ID = "scale_id" | ||
COL_CAT = "category" | ||
COL_SUBCAT = "subcategory" | ||
COL_SCALE_NAME = "scale_name" | ||
COL_SCALE_DES = "scale_description" | ||
|
||
# Column names cpp features | ||
COL_FEATURE = "feature" | ||
# COL_CAT, COL_SUBCAT, COL_SCALE_NAME, COL_SCALE_DES | ||
COL_ABS_AUC = "abs_auc" | ||
COL_ABS_MEAN_DIF = "abs_mean_dif" | ||
COL_MEAN_DIF = "mean_dif" | ||
COL_STD_TEST = "std_test" | ||
COL_STD_REF = "std_ref" | ||
COL_PVAL_MW = "p_val_mann_whitney" | ||
COL_PVAL_FDR = "p_val_fdr_bh" | ||
COL_POSITION = "positions" | ||
|
||
COL_FEAT_IMPORTANCE = "feat_importance" | ||
COO_FEAT_IMP_STD = "feat_importance_std" | ||
COL_FEAT_IMPACT = "feat_impact" | ||
|
||
# Standard colors | ||
COLOR_SHAP_POS = '#FF0D57' # (255, 13, 87) | ||
COLOR_SHAP_NEG = '#1E88E5' # (30, 136, 229) | ||
COLOR_FEAT_POS = '#9D2B39' # (157, 43, 57) Mean difference | ||
COLOR_FEAT_NEG = '#326599' # (50, 101, 133) Mean difference | ||
COLOR_FEAT_IMP = '#7F7F7F' # (127, 127, 127) feature importance | ||
COLOR_TMD = '#00FA9A' # (0, 250, 154) | ||
COLOR_JMD = '#0000FF' # (0, 0, 255) | ||
|
||
DICT_COLOR = {"SHAP_POS": COLOR_SHAP_POS, | ||
"SHAP_NEG": COLOR_SHAP_NEG, | ||
"FEAT_POS": COLOR_FEAT_POS, | ||
"FEAT_NEG": COLOR_FEAT_NEG, | ||
"FEAT_IMP": COLOR_FEAT_IMP, | ||
"TMD": COLOR_TMD, | ||
"JMD": COLOR_JMD} | ||
|
||
DICT_COLOR_CAT = {"ASA/Volume": "tab:blue", | ||
"Composition": "tab:orange", | ||
"Conformation": "tab:green", | ||
"Energy": "tab:red", | ||
"Others": "tab:gray", | ||
"Polarity": "gold", | ||
"Shape": "tab:cyan", | ||
"Structure-Activity": "tab:brown"} |
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,32 @@ | ||
""" | ||
This is a script for adjust output (mainly for python console) | ||
""" | ||
import numpy as np | ||
|
||
|
||
# I Helper Functions | ||
# Plotting & print functions | ||
def print_red(input_str, **args): | ||
"""Prints the given string in red text.""" | ||
print(f"\033[91m{input_str}\033[0m", **args) | ||
|
||
|
||
# Progress bar | ||
def print_start_progress(): | ||
"""Print start progress""" | ||
progress_bar = " " * 25 | ||
print_red(f"\r |{progress_bar}| 0.00%", end="") | ||
|
||
|
||
def print_progress(i=0, n=0): | ||
"""Print progress""" | ||
progress = min(np.round(i/n * 100, 2), 100) | ||
progress_bar = "#" * int(progress/4) + " " * (25-int(progress/4)) | ||
print_red(f"\r |{progress_bar}| {progress:.2f}%", end="") | ||
|
||
|
||
def print_finished_progress(): | ||
"""Print finished progress bar""" | ||
progress_bar = "#" * 25 | ||
print_red(f"\r |{progress_bar}| 100.00%") | ||
|
3 changes: 1 addition & 2 deletions
3
aaanalysis/aaclust/_utils.py → aaanalysis/_utils/utils_aaclust.py
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#! /usr/bin/python3 | ||
""" | ||
Config with folder structure | ||
Utility functions for AAclust module | ||
""" | ||
import inspect | ||
|
||
|
Oops, something went wrong.