Skip to content

Commit

Permalink
Merge branch 'main' into 425-refactor-none-type-functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mgiulini authored Jun 25, 2024
2 parents bd12e1d + 8443730 commit 1a88680
Show file tree
Hide file tree
Showing 7 changed files with 224 additions and 233 deletions.
420 changes: 204 additions & 216 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ classifiers = [
[tool.poetry.dependencies]
python = ">=3.9,<3.12"
bio = "1.6.2"
lxml = "5.2.1"
lxml = "5.2.2"
mdanalysis = "2.7.0"
requests = "2.32.0"
biopython = "1.83"
Expand All @@ -26,7 +26,7 @@ matplotlib = "3.8.2"
pdb-tools = "2.5.0"
pandas = "2.2.1"
openpyxl = "3.1.2"
plotly = "5.19.0"
plotly = "5.22.0"
pdbecif = "1.5"
jsonpickle = "3.0.4"
kaleido = "0.2.1"
Expand Down
8 changes: 3 additions & 5 deletions src/arctic3d/cli_localise.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,25 @@
arctic3d-localise ./example/clustered_interfaces.out \
--scale=2.0
"""

import argparse
import os
import sys
import time
from pathlib import Path

from arctic3d import log

from arctic3d.functions import make_request
from arctic3d.modules.interface import parse_out_partner
from arctic3d.modules.log import add_log_for_CLI
from arctic3d.modules.output import (
# create_barplot,
from arctic3d.modules.output import ( # create_barplot,
create_barplotly,
create_output_folder,
parse_clusters,
setup_output_folder,
write_dict,
)

UNIPROT_API_URL = "https://www.ebi.ac.uk/proteins/api/proteins"
from arctic3d.modules.url import UNIPROT_API_URL

argument_parser = argparse.ArgumentParser()
argument_parser.add_argument(
Expand Down
5 changes: 1 addition & 4 deletions src/arctic3d/modules/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
import jsonpickle

from arctic3d.functions import make_request
from arctic3d.modules.url import INTERFACE_URL, LIGAND_URL

log = logging.getLogger("arctic3d.log")

INTERFACE_URL = (
"https://www.ebi.ac.uk/pdbe/graph-api/uniprot/interface_residues"
)
LIGAND_URL = "https://www.ebi.ac.uk/pdbe/graph-api/uniprot/ligand_sites/"
# maximum number of interfaces in interface file
MAX_INTERFACES = 10000

Expand Down
4 changes: 1 addition & 3 deletions src/arctic3d/modules/pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@

from arctic3d.functions import make_request
from arctic3d.modules.interface_matrix import filter_interfaces
from arctic3d.modules.url import BESTPDB_URL, PDBE_URL

log = logging.getLogger("arctic3d.log")

BESTPDB_URL = "https://www.ebi.ac.uk/pdbe/graph-api/mappings/best_structures"
PDBE_URL = "https://www.ebi.ac.uk/pdbe/entry-files/download"


def _remove_altloc(lines):
# the altloc ID is removed in processed altloc lines
Expand Down
7 changes: 7 additions & 0 deletions src/arctic3d/modules/url.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
UNIPROT_API_URL = "https://www.ebi.ac.uk/proteins/api/proteins"
INTERFACE_URL = (
"https://www.ebi.ac.uk/pdbe/graph-api/uniprot/interface_residues"
)
LIGAND_URL = "https://www.ebi.ac.uk/pdbe/graph-api/uniprot/ligand_sites/"
BESTPDB_URL = "https://www.ebi.ac.uk/pdbe/graph-api/mappings/best_structures"
PDBE_URL = "https://www.ebi.ac.uk/pdbe/entry-files/download"
9 changes: 6 additions & 3 deletions tests/test_apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
import pytest
import requests

from arctic3d.cli_localise import UNIPROT_API_URL
from arctic3d.modules.interface import LIGAND_URL
from arctic3d.modules.pdb import BESTPDB_URL, PDBE_URL
from arctic3d.modules.url import ( # noqa
BESTPDB_URL,
LIGAND_URL,
PDBE_URL,
UNIPROT_API_URL,
)

TARGET_UNIPROT = "P07550"
TARGET_PDB = "1crn"
Expand Down

0 comments on commit 1a88680

Please sign in to comment.