Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 7 additions & 2 deletions .github/workflows/release-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ jobs:
with:
name: python-package-distributions
path: dist/
- name: Extract version from setup.py
id: get_version
run: |
VERSION=$(python setup.py --version)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v3.0.0
with:
Expand All @@ -82,15 +87,15 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
"$VERSION"
--repo '${{ github.repository }}'
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
"$VERSION" dist/**
--repo '${{ github.repository }}'

publish-to-testpypi:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="plcg",
version="1.0.1",
version="1.0.2",
author="Spencer Perkins",
author_email="spencer.perkins44sp@gmail.com",
description="Computational biology and machine learning utilities for the Pardee Lab Computation Group",
Expand Down
9 changes: 7 additions & 2 deletions src/plcg/structure_prediction/colabfold/colabfold.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import shutil
import subprocess
import json

from plcg.structure_prediction.fasta.fasta import save_fasta_file

Expand Down Expand Up @@ -48,7 +49,7 @@ def run_colabfold_and_get_filepath(seq: str, working_dir: str):
if len(json_filepath) > 0:
json_filepath = json_filepath[0]
with open(working_dir + json_filepath, "r", encoding="utf-8") as f:
data = f.read()
data = json.load(f)
ptm_value = data.get("ptm")

return pdb_filepath, ptm_value
Expand Down Expand Up @@ -76,11 +77,15 @@ def run_colabfold_batch_and_return_filepaths(sequences: list[str], working_dir:
save_fasta_file(sequences, working_dir + fasta_file_path)
colabfold_batch(working_dir + fasta_file_path, working_dir)
sequences_to_pdb_filepaths = {}
sequences_to_json_filepaths = {}
files = os.listdir(working_dir)
for i, sequence in enumerate(sequences):
results = [result for result in files if "Sequence_" + str(i) in result]
result = [result for result in results if "unrelaxed_rank_001" in result]
json_filepath = [result for result in results if "scores_rank_001" in result]
if len(result) > 0:
result = result[0]
json_filepath = json_filepath[0]
sequences_to_pdb_filepaths[i] = working_dir + result
return sequences_to_pdb_filepaths
sequences_to_json_filepaths[i] = working_dir + json_filepath
return sequences_to_pdb_filepaths, sequences_to_json_filepaths