Skip to content

Commit

Permalink
Merge pull request #62 from Luxxii/master
Browse files Browse the repository at this point in the history
Release of ProtGraph 0.3.9
  • Loading branch information
Luxxii committed Apr 28, 2023
2 parents fe920e0 + 27ee8e1 commit f307d76
Show file tree
Hide file tree
Showing 17 changed files with 282 additions and 69 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/functional_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ jobs:
strategy:
matrix:
python-version:
- '3.6'
- '3.7'
- '3.8'
- '3.9'
Expand All @@ -22,16 +21,19 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install pipenv
run: |
python -m pip install --upgrade pipenv wheel
- name: Install dependencies
run: |
pipenv install
pipenv install -d
pipenv run pip install -e .
pip install -e .
pip install pylint
pip install pytest
pip install redis
pip install redisgraph
pip install psycopg
pip install gremlinpython
pip install mysql-connector-python
pip install cassandra-driver
pip install apsw
- name: Run Complete tests
run: |
pipenv run pytest
python -m pytest
6 changes: 3 additions & 3 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ on: [push, pull_request]

jobs:
build-publish:
runs-on: ubuntu-latest
runs-on: ubuntu-latest

steps:
- name: Check out Repository
uses: actions/checkout@v2

- name: Setup Python 3.6
- name: Setup Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.6
python-version: 3.9

- name: Install Python build
run: |
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include Pipfile LICENSE
include requirements.txt LICENSE
21 changes: 0 additions & 21 deletions Pipfile

This file was deleted.

Binary file added materials_and_posters/2022_EuBIC-MS_Seminar.pdf
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion protgraph/annotate_ptms.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from Bio.SwissProt import FeatureLocation, FeatureTable, UnknownPosition
from Bio.SeqFeature import FeatureLocation, UnknownPosition
from Bio.SwissProt import FeatureTable


def annotate_ptms(graph_entry, var_mods: list, fix_mods: list, mass_factor: int):
Expand Down
3 changes: 2 additions & 1 deletion protgraph/export/cassandra.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import json

# import cassandra
from Bio.SwissProt import FeatureLocation, FeatureTable
from Bio.SeqFeature import FeatureLocation
from Bio.SwissProt import FeatureTable
# from cassandra.query import BatchStatement
from cassandra import InvalidRequest
from cassandra.cluster import Cluster
Expand Down
3 changes: 2 additions & 1 deletion protgraph/export/mysql.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import json

import mysql.connector
from Bio.SwissProt import FeatureLocation, FeatureTable
from Bio.SeqFeature import FeatureLocation
from Bio.SwissProt import FeatureTable

from protgraph.export.abstract_exporter import AExporter
from protgraph.graph_collapse_edges import Or
Expand Down
4 changes: 2 additions & 2 deletions protgraph/export/peptides/abstract_peptide_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ def export(self, prot_graph, queue):
# Iterate over all peptides
for path in self._get_peps(prot_graph, __start_node__, __stop_node__):


# Get the actual peptide (concatenated aminoacids)
aas = "".join(prot_graph.vs[path[1:-1]]["aminoacid"])

# Get the edge ids from a path
edge_ids = prot_graph.get_eids(path=path)
pairs = [(a, b) for a, b in zip(path, path[1:])]
edge_ids = prot_graph.get_eids(pairs=pairs)

# Skip Peptides, which contain an X
if self.skip_x and "X" in aas:
Expand Down
2 changes: 1 addition & 1 deletion protgraph/export/peptides/pep_fasta.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from Bio.SwissProt import UnknownPosition
from Bio.SeqFeature import UnknownPosition

from protgraph.export.peptides.abstract_peptide_exporter import \
APeptideExporter
Expand Down
4 changes: 2 additions & 2 deletions protgraph/export/peptides/pep_sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def _create_tables(self, **kwargs):
peptide {B},
meta {B});""".format(B="BLOB" if self.use_blob else "TEXT"))
except Exception as e:
print("Warning: Failed creating table 'peptides_meta' (Reason: {})".format(str(e)))
print("Warning: Failed creating table 'peptide_meta' (Reason: {})".format(str(e)))
finally:
# self.conn.commit()
cur.close()
Expand Down Expand Up @@ -195,7 +195,7 @@ def export_peptides(self, prot_graph, l_path_nodes, l_path_edges, l_peptide, l_m
self._retry_query_many(
cur,
"""
INSERT INTO peptides_meta (peptide, meta)
INSERT INTO peptide_meta (peptide, meta)
VALUES (?, ?);
""",
zip(compressed_peptides, compressed_metas)
Expand Down
3 changes: 2 additions & 1 deletion protgraph/export/postgres.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import json

import psycopg
from Bio.SwissProt import FeatureLocation, FeatureTable
from Bio.SeqFeature import FeatureLocation
from Bio.SwissProt import FeatureTable

from protgraph.export.abstract_exporter import AExporter
from protgraph.graph_collapse_edges import Or
Expand Down
3 changes: 2 additions & 1 deletion protgraph/export/redisgraph.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import redis
from Bio.SwissProt import FeatureLocation, FeatureTable
from Bio.SeqFeature import FeatureLocation
from Bio.SwissProt import FeatureTable
from redisgraph import Edge, Graph, Node

from protgraph.export.abstract_exporter import AExporter
Expand Down
Loading

0 comments on commit f307d76

Please sign in to comment.