$npx -y skills add ai4protein/VenusFactory2 --skill clustalo_msaMultiple sequence alignment of proteins via EBI Clustal Omega web service. Use when you have ≥2 protein sequences in a FASTA file (≤4000 sequences, ≤4 MB) and need an alignment to assess conservation, residue importance, or domain structure. Do NOT use for: single sequences, homo
| 1 | # Clustal Omega MSA (EBI) |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Submits a FASTA file with multiple protein sequences to the [EBI Clustal Omega REST service](https://www.ebi.ac.uk/jdispatcher/msa/clustalo), polls for completion, and downloads the resulting alignment in FASTA format. Pipeline is fully managed by the tool — the agent only provides the input FASTA and an output directory. |
| 6 | |
| 7 | ## Project Tools (VenusFactory2) |
| 8 | |
| 9 | | Tool | Args | Returns | Description | |
| 10 | |------|------|---------|--------------| |
| 11 | | **download_clustalo_msa_by_fasta** | `fasta_path` (required, path to input FASTA), `out_dir` (required), `email` (optional; falls back to env `USER_EMAIL`, then `noreply@venusfactory.cn`), `poll_interval` (default `10.0` s), `timeout_secs` (default `900` s) | JSON: `{status, file_info {file_path, file_name, file_size, format: "fasta"}, content_preview, biological_metadata {input_sequences, aligned_sequences, job_id, email}, execution_context}` | Submit + poll + download MSA. Writes `<input_stem>_msa.fasta` to `out_dir`. | |
| 12 | |
| 13 | ## When to Use This Skill |
| 14 | |
| 15 | - Compute MSA for a small/medium set of homologous proteins (UniProt search results, BLAST hits, manually curated set) |
| 16 | - Generate input for conservation scoring, phylogenetic analysis, or HMM profile training |
| 17 | - Identify conserved active-site residues from a small protein family |
| 18 | |
| 19 | ## When NOT to Use |
| 20 | |
| 21 | - Single sequence input → use `protein_sequence_similarity_search` to first find homologs |
| 22 | - >4000 sequences or >4 MB FASTA → EBI rejects; split into chunks or run locally with `mafft --auto` |
| 23 | - DNA / RNA alignment → Clustal Omega is for proteins |
| 24 | - Structural alignment of 3D structures → use `download_foldseek_results_by_pdb_file` |
| 25 | |
| 26 | ## Pipeline |
| 27 | |
| 28 | 1. **Validate input**: file exists, size ≤ 4 MB, 2 ≤ sequence count ≤ 4000. |
| 29 | 2. **Submit**: `POST https://www.ebi.ac.uk/Tools/services/rest/clustalo/run` with `email` + `title` + `sequence` form data. |
| 30 | 3. **Poll**: `GET .../status/{job_id}` every `poll_interval` seconds until `FINISHED` (or `ERROR`/`FAILURE`/`NOT_FOUND` → fail fast). |
| 31 | 4. **Download**: `GET .../result/{job_id}/fa` → FASTA alignment text. |
| 32 | 5. **Save**: write to `<out_dir>/<input_stem>_msa.fasta`. |
| 33 | |
| 34 | ## Rate Limiting & Politeness |
| 35 | |
| 36 | - The tool defaults to 10-second polls with a 15-minute wall-clock timeout. |
| 37 | - EBI requests a valid contact email — the default `noreply@venusfactory.cn` works but setting `USER_EMAIL` in your environment is preferred so EBI can contact you if your job affects service health. |
| 38 | - A single submit + many polls is the established contract; do not invoke the tool in a tight loop. |
| 39 | |
| 40 | ## Common Mistakes |
| 41 | |
| 42 | - **Passing a single sequence**: the tool errors with `ValidationError: need ≥2 sequences`. Run a similarity search first. |
| 43 | - **Pasting raw sequences into a tool argument**: this tool only accepts a *file path*. Write the FASTA to disk first (use `read_fasta`, `extract_uids_from_fasta`, etc., to compose). |
| 44 | - **Mixing nucleotide and protein sequences**: EBI returns garbage. Filter the input FASTA before calling. |
| 45 | |
| 46 | ## References |
| 47 | |
| 48 | - [EBI Clustal Omega REST docs](https://www.ebi.ac.uk/Tools/common/tools/help/index.html?tool=clustalo) |
| 49 | - [Terms of use](https://www.ebi.ac.uk/about/terms-of-use/) |
| 50 | - Adapted from `google-deepmind/science-skills:skills/protein_sequence_msa/scripts/msa_align.py` |