This repository has been archived by the owner on Nov 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Showing
29 changed files
with
12,767 additions
and
12,696 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
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,17 @@ | ||
import logging | ||
import logging.config | ||
|
||
from . import logger_settings | ||
from .chemicals import AA_codes, AA_codes_3to1, AA_codes_1to3 | ||
from .chemicals import AA_codes_pssm_ordered | ||
from .chemicals import AA_properties | ||
|
||
# Debug | ||
DEBUG = False | ||
|
||
# Default logger | ||
logging.config.dictConfig(logger_settings.DEFAULT_LOGGING) | ||
logger = logging.getLogger('deeprank') | ||
|
||
# Default PSSM path | ||
PATH_PSSM_SOURCE = None |
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,73 @@ | ||
# 20 standard amino acids | ||
# https://www.ncbi.nlm.nih.gov/Class/MLACourse/Modules/MolBioReview/iupac_aa_abbreviations.html | ||
_aa_standard = [ | ||
('ALA', 'A'), | ||
('ARG', 'R'), | ||
('ASN', 'N'), | ||
('ASP', 'D'), | ||
('CYS', 'C'), | ||
('GLN', 'Q'), | ||
('GLU', 'E'), | ||
('GLY', 'G'), | ||
('HIS', 'H'), | ||
('ILE', 'I'), | ||
('LEU', 'L'), | ||
('LYS', 'K'), | ||
('MET', 'M'), | ||
('PHE', 'F'), | ||
('PRO', 'P'), | ||
('SER', 'S'), | ||
('THR', 'T'), | ||
('TRP', 'W'), | ||
('TYR', 'Y'), | ||
('VAL', 'V') | ||
] | ||
|
||
# nonstandard amino acids used in blast | ||
# https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=BlastDocs&DOC_TYPE=BlastHelp | ||
_aa_nonstadnard = [ | ||
('ASX', 'B'), | ||
('GLX', 'Z'), | ||
('SEC', 'U') | ||
] | ||
|
||
# ordered amino acids according to PSSM file | ||
# https://www.ncbi.nlm.nih.gov/Structure/cdd/cdd_help.shtml#CD_PSSM | ||
_aa_pssm = ('A', 'R', 'N', 'D', 'C', 'Q', 'E', 'G', 'H', 'I', | ||
'L', 'K', 'M', 'F', 'P', 'S', 'T', 'W', 'Y', 'V') | ||
|
||
# ('ALA',...) | ||
AA_codes = tuple([i[0] for i in _aa_standard]) | ||
|
||
# {'ALA': 'A', ...} | ||
AA_codes_3to1 = dict(_aa_standard + _aa_nonstadnard) | ||
|
||
# {'A': 'ALA', ...} | ||
AA_codes_1to3 = dict([i[::-1] for i in _aa_standard + _aa_nonstadnard]) | ||
|
||
# AA codes ordered as PSSM header | ||
AA_codes_pssm_ordered = tuple([AA_codes_1to3[i] for i in _aa_pssm]) | ||
|
||
# AA properties | ||
AA_properties = { | ||
'ALA': 'apolar', | ||
'GLY': 'apolar', | ||
'ILE': 'apolar', | ||
'LEU': 'apolar', | ||
'MET': 'apolar', | ||
'PHE': 'apolar', | ||
'PRO': 'apolar', | ||
'VAL': 'apolar', | ||
'ARG': 'charged', | ||
'ASP': 'charged', | ||
'GLU': 'charged', | ||
'LYS': 'charged', | ||
'ASN': 'polar', | ||
'CYS': 'polar', | ||
'GLN': 'polar', | ||
'HIS': 'polar', | ||
'SER': 'polar', | ||
'THR': 'polar', | ||
'TRP': 'polar', | ||
'TYR': 'polar' | ||
} |
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,54 @@ | ||
# Default logging settings for DeepRank. | ||
DEFAULT_LOGGING = { | ||
'version': 1, | ||
'disable_existing_loggers': False, | ||
'formatters': { | ||
'brief': { | ||
'format': '%(message)s', | ||
}, | ||
'precise': { | ||
'format': '%(levelname)s: %(message)s', | ||
}, | ||
}, | ||
'filters': { | ||
'require_debug': { | ||
'()': 'deeprank.utils.logger_helper.requireDebugFilter', | ||
}, | ||
'use_only_info_level': { | ||
'()': 'deeprank.utils.logger_helper.useLevelsFilter', | ||
'levels': 'INFO', # function parameter | ||
}, | ||
'use_only_debug_level': { | ||
'()': 'deeprank.utils.logger_helper.useLevelsFilter', | ||
'levels': 'DEBUG', | ||
}, | ||
}, | ||
'handlers': { | ||
'stdout': { | ||
'level': 'INFO', | ||
'formatter': 'brief', | ||
'filters': ['use_only_info_level', ], | ||
'class': 'logging.StreamHandler', | ||
'stream': 'ext://sys.stdout', | ||
}, | ||
'stderr': { | ||
'level': 'WARNING', | ||
'formatter': 'precise', | ||
'class': 'logging.StreamHandler', | ||
'stream': 'ext://sys.stderr', | ||
}, | ||
'debug': { | ||
'level': 'DEBUG', | ||
'formatter': 'precise', | ||
'filters': ['require_debug', 'use_only_debug_level'], | ||
'class': 'logging.StreamHandler', | ||
'stream': 'ext://sys.stderr', | ||
}, | ||
}, | ||
'loggers': { | ||
'deeprank': { | ||
'handlers': ['stdout', 'stderr', 'debug'], | ||
'level': 'DEBUG', | ||
}, | ||
} | ||
} |
Oops, something went wrong.