(self, aa_seq)
| 291 | ) |
| 292 | |
| 293 | def process_input(self, aa_seq): |
| 294 | # process fasta files to input format |
| 295 | download_fasta_utilities(self.cache) |
| 296 | # save the input sequence to a fasta file |
| 297 | with open(self.cache / "input.fasta", "w") as f: |
| 298 | f.write(f">A|Protein\n{aa_seq}\n") |
| 299 | data = [self.cache / "input.fasta"] |
| 300 | process_fastas( |
| 301 | data=data, |
| 302 | out_dir=self.cache, |
| 303 | ccd_path=self.cache / "ccd.pkl", |
| 304 | ) |
| 305 | |
| 306 | # prepare the target protein data for inference |
| 307 | struct_file = self.cache / "structures" / "input.npz" |
| 308 | record_file = self.cache / "records" / "input.json" |
| 309 | batch, structure, record = process_one_inference_structure( |
| 310 | struct_file, |
| 311 | record_file, |
| 312 | self.tokenizer, |
| 313 | self.featurizer, |
| 314 | self.processor, |
| 315 | self.esm_model, |
| 316 | self.esm_dict, |
| 317 | self.af2_to_esm, |
| 318 | ) |
| 319 | return batch, structure, record |
| 320 | |
| 321 | def run_inference(self, batch, model, plddt_model, device): |
| 322 | # run inference for target protein |
nothing calls this directly
no test coverage detected