Skip to content
Snippets Groups Projects
Commit 8ceb05ec authored by Bienchen's avatar Bienchen
Browse files

Added release info for UniRef90

parent dbc1bb2e
No related branches found
No related tags found
No related merge requests found
...@@ -342,20 +342,20 @@ def _get_entities(pdb_file, fam_name, trg_seq): ...@@ -342,20 +342,20 @@ def _get_entities(pdb_file, fam_name, trg_seq):
# NOTE: can have gaps to accommodate "X" in ref_seq # NOTE: can have gaps to accommodate "X" in ref_seq
exp_seq = sqe_gaps.replace("-", "X") exp_seq = sqe_gaps.replace("-", "X")
len_diff = len(trg_seq.string) - len(exp_seq) trg_seq = trg_seq.string
len_diff = len(trg_seq) - len(exp_seq)
if len_diff > 0: if len_diff > 0:
exp_seq += "X" * len_diff exp_seq += "X" * len_diff
if exp_seq != trg_seq.string: if exp_seq != trg_seq:
print( # ToDo: turn into an exception once we got the correct sequence list.
_warn_msg(
f"Sequence in {os.path.splitext(os.path.basename(pdb_file))[0]} " f"Sequence in {os.path.splitext(os.path.basename(pdb_file))[0]} "
+ "does not match target.", + "does not match target. Falling back to residue-based sequence."
exp_seq,
) )
# ToDo: re-enable check trg_seq = exp_seq
# raise RuntimeError(f"Sequence in {pdb_file} does not match target.")
cif_ent = { cif_ent = {
"seqres": trg_seq.string, "seqres": trg_seq,
"pdb_sequence": sqe_gaps, "pdb_sequence": sqe_gaps,
"pdb_chain_id": [_get_ch_name(chn, False)], "pdb_chain_id": [_get_ch_name(chn, False)],
"fam_name": fam_name, "fam_name": fam_name,
...@@ -509,8 +509,8 @@ def _get_sequence_dbs_alphafold(seq_dbs): ...@@ -509,8 +509,8 @@ def _get_sequence_dbs_alphafold(seq_dbs):
"UniRef90", "UniRef90",
"ftp://ftp.uniprot.org/pub/databases/uniprot/uniref/uniref90/" "ftp://ftp.uniprot.org/pub/databases/uniprot/uniref/uniref90/"
+ "uniref90.fasta.gz", + "uniref90.fasta.gz",
version=None, version="2021_4",
release_date=None, release_date=datetime.datetime(2021, 11, 17),
), ),
"BFD": modelcif.ReferenceDatabase( "BFD": modelcif.ReferenceDatabase(
"BFD", "BFD",
...@@ -970,6 +970,10 @@ def _read_sequences(path): ...@@ -970,6 +970,10 @@ def _read_sequences(path):
continue continue
sqnz += line sqnz += line
if len(sqnz) > 0:
sqnz = sqnz.rstrip("*")
sqnz_lst.AddSequence(seq.CreateSequence(name, sqnz))
return sqnz_lst return sqnz_lst
...@@ -1008,11 +1012,6 @@ def _main(): ...@@ -1008,11 +1012,6 @@ def _main():
) )
except (_InvalidCoordinateError, _NoEntitiesError): except (_InvalidCoordinateError, _NoEntitiesError):
continue continue
except Exception as exc:
# ToDo: remove catching ALL exceptions
_warn_msg(f"Uncaught exception for '{f_name}':")
print(str(exc))
continue
# report progress after a bit of time # report progress after a bit of time
if timer() - tmstmp > 60: if timer() - tmstmp > 60:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment