Skip to content

Commit

Permalink
adjust ranks of user-provided proteins and HMMs
Browse files Browse the repository at this point in the history
Increase the rank of user-provided proteins to 101, so that they have higher ranks than user-provided HMMs, which in turn are ranked 100, thus higher than all non-user-provided annotation sources.
  • Loading branch information
oschwengers committed Sep 24, 2024
1 parent 091d0b0 commit c7046ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bakta/expert/protein_hmms.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def search(cdss: Sequence[dict], user_hmms):
hit = {
'type': 'user_hmms',
'source': 'UserHMMs',
'rank': 99,
'rank': 100,
'id': hmm_id,
'length': hit_domain_lengths_sum,
'aa_cov': aa_cov,
Expand Down
2 changes: 1 addition & 1 deletion bakta/expert/protein_sequences.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def write_user_protein_sequences(aa_fasta_path: Path):
with aa_fasta_path.open('w') as fh_out:
for user_protein in user_proteins:
(model_id, min_id, min_query_cov, min_model_cov, gene, product, dbxrefs, seq) = user_protein
fh_out.write(f">{model_id} UserProteins~~~{100}~~~{min_id}~~~{min_query_cov}~~~{min_model_cov}~~~{gene}~~~{product}~~~{','.join(dbxrefs)}\n{seq}\n")
fh_out.write(f">{model_id} UserProteins~~~{101}~~~{min_id}~~~{min_query_cov}~~~{min_model_cov}~~~{gene}~~~{product}~~~{','.join(dbxrefs)}\n{seq}\n")
log.debug(
'imported user aa: id=%s, length=%i, min-id=%f, min-query-cov=%f, min-model-cov=%f, gene=%s, product=%s, dbxrefs=%s',
model_id, len(seq), min_id, min_query_cov, min_model_cov, gene, product, dbxrefs
Expand Down

0 comments on commit c7046ab

Please sign in to comment.