Skip to content
Snippets Groups Projects
Commit 23b813f4 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

Encode confidence in ConSurf values

Requires a container with latest ConSurf deps
parent 3fd33166
No related branches found
No related tags found
No related merge requests found
...@@ -25,8 +25,11 @@ class ConsurfSeqAnno(SeqAnno): ...@@ -25,8 +25,11 @@ class ConsurfSeqAnno(SeqAnno):
The code is not opensource but kindly provided by the Ben-Tal group The code is not opensource but kindly provided by the Ben-Tal group
and wrapped into a Singularity container by us. and wrapped into a Singularity container by us.
The returned annotations correspond to the Consurf conservation scores in ConSurf conservation scores are in range [1-9]. However, the returned values
range [1-9] additionally encode confidence. A score is considered non-confident if less
than 6 non-gaped homologue sequences have been found at that location or if
the ConSurf internal confidence interval is >= 4. Non-confident scores are
multiplied by -1. So a non-confident score of 8 would be represented as -8.
:param seq_db: Path to sequence db that can be read by Jackhmmer, i.e. a big :param seq_db: Path to sequence db that can be read by Jackhmmer, i.e. a big
fat fasta file. Typically uniref90 fat fasta file. Typically uniref90
...@@ -108,7 +111,10 @@ class ConsurfSeqAnno(SeqAnno): ...@@ -108,7 +111,10 @@ class ConsurfSeqAnno(SeqAnno):
with open(result_json, "r") as fh: with open(result_json, "r") as fh:
result = json.load(fh) result = json.load(fh)
return self.MapAnno(sequence, result["COLOR"], seq_range) color = result["COLOR"]
confidence = result["CONFIDENCE"]
scores = [a if b else -a for a,b in zip(color, confidence)]
return self.MapAnno(sequence, scores, seq_range)
class EntropySeqAnno(SeqAnno): class EntropySeqAnno(SeqAnno):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment