Ejemplo n.º 1
0
def benchmark(query_protein_id, method=Pfam(), blast_service="plain", max_evalue=None, n_alignments=100):
    query_result = method.get_result(query_protein_id)
    blast_results = BLAST_Client.blast(
        query_protein_id, service=blast_service, max_evalue=max_evalue, n_alignments=n_alignments
    )
    benchmarks = []
    for blast_result in blast_results:
        for hit_protein_id in blast_result["subjects"]:
            hit_result = method.get_result(hit_protein_id)
            b = method.benchmark(query_result, hit_result)
            benchmarks.append({"protein_id": hit_protein_id, "benchmark": b, "evalue": blast_result["evalue"]})
    return benchmarks
Ejemplo n.º 2
0
 def search_homologs(self, protein_id):
     return BLAST_Client.blast(protein_id, max_evalue=self.max_evalue, n_alignments=self.max_alignments)