Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
1207b71
Merge pull request #270 from X-lab-3D/development
DarioMarzella Oct 7, 2024
50b70cc
Merge pull request #272 from X-lab-3D/development
DarioMarzella Oct 7, 2024
ee3079c
Update README.md to add the reference to reverse-Dockig_MHCII branch
FarzanehParizi Oct 9, 2024
c28c333
Merge pull request #277 from X-lab-3D/FarzanehParizi-patch-1
DTRademaker Oct 10, 2024
085a771
Update README.md
DarioMarzella Oct 10, 2024
8df6c64
Merge pull request #279 from X-lab-3D/README_reviewers_update
FarzanehParizi Oct 10, 2024
500c758
Create Generate_reverse_templates.py
DTRademaker Oct 15, 2024
1ea69f2
Update Database.py
DTRademaker Oct 15, 2024
18b8401
Update test_pandora.py
DTRademaker Oct 15, 2024
92033f6
Update Pandora.py
DTRademaker Oct 15, 2024
6ba9ca3
Update test_pandora.py
DTRademaker Oct 15, 2024
133ad3b
Update PMHC.py
DTRademaker Oct 15, 2024
bc59139
Add files via upload
DTRademaker Oct 15, 2024
aedaff5
Update test_pandora.py
DTRademaker Oct 15, 2024
fdbe516
Update test_pandora.py
DTRademaker Oct 15, 2024
449b333
Update test_pandora.py
DTRademaker Oct 15, 2024
c5b91f1
Update test_pandora.py
DTRademaker Oct 15, 2024
715d47d
Update test_pandora.py
DTRademaker Oct 15, 2024
fa12ded
Update test_pandora.py
DTRademaker Oct 15, 2024
ac997c2
Update test_pandora.py
DTRademaker Oct 15, 2024
6783624
Update README.md
DTRademaker Oct 15, 2024
afff96c
Update README.md
DTRademaker Oct 15, 2024
f098ad4
Update README.md
DTRademaker Oct 15, 2024
940ef75
Update test_pandora.py
DTRademaker Oct 15, 2024
9c088f1
Update test_pandora.py
DTRademaker Oct 15, 2024
d38ad64
Create 4Z7U_reverse.pdb
DTRademaker Oct 15, 2024
cc9eef3
Merge pull request #287 from X-lab-3D/rev2dev
DTRademaker Oct 15, 2024
fbda6e8
Add files via upload
DTRademaker Oct 15, 2024
0a6dd4a
Merge pull request #289 from X-lab-3D/development
DTRademaker Oct 16, 2024
73d5fe2
Update meta.yaml
DTRademaker Oct 17, 2024
c064eb2
Merge pull request #290 from X-lab-3D/DTRademaker-patch-1
DTRademaker Oct 17, 2024
d6d98f0
Update README.md
DTRademaker Oct 17, 2024
2bb59ac
Merge pull request #291 from X-lab-3D/DTRademaker-patch-2
DTRademaker Oct 17, 2024
01b0a63
fix zenodo typo
DarioMarzella Mar 4, 2025
3113374
Restore changes to Database.py
DarioMarzella Mar 4, 2025
95158ab
Restore fixes in PMHC.py
DarioMarzella Mar 4, 2025
7b1528e
Fix conflicts between master_to_restore and development
DarioMarzella Apr 30, 2025
7a47cb2
Merge pull request #295 from X-lab-3D/master_to_restore
DarioMarzella Apr 30, 2025
7abf66c
Merge branch 'restore_dev_updates' of github.com:X-lab-3D/PANDORA int…
DarioMarzella Apr 30, 2025
312a25c
Change python version in main.yml
DarioMarzella Apr 30, 2025
0e8e6bc
test environment.yml without csb-nijmegen for github action
DarioMarzella Apr 30, 2025
e08689f
revert to python 3.10.17 due to miniconda git action
DarioMarzella Apr 30, 2025
d6fa90b
test python 3.11 for git miniconda action
DarioMarzella Apr 30, 2025
5a5db63
test conda-forge channel to cirrcumvent python 3.10 conda issue
DarioMarzella Apr 30, 2025
6aa2a7f
Test adding strict channel priority
DarioMarzella Apr 30, 2025
721de37
remove channel_priority:strict
DarioMarzella Apr 30, 2025
e1d5553
downgrade main.yml to python 3.10
DarioMarzella Apr 30, 2025
a66928d
specify python v 3.10.17
DarioMarzella Apr 30, 2025
d9a39e2
test python 3.11
DarioMarzella Apr 30, 2025
b3aee4f
test python 3.11.12
DarioMarzella Apr 30, 2025
f26c9d0
test removing csb-nijmegen channel from environment
DarioMarzella Apr 30, 2025
aa1d77c
test adding conda-forge as first channel
DarioMarzella Apr 30, 2025
ce5b352
revert to python 3.10 to solve blast conflict
DarioMarzella Apr 30, 2025
2d46024
change to python 3.10.17
DarioMarzella Apr 30, 2025
2bdd6e2
specify channel for muscle and blast
DarioMarzella Apr 30, 2025
e18b58c
restore python 3.11.10
DarioMarzella Apr 30, 2025
f2b46dc
test mambaforge for miniconda incubator
DarioMarzella Apr 30, 2025
f64f478
test setup-python@v3
DarioMarzella Apr 30, 2025
d42386f
fix input location on main.yml
DarioMarzella Apr 30, 2025
753fe72
remove inputs voice in main.yml
DarioMarzella Apr 30, 2025
39e124b
add conda-forge channel to main.yml
DarioMarzella Apr 30, 2025
442a202
test removing auto-activate-base false in main.yml
DarioMarzella Apr 30, 2025
fb6b180
test miniforge instead of mamabaforge
DarioMarzella Apr 30, 2025
6262631
remove miniforge specification
DarioMarzella Apr 30, 2025
11485cf
remove mamba
DarioMarzella Apr 30, 2025
9ff3bdf
swap activate-environemnt and environemnt-file postions
DarioMarzella Apr 30, 2025
af85078
remove conda auto update
DarioMarzella Apr 30, 2025
3456759
remove channels from main.yml
DarioMarzella Apr 30, 2025
d6698fd
revert to conda package solver. Test setup-python@v5
DarioMarzella May 1, 2025
450d426
remove conda-force from environment dependencies
DarioMarzella May 1, 2025
80900aa
Merge pull request #299 from X-lab-3D/restore_dev_updates
DarioMarzella May 1, 2025
016b63e
Fix allele syntax for NetMHCIIpan. Raise Exception if no allele is fo…
DarioMarzella May 1, 2025
eec26f4
Merge pull request #300 from X-lab-3D/issue_297
DarioMarzella May 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,27 @@ jobs:
# matrix:
# python-version: [3.10, 3.11, 3.12]
# Steps represent a sequence of tasks that will be executed as part of the job

steps:

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Runs a single command using the runners shell
- name: Set up Python 3.11.10
uses: actions/setup-python@v1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11.10
- name: Set up conda test
uses: conda-incubator/setup-miniconda@v2
with:
# auto-update-conda: true
# channels: conda-forge
auto-activate-base: false
activate-environment: pandora
environment-file: environment.yml
python-version: 3.11.10
# use-mamba: true
# python-version: ${{ matrix.python-version }}
# auto-update-conda: false
# miniforge-version: latest
Expand Down
32 changes: 26 additions & 6 deletions PANDORA/Database/Database.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@ def __init__(self):
self.ref_MHCI_sequences = {}
self.__IDs_list_MHCI = []
self.__IDs_list_MHCII = []
self.reverse = False

def __reverse(self):
for temp in self.MHCII_data:
peptide = self.MHCII_data[temp].peptide
self.MHCII_data[temp].peptide = peptide[::-1]
self.MHCII_data[temp].anchors = [len(peptide) - anchor + 1 for anchor in self.MHCII_data[temp].anchors][::-1]
self.MHCII_data[temp].reverse = not self.MHCII_data[temp].reverse

def set_reverse(self, reverse):
if reverse:
if not self.reverse:
self.__reverse()
else:
if self.reverse:
self.__reverse()
self.reverse = reverse

def download_data(self, data_dir = f'{PANDORA.PANDORA_data}/database', download = True):
"""download_data(self, data_dir = f'{PANDORA.PANDORA_data}/database', download = True)
Expand Down Expand Up @@ -95,7 +112,7 @@ def construct_database(self, save=PANDORA.PANDORA_data + '/database/PANDORA_data
'''
#Generate the necessary folders
create_db_folders()

# Download the data
self.download_data(download = download, data_dir = data_dir)

Expand Down Expand Up @@ -301,12 +318,15 @@ def load(file_name = PANDORA.PANDORA_data + '/database/PANDORA_database.pkl'):
Database.Database: Database object.

Example:
>>> db = Database.load('MyDatabase.pkl')
>>> db = Database.load()

"""
try:
with open(file_name, 'rb') as inpkl:
db = pickle.load(inpkl)
db.reverse = False
for temp in db.MHCII_data:
db.MHCII_data[temp].reverse = False
return db
except FileNotFoundError:
raise Exception('Database file not found. Are you sure you have it? If not, run Database.construct_database()')
Expand Down Expand Up @@ -340,7 +360,7 @@ def create_db_folders(db_path=None):
parent_db_path = ('/').join(db_path.split('/')[:-1])
dirs = [parent_db_path,
db_path,
f'{db_path}/database'
f'{db_path}/database',
f'{db_path}/mhcseqs',
f'{db_path}/BLAST_databases',
f'{db_path}/PDBs',
Expand All @@ -362,12 +382,12 @@ def create_db_folders(db_path=None):
print(f'WARNING: folder {D} already exists!')

def fetch_database(db_out_path, db_url='https://zenodo.org/records/6373630'):
"""Downloads the pre-generated database from zotero.
"""Downloads the pre-generated database from zenodo.

Args:
db_out_path (str): Path to the database to be downloaded,
should be pointing at a "PANDORA_databases" folder.
db_url (str, optional): URL for the zenodo database.
db_url (str, optional): URL to the zenodo database.
Defaults to 'https://zenodo.org/records/6373630'.

Raises:
Expand All @@ -381,7 +401,7 @@ def fetch_database(db_out_path, db_url='https://zenodo.org/records/6373630'):
new_release_url = response.geturl()
except Exception as e:
print(f'ERROR: received error while fetching the latest database url: {e}')

try:
parent_db_path = ('/').join(db_out_path.split('/')[:-1])

Expand Down
Loading
Loading