Skip to content

Commit

Permalink
Bump up year in license, save BGC ids in GBK file.
Browse files Browse the repository at this point in the history
  • Loading branch information
prihoda committed Mar 8, 2019
1 parent 82d4dba commit bafba1d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright © 2018 Merck Sharp & Dohme Corp. a subsidiary of Merck & Co., Inc., Kenilworth, NJ, USA."
Copyright © 2019 Merck Sharp & Dohme Corp. a subsidiary of Merck & Co., Inc., Kenilworth, NJ, USA."

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion deepbgc/pipeline/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def run(self, record):
for cluster_proteins in clusters:
start = cluster_proteins[0].location.start
end = cluster_proteins[-1].location.end
candidate_id = '{}({}-{})'.format(record.id, int(start), int(end))
candidate_id = '{}_{}-{}.1'.format(record.id, int(start), int(end))

if self.min_nucl > 1:
nucl_length = end - start
Expand Down
7 changes: 5 additions & 2 deletions deepbgc/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,11 @@ def extract_cluster_record(cluster_feature, record):
"""

cluster_record = cluster_feature.extract(record)
# TODO set cluster ID
# cluster_record.id = cluster.qualifiers.get('bgc_candidate_id', ['unknown_cluster_id'])[0]
cluster_record.id = cluster_feature.qualifiers.get('bgc_candidate_id', ['unknown_cluster_id'])[0]
cluster_record.description = ''
cluster_record.annotations['source'] = record.annotations.get('source', '')
cluster_record.annotations['organism'] = record.annotations.get('organism', '')

proteins_by_id = get_proteins_by_id(get_protein_features(cluster_record))
# Remove pfams with protein not fully inside cluster borders (therefore not present in cluster_record)
cluster_record.features = [f for f in cluster_record.features
Expand Down

0 comments on commit bafba1d

Please sign in to comment.