def task_handler(self, accession_number): accession = get_uniprot_accession(accession_number) if accession is None: accession = accession_number protein_data = uniprot.get(accession) self.output_queue.put((accession_number, protein_data)) return protein_data
def has_known_glycosylation(accession): try: prot = uniprot.get(accession) if "Glycoprotein" in prot.keywords: return True else: # for feature in prot.features: # if isinstance(feature, uniprot.GlycosylationSite): # return True pass return False except Exception: return False
def test_get(self): prot = uniprot.get("P13611") self.assertIn("P13611", prot.accessions)