[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CVKFJA1P4724TZ03WE73QE":3,"skill-same:01M7CVKFJA1P4724TZ03WE73QE":71},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7CVKFJA1P4724TZ03WE73QE","bio-alignment-trimming",null,"Trim multiple sequence alignments using ClipKIT, trimAl, BMGE, Divvier, or HMMcleaner with mode selection guidance per downstream goal. Use when removing unreliable columns or contaminating residues before phylogenetic inference, HMM building, or selection analysis.","mrsonord2240\u002Fopenscience-specialists","mrsonord2240","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F76487430?v=4","01M7CTEM40S43GSJZ9A3YCCXZK","Samuel Nord","01M7CTEM4K69JD1GBYNHVJ9ZP4",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-alignment-trimming\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-alignment-trimming\ndescription: Trim multiple sequence alignments using ClipKIT, trimAl, BMGE, Divvier, or HMMcleaner with mode selection guidance per downstream goal. Use when removing unreliable columns or contaminating residues before phylogenetic inference, HMM building, or selection analysis.\ntool_type: mixed\nprimary_tool: ClipKIT\n---\n\n## Version Compatibility\n\nReference examples tested with: ClipKIT 2.14.0, trimAl 1.4.1, BMGE 1.12 and 2.0 (different flags, see below), MACSE 2.07, PAML 4.10.10, Divvier 1.01+, HMMcleaner (current CPAN release of `Bio::MUST::Apps::HmmCleaner`), BioPython 1.83+\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- CLI: `clipkit --version`, `trimal --version`, `BMGE --help`, `Divvier --help`\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.\n\n# Alignment Trimming\n\n**\"Remove unreliable columns from this MSA\"** -> Filter or split columns based on gap fraction, conservation, entropy, or per-residue quality.\n- CLI: `clipkit`, `trimal`, `BMGE`, `Divvier`, `HMMcleaner`\n- Python: post-process via Bio.AlignIO with custom column masks\n\n**\"Make this alignment publication-grade for phylogenetics\"** -> Apply ClipKIT's `smart-gap` mode (its default), or trimAl `-automated1`, then verify via tree-stability comparison before vs after trimming.\n\nTool choice and aggressiveness matter more than trimming vs not-trimming. Pick a mode by dataset character (table below), and always run a sensitivity check by building trees on trimmed and untrimmed alignments.\n\n### Pick a Trimming Mode by Dataset Character\n\n| Dataset character | Trimming effect | Recommended approach |\n|-------------------|-----------------|----------------------|\n| Deep-divergence orthologs (>500 Ma), saturated 3rd codons | Aggressive trimming can hurt | No trim or light gap-based trim (`smart-gap`); report sensitivity to trimming choice |\n| Mid-depth eukaryotic (animal phyla, fungal classes) | Light gap-based trimming usually neutral | ClipKIT `smart-gap`; confirm with trimmed vs untrimmed trees |\n| Shallow (within-genus) | All trimmers ~equivalent | Choose for downstream-tool compatibility |\n| Concatenated supermatrix with very long alignments (>10 kb) | Trimming removes gappy, poorly aligned regions | `smart-gap` or BMGE, run PER LOCUS before concatenation (trimming the concatenation invalidates partition charsets: IQ-TREE \"Too large site ID\") |\n| Single short genes (\u003C200 bp aligned) | Trimming amplifies stochastic error | Skip column trimming; use sequence-level outlier filtering |\n\n**The 20%\u002F40% rule (gap- and entropy-based trimming only).** Tan et al 2015 (Syst Biol) found that automated filtering frequently worsens single-gene trees. As an operational heuristic for modes that remove columns by gap content or entropy (ClipKIT `smart-gap`\u002F`gappy`\u002F`gappyout`, trimAl gap and similarity modes, BMGE, Gblocks): removing \u003C20% of columns is light trimming; if the trimmer removes >40% (retention \u003C 0.6), it is too aggressive for the dataset -- switch to a less aggressive setting or skip trimming. The heuristic does NOT apply to ClipKIT `kpic*`\u002F`kpi*` modes: they drop every singleton column (`kpi*` also every constant column) by design, so they routinely remove 40-55% of a single gene. Judge those modes only by comparing topology AND branch lengths against the untrimmed alignment, never by column fraction.\n\nAlways run a sensitivity analysis: build the tree on trimmed AND untrimmed alignments. If topology and support are stable across trimming choices, the conclusion is robust; if unstable, report this and pick the result better supported by independent evidence (gene-tree concordance, biological priors).\n\n## Goal-Driven Tool Selection\n\n| Downstream goal | First-line tool | Rationale |\n|----------------|-----------------|-----------|\n| Phylogenetic-tree input (concatenated genes) | ClipKIT `smart-gap`, per locus (Steenwyk et al 2020 PLOS Bio) | ClipKIT 2.14.0 default; removes only gappy columns, so branch lengths stay close to the untrimmed tree |\n| Phylogenetic-tree input (single gene) | ClipKIT `smart-gap` | Default mode; dynamic gap-threshold determination |\n| HMM profile building (HMMER, HHsuite) | trimAl `-gappyout` (Capella-Gutierrez et al 2009 Bioinf) | Aggressive gap removal acceptable; profile quality benefits |\n| Selection \u002F dN\u002FdS analysis (PAML, HyPhy) | TCS column masking or GUIDANCE2 (NOT aggressive trimming) | Removing columns causes false-positive selection signals (Fletcher & Yang 2010 MBE) |\n| Deep prokaryotic phylogenomics | BMGE (Criscuolo & Gribaldo 2010 BMC Evol Biol) | Entropy-based with BLOSUM62 context; standard in GToTree pipeline |\n| Cross-contaminated sequences | HMMcleaner (Di Franco et al 2019 BMC Evol Biol) | Per-residue cleaning; targets contamination not column quality |\n| Preserve phylogenetic signal in indels | Divvier (Ali, Bogusz & Whelan 2019 MBE) | Splits ambiguous columns rather than removing them |\n| Column-mapping retention for site analysis | trimAl `-colnumbering` | Outputs original-column indices for downstream cross-reference |\n| Codon-aware trimming | MACSE `trimAlignment` (Ranwez et al 2018 MBE) | Preserves codon boundaries; pairs with MACSE codon MSA |\n\n## ClipKIT Modes\n\nPick a `-m` mode by what the downstream task needs the alignment to KEEP. Run `clipkit --help` for the full list of 15 modes.\n\n| Pick this mode | When |\n|----------------|------|\n| `smart-gap` | Default for single genes and supermatrices (ClipKIT's own default); keeps singleton and constant columns, so branch lengths are preserved |\n| `kpic-smart-gap` | Topology-focused option for taxonomically balanced datasets only. Drops all singleton columns (typically 40-55% of a gene). Always compare outgroup\u002Fstem branch lengths before vs after; do not use when branch lengths feed dating, rate estimates or rooting |\n| `gappy` \u002F `gappyout` | Need an explicit gap threshold or trimAl-like behaviour |\n| `kpi-smart-gap` \u002F `kpi` | Parsimony-only input. Drops constant AND singleton columns, which inflates ML branch lengths; do not use for ML\u002FBayesian trees |\n| `c3` \u002F `cst` \u002F `entropy` \u002F `block-gappy` \u002F `composition-bias` \u002F `heterotachy` | Specialist needs: third-codon stripping, manual masks, entropy thresholding, conserved-block preservation, long-branch mitigation, or heterotachy filtering -- consult `clipkit --help` |\n\n**Goal:** Run ClipKIT on an MSA with the mode appropriate to the downstream goal.\n\n**Approach:** Pick a `-m` mode from the table above, optionally enable `--log` for reproducibility, and write the trimmed alignment in the desired format.\n\n```bash\nclipkit input.fasta -m smart-gap -o trimmed.fasta\nclipkit input.fasta -m gappy -g 0.9 -o trimmed.fasta\nclipkit input.fasta -m smart-gap -of phylip -o trimmed.phy\nclipkit input.fasta -m smart-gap --log -o trimmed.fasta\n```\n\nThe `--log` flag writes `\u003Coutput>.log` with a per-column kept\u002Fremoved record -- essential for reproducibility audits. ClipKIT also has a Python API (`clipkit.api.clipkit`) for in-memory trimming.\n\n### ClipKIT kpic Failure Modes\n\n`kpic` keeps parsimony-informative sites (\"at least 2 sequences with each of at least 2 different residues\") and constant sites, and removes singletons. On taxonomically unbalanced datasets (e.g. many close relatives + a few outgroups), a column where a single outgroup carries a private state is a singleton and is removed, so much of the outgroup-vs-ingroup signal is lost. In a simulated 30-strain + 3-outgroup DNA alignment, `kpic-smart-gap` removed most such columns: topology was unchanged, but the ingroup\u002Foutgroup stem length went from 0.44 to 1.2 substitutions\u002Fsite (true 0.44) and one outgroup's terminal branch collapsed to 0. `smart-gap` left every branch length unchanged. Mitigations:\n- Use `smart-gap` on unbalanced datasets and whenever branch lengths matter (dating, rates, rooting)\n- If `kpic-smart-gap` is used, compare outgroup stem and terminal branch lengths before vs after trimming; if they move, discard the kpic result\n- ClipKIT's site classification is count-based and unweighted (no sequence weighting by clade); manual subsampling to balance clades is the practical fix\n\nBMGE's `-w` option is a sliding window for smoothing entropy values (default 3), not a clade-aware weighting.\n\n## trimAl Modes\n\nPick a trimAl mode by downstream tool. `-gappyout` for HMM profile builds, `-gappyout` or explicit `-strict` for ML tree input (`-strictplus` is documented by trimAl as optimized for Neighbour Joining), `-automated1` (documented as optimized for ML) only when audit-grade reproducibility is not required (heuristic has changed across point releases).\n\n| Mode | Flag | Description |\n|------|------|-------------|\n| Automated heuristic | `-automated1` | Picks `gappyout`, `strict`, or `strictplus` based on alignment characteristics |\n| Gap-only | `-gappyout` | Automatic gap-fraction threshold from gap distribution |\n| Strict | `-strict` | Combined gap + similarity criterion |\n| Strict-plus | `-strictplus` | Stricter than `-strict`; optimized for Neighbour Joining per trimAl help |\n| Manual gap | `-gt 0.5` | Remove columns with > 50% gaps (set fraction explicitly) |\n| Manual similarity | `-st 0.5` | Remove columns with similarity below threshold |\n| Manual conservation | `-cons 60` | Keep at least 60% of original columns regardless of other criteria |\n| Sequence-quality | `-resoverlap 0.8 -seqoverlap 75` | Remove sequences with poor residue\u002Fsequence overlap |\n| HTML report | `-htmlout report.html` | Visual diff of kept\u002Fremoved columns |\n| Column mapping | `-colnumbering` | Output original column indices preserved |\n\n**Goal:** Trim an MSA with trimAl using a heuristic or manual threshold suited to the downstream tool.\n\n**Approach:** Select an automated mode (`-automated1`, `-gappyout`, `-strict`; `-strictplus` for NJ) for typical use, or compose `-gt`, `-st`, `-cons` thresholds for manual control; export an HTML diff or column index mapping when audit-grade reproducibility is required.\n\n```bash\ntrimal -in input.fasta -out trimmed.fasta -automated1\ntrimal -in input.fasta -out trimmed.fasta -gappyout\ntrimal -in input.fasta -out trimmed.fasta -strictplus -htmlout report.html\ntrimal -in input.fasta -out trimmed.fasta -gt 0.3 -st 0.5 -cons 60 -colnumbering > columns.txt\n```\n\n`-gappyout` is the recommended choice for HMM profile building (HMMER `hmmbuild` benefits from aggressive gap removal). For ML tree input use `-gappyout` or `-strict`; `-strictplus` is NJ-oriented and was the only trimAl mode that lost topological accuracy in a 10-replicate simulated check. `-automated1` is the fallback when characterising the dataset is impractical (it chose `-strict` and removed 61% of columns on one 15-sequence protein alignment -- check retention).\n\n**Reproducibility note:** `trimAl -automated1` selects between `gappyout`, `strict`, and `strictplus` via internal heuristics that have changed between releases. For audit-grade reproducibility, do NOT use `-automated1`; specify the underlying mode explicitly and record `trimal --version` in pipeline manifests.\n\n## BMGE: Block Mapping and Gathering with Entropy\n\nUse BMGE for deep prokaryotic phylogenomics (the GToTree default) or whenever entropy-based, matrix-aware column filtering is preferred over gap-only heuristics.\n\n**Goal:** Filter MSA columns by matrix-aware entropy and gap-rate thresholds, particularly for deep prokaryotic phylogenomics.\n\n**Approach:** Invoke BMGE with `-t` (sequence type) and tune the entropy and gap-rate thresholds against the divergence depth of the dataset; recalibrate the entropy threshold if the substitution matrix is changed via `-m`. BMGE 1.12 and 2.0 use different flags: on 2.0, `-h` prints help and exits 0 without writing anything, so always check that the output file exists and is non-empty.\n\n```bash\n# BMGE 1.12\njava -jar BMGE.jar -i input.fasta -t AA  -h 0.5 -g 0.2 -of trimmed.fasta\njava -jar BMGE.jar -i input.fasta -t DNA -m DNAPAM100:2 -h 0.5 -g 0.2 -of trimmed.fasta\n\n# BMGE 2.0 (entropy is -e; types AA|CO|NT; output -o or -of)\njava -jar BMGE.jar -i input.fasta -t AA -e 0.5 -g 0.2 -o trimmed.fasta\njava -jar BMGE.jar -i input.fasta -t NT -m DNAPAM100:2 -e 0.5 -g 0.2 -o trimmed.fasta\n\ntest -s trimmed.fasta || echo \"BMGE wrote no alignment: check flags against the installed version\"\n```\n\n| Meaning | BMGE 1.12 | BMGE 2.0 |\n|---------|-----------|----------|\n| Entropy threshold (lower = more aggressive) | `-h`, default 0.5 | `-e`, default 0.5 |\n| Gap rate threshold | `-g`, default 0.2 | `-g`, default 0.5 |\n| Substitution matrix | `-m`, default BLOSUM62 (AA) | `-m`, default BLOSUM30 (AA) \u002F DNAPAM180:2 (NT) |\n| Sequence type (required) | `-t AA`, `CODON`, `DNA` | `-t AA`, `CO`, `NT` |\n| Minimum block size | `-b`, default 5 | `-b`, default 3 |\n| Help | -- | `-h` |\n\nLower entropy thresholds trim much harder: on a simulated deep 16-taxon protein supermatrix, BMGE 1.12 `-h 0.4 -g 0.2` removed 87% of columns, shrank tree length from 12.5 (true) to 8.4 and lowered support, while `-h 0.5` removed 71%. Check retention against the 20%\u002F40% rule and compare trees before lowering the threshold.\n\n**Matrix-aware threshold:** BMGE computes entropy weighted by the chosen substitution-matrix probabilities. Entropy thresholds are calibrated for the version's default matrix (BLOSUM62 in 1.12, BLOSUM30 in 2.0). Switching to `-m BLOSUM30` (deep phylogenomics) makes the same numeric `-h` more permissive; `-m BLOSUM90` (close orthologs) makes it more aggressive. When using a non-default matrix, recalibrate by running on a known-good benchmark before applying.\n\n## Divvier: Column Splitting Instead of Removal\n\nUse Divvier when phylogenetic signal in indels matters and pure removal would discard block-boundary information; it splits ambiguous columns rather than dropping them.\n\n```bash\n# Divvier ships as a compiled binary; invoke as .\u002Fdivvier or `divvier` if on PATH\n.\u002Fdivvier -divvy input.fasta\n\n.\u002Fdivvier -partial -mincol 4 -divvygap input.fasta\n```\n\n`-divvy` (default) outputs `input.fasta.divvy.fas` (full divvying); `-partial` only filters individual ambiguous characters. `-mincol N` sets the minimum number of confident characters required to keep a split column (integer count, default 2). `-divvygap` writes gaps instead of asterisks for phylogenetics-tool compatibility. Divvier is particularly useful when input alignments have many short conserved blocks separated by ambiguous regions -- removing the regions discards information about block boundaries that splitting preserves.\n\nMaintenance note: Divvier's last release was 2019 (`simonwhelan\u002FDivvier`); the tool is no longer actively maintained but results remain reproducible with the v2019 binary.\n\n## HMMcleaner: Per-Residue Cleaning\n\nRun HMMcleaner before column trimming when cross-contamination or annotation errors are suspected; it masks suspect residues with `X` rather than removing columns. Apply only to alignments with >= 15 sequences (below that the per-residue pHMM has too little signal and over-flags divergent residues).\n\n```bash\nHmmCleaner.pl input.fasta\n```\n\nOutput is `input_hmm.fasta` with low-confidence residues masked. Used in OrthoMaM and Compositional Heterogeneity-aware phylogenomic pipelines where cross-contamination from sequencing or annotation errors is suspected.\n\n**Sample-size sensitivity:** HMMcleaner builds a per-residue HMM from the OTHER sequences at each position, so on small alignments (\u003C15 sequences) the HMM has insufficient signal and over-flags real divergent residues as contamination. Di Franco et al 2019 show two related effects: pHMMs built from few sequences carry less signal, lowering HMMcleaner sensitivity, and its false positives are driven mainly by evolutionary divergence -- specificity falls with gap frequency, evolutionary rate, and the fraction of ambiguously-aligned regions rather than by a fixed sequence count (global specificity ~94% at default settings). OrthoMaM v11 and PhyloHerb pipelines apply HMMcleaner only to alignments with >= 15 sequences. For smaller alignments, manual inspection or BLAST-based contamination screening is more reliable.\n\n## Gblocks: The Legacy Default\n\nUse Gblocks only when matching a legacy pipeline; prefer ClipKIT or trimAl for new work. Default parameters are too aggressive -- relax them. `-b1` and `-b2` are integer sequence COUNTS, not percentages: `-b1` must be greater than half the number of sequences N (default N\u002F2 + 1), and `-b2` at least `-b1` (default 85% of N). Relaxed example for N = 20 sequences:\n\n```bash\nGblocks input.fasta -t=p -b1=11 -b2=11 -b3=10 -b4=5 -b5=h\n```\n\n## PhyIN: Phylogenetic Incompatibility Trimming\n\nPhyIN (Maddison 2024 PeerJ) is a complementary trimmer that flags neighbouring columns whose split patterns are phylogenetically incompatible (i.e. cannot share a tree). It targets a different failure mode than gap-based or entropy-based trimmers: ClipKIT, trimAl, and BMGE all evaluate columns independently, so a region with consistent gap structure passes their filters even if its character patterns are pairwise tree-incompatible (alignment artefact). PhyIN catches that case.\n\n```bash\n# PhyIN v1.0 is a single Python script; DNA\u002FRNA FASTA alignments only\npython phyin.py -input input.fasta -output trimmed.fasta -b 10 -d 2 -p 0.5\n```\n\n`-b` block length over which conflict is assessed, `-d` neighbour distance surveyed, `-p` proportion of conflicting neighbours that triggers removal; `-e` \u002F `-not.e` treat gaps as an extra state or not. Use PhyIN as a SECOND-PASS trimmer after ClipKIT\u002FtrimAl when alignment artefact is the suspected source of incongruence in a phylogenomic dataset; not a replacement for first-pass column filtering. PhyIN's incompatibility test is signal-direction agnostic, so it does not distinguish \"the alignment is wrong here\" from \"true incongruent locus\" (e.g. introgression, ILS); only gene-tree comparison after tree-building can disambiguate. Reference: PeerJ 2024 paper.\n\n## Decision Tree by Downstream Goal\n\n```\nWhat is the next step?\n+- Phylogenetic ML tree (RAxML, IQ-TREE)\n|  +- Concatenated supermatrix? -> ClipKIT smart-gap per locus, then concatenate\n|  +- Single gene? -> ClipKIT smart-gap or trimAl -automated1\n|  +- Topology only, balanced taxa? -> kpic-smart-gap allowed, with the branch-length check\n|  +- Deep prokaryotic? -> BMGE at its default entropy threshold; check retention\n|  +- Suspected cross-contamination? -> HMMcleaner first, then ClipKIT\n|\n+- Bayesian inference (MrBayes, BEAST)\n|  +- Same as ML; trimming is acceptable but log column mapping\n|\n+- HMM profile (HMMER hmmbuild, HHsuite)\n|  +- trimAl -gappyout (aggressive gap removal helps profile quality)\n|\n+- Selection analysis (PAML codeml, HyPhy)\n|  +- DO NOT aggressively trim\n|  +- Use TCS column masking (T-Coffee -evaluate) or GUIDANCE2\n|  +- See alignment\u002Fmultiple-alignment confidence assessment\n|\n+- Sequence logo \u002F motif scan\n   +- Light gap-only trim (trimAl -gt 0.5)\n   +- Preserve all variable positions\n```\n\n## TCS Column Masking for Selection Analysis\n\nTCS (Chang et al 2014 MBE) scores each column on a 0-9 scale by consistency across a pairwise-alignment library. The recommended dN\u002FdS workflow:\n\n**Goal:** Mask unreliable columns before selection analysis to prevent alignment errors from inflating false-positive dN\u002FdS calls.\n\n**Approach:** Build a library-rich consistency score via M-Coffee, evaluate the alignment against that library to obtain per-column TCS scores, then keep columns at or above a chosen confidence threshold using `seq_reformat`.\n\n```bash\n# 1. Generate library-rich consistency scores via M-Coffee (combines libraries from MAFFT, MUSCLE, ClustalW, ProbCons)\nt_coffee input.fasta -mode mcoffee -output fasta_aln -outfile aligned.fasta\n\n# 2. Compute per-column TCS scores; T-Coffee writes aligned.score_ascii itself (not to stdout)\nt_coffee -infile aligned.fasta -mode evaluate -output score_ascii\n\n# 3. Filter COLUMNS at a chosen threshold (5-9 = retain columns scoring 5 or higher).\n#    +use_cons +keep acts on column scores; +keep alone keeps individual residues within the range.\nt_coffee -other_pg seq_reformat -in aligned.fasta -struc_in aligned.score_ascii \\\n    -struc_in_f number_aln -action +use_cons +keep '[5-9]' -output fasta_aln > aligned_tcs5.fasta\n```\n\nThreshold guidance: TCS >= 5 retains columns confidently aligned by the majority of library methods; TCS >= 7 is a stricter operational convention on the seq_reformat 0-9 display scale. Chang et al 2014 do not prescribe an integer 5\u002F7 cutoff -- on BAliBASE 3 and PREFAB 4 structural benchmarks they keep residues scoring above ~0.6 on the native 0-1 scale and drop columns scoring below 2, with TCS outperforming GUIDANCE and HoT. TCS-from-mcoffee gives substantially better column-confidence ranking than TCS-from-default-tcoffee because the library is more diverse. For the PAML branch-site test, Fletcher & Yang 2010 showed alignment errors inflate false positives dramatically (up to ~0.99 with ClustalW, ~0.13 even with codon-aware PRANK) and that removing gappy columns did not reduce them; confidence-based column masking (TCS, GUIDANCE2) is a common mitigation but was not evaluated in that study, since TCS postdates it (Chang et al 2014).\n\n## MACSE Frameshift Markers Need Post-Processing\n\nMACSE encodes detected frameshifts as `!` (within-codon insertion) and `*` (premature stop) in the nucleotide output. PAML codeml does not accept `!`: codeml 4.10.10 stops with \"Error in sequence data file\" (and still exits 0), so replace `!` before every codeml run; HyPhy `BUSTED`\u002F`MEME` interpret `!` as `N` but `*` triggers a parse error mid-sequence. Standard cleanup before downstream analysis:\n\n**Goal:** Convert MACSE frameshift and stop markers into formats that PAML and HyPhy will parse correctly.\n\n**Approach:** Replace `!` with gaps for PAML, and use MACSE's own `exportAlignment` sub-program to replace both frameshift codons and internal stops for HyPhy-safe output.\n\n```bash\n# Convert frameshift markers to gaps (PAML)\nsed -e '\u002F^>\u002F!s\u002F!\u002F-\u002Fg' aligned_nt.fasta > aligned_paml.fasta\n# Replace frameshift codons and internal stops (HyPhy); checked on MACSE 2.07\njava -jar macse_v2.jar -prog exportAlignment -align aligned_nt.fasta \\\n    -codonForFinalStop --- -codonForInternalStop NNN \\\n    -codonForInternalFS --- -charForRemainingFS - \\\n    -out_NT aligned_hyphy.fasta -out_AA aligned_hyphy_aa.fasta\n```\n\n`-codonForInternalStop NNN` replaces internal stops with `NNN`; `-codonForInternalFS ---` and `-charForRemainingFS -` remove the `!` frameshift markers, which `exportAlignment` otherwise leaves in place. Without this step, the dN\u002FdS run silently produces results that do not correspond to the alignment shown.\n\n## Aggressiveness Cap\n\nFor gap- and entropy-based modes, compute the retained-column fraction and apply the 20%\u002F40% rule above: warn if retention drops below 0.6 (more than 40% removed).\n\n```python\ndef trimming_fraction(input_alignment, trimmed_alignment):\n    return trimmed_alignment.get_alignment_length() \u002F input_alignment.get_alignment_length()\n```\n\nIf retention drops below 0.6, switch to a less aggressive setting or accept the original alignment unfiltered. For ClipKIT `kpic*`\u002F`kpi*` modes the fraction is not informative (they remove singleton columns by design); compare the trimmed tree's topology and branch lengths with the untrimmed tree instead.\n\n## Column Mapping for Reproducibility\n\nWhen trimming for phylogenetic input, retain the column-index mapping so downstream site-specific analyses (selection per site, structure-mapped residues, etc.) can be back-traced:\n\n```bash\ntrimal -in input.fasta -out trimmed.fasta -automated1 -colnumbering > kept_columns.txt\n\nclipkit input.fasta -m smart-gap --log -o trimmed.fasta\n```\n\nThese two flags emit different formats (checked on trimAl 1.4.1 and ClipKIT 2.14.0). `trimal -colnumbering` prints one line on stdout: `#ColumnsMap`, a tab, then a comma-separated list of the 0-based original column indices that survived (`#ColumnsMap\t0, 1, 2, 4, ...`). `clipkit --log` writes `\u003Coutput>.log` with one space-separated row per original column: 1-based position, `keep`\u002F`trim`, site class (`constant`, `parsimony-informative`, `singleton`, `other`), gap fraction (e.g. `1 keep constant 0.0`). Parse both into the same 0-based kept-column list:\n\n```python\nkept_trimal = [int(x) for x in open('kept_columns.txt').read().split('\\t', 1)[1].split(',')]\nkept_clipkit = [int(row.split()[0]) - 1 for row in open('trimmed.fasta.log') if row.split()[1] == 'keep']\n```\n\n## Common Errors\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| ClipKIT empty output | All columns failed `kpic` filter | Switch to `smart-gap` mode (less aggressive); check input for non-amino-acid characters |\n| trimAl \"all sequences are identical\" | Input has duplicates with no variation | Remove duplicate sequences first |\n| BMGE Java OutOfMemoryError | Default JVM heap too small | `java -Xmx16g -jar BMGE.jar` |\n| Divvier crashes on large input | Memory limits | Run on per-gene alignments rather than concatenated supermatrices |\n| HMMcleaner reports \"no contamination\" | Input alignment too small (\u003C 5 sequences) | Pool more sequences or skip per-residue cleaning |\n| Trimming removes 80%+ of columns | Mode too aggressive for divergent input | Switch to `smart-gap`, raise the BMGE entropy threshold, or skip trimming (`kpic-gappy` is no less aggressive than `kpic-smart-gap`) |\n| BMGE exits 0, prints usage, writes no file | BMGE 1.12 flags (`-h`, `-t DNA`) on BMGE 2.0 | Use `-e` and `-t NT`\u002F`CO` on 2.0; check the output with `test -s` |\n| IQ-TREE \"Too large site ID\" after trimming | Concatenated matrix trimmed; charsets still use untrimmed coordinates | Trim each locus, then concatenate and rebuild charsets |\n| codeml \"Error in sequence data file\" on MACSE output | `!` frameshift characters left in the alignment | Replace `!` (sed, or MACSE `exportAlignment -codonForInternalFS ---`) |\n\n## Related Skills\n\n- alignment\u002Fmultiple-alignment - Generate the input MSA before trimming; confidence assessment (GUIDANCE2, TCS, MUSCLE5 ensemble) for selection-analysis input\n- alignment\u002Fmsa-parsing - Parse the trimmed alignment; sequence weighting; coordinate mapping\n- alignment\u002Fmsa-statistics - Compute conservation and gap statistics to inform mode selection\n- alignment\u002Fstructural-alignment - Trim structural MSAs the same way as sequence MSAs\n- phylogenetics\u002Fmodern-tree-inference - Build trees from trimmed alignments\n\n## References\n\n- Steenwyk JL, Buida TJ, Li Y, Shen XX, Rokas A. 2020. ClipKIT: a multiple sequence alignment trimming software for accurate phylogenomic inference. PLOS Bio 18:e3001007.\n- Capella-Gutierrez S, Silla-Martinez JM, Gabaldon T. 2009. trimAl: a tool for automated alignment trimming in large-scale phylogenetic analyses. Bioinf 25:1972-1973.\n- Criscuolo A, Gribaldo S. 2010. BMGE: a new software for selection of phylogenetic informative regions from multiple sequence alignments. BMC Evol Biol 10:210.\n- Maddison WP. 2024. PhyIN: trimming alignments by phylogenetic incompatibilities among neighbouring sites. PeerJ 12:e18504.\n- Tan G, Muffato M, Ledergerber C, Herrero J, Goldman N, Gil M, Dessimoz C. 2015. Current methods for automated filtering of multiple sequence alignments frequently worsen single-gene phylogenetic inference. Syst Biol 64:778-791.\n- Fletcher W, Yang Z. 2010. The effect of insertions, deletions, and alignment errors on the branch-site test of positive selection. MBE 27:2257-2267.\n- Chang JM, Di Tommaso P, Notredame C. 2014. TCS: a new multiple sequence alignment reliability measure. MBE 31:1625-1637.\n","## Version Compatibility\n\nReference examples tested with: ClipKIT 2.14.0, trimAl 1.4.1, BMGE 1.12 and 2.0 (different flags, see below), MACSE 2.07, PAML 4.10.10, Divvier 1.01+, HMMcleaner (current CPAN release of `Bio::MUST::Apps::HmmCleaner`), BioPython 1.83+\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- CLI: `clipkit --version`, `trimal --version`, `BMGE --help`, `Divvier --help`\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.\n\n# Alignment Trimming\n\n**\"Remove unreliable columns from this MSA\"** -> Filter or split columns based on gap fraction, conservation, entropy, or per-residue quality.\n- CLI: `clipkit`, `trimal`, `BMGE`, `Divvier`, `HMMcleaner`\n- Python: post-process via Bio.AlignIO with custom column masks\n\n**\"Make this alignment publication-grade for phylogenetics\"** -> Apply ClipKIT's `smart-gap` mode (its default), or trimAl `-automated1`, then verify via tree-stability comparison before vs after trimming.\n\nTool choice and aggressiveness matter more than trimming vs not-trimming. Pick a mode by dataset character (table below), and always run a sensitivity check by building trees on trimmed and untrimmed alignments.\n\n### Pick a Trimming Mode by Dataset Character\n\n| Dataset character | Trimming effect | Recommended approach |\n|-------------------|-----------------|----------------------|\n| Deep-divergence orthologs (>500 Ma), saturated 3rd codons | Aggressive trimming can hurt | No trim or light gap-based trim (`smart-gap`); report sensitivity to trimming choice |\n| Mid-depth eukaryotic (animal phyla, fungal classes) | Light gap-based trimming usually neutral | ClipKIT `smart-gap`; confirm with trimmed vs untrimmed trees |\n| Shallow (within-genus) | All trimmers ~equivalent | Choose for downstream-tool compatibility |\n| Concatenated supermatrix with very long alignments (>10 kb) | Trimming removes gappy, poorly aligned regions | `smart-gap` or BMGE, run PER LOCUS before concatenation (trimming the concatenation invalidates partition charsets: IQ-TREE \"Too large site ID\") |\n| Single short genes (\u003C200 bp aligned) | Trimming amplifies stochastic error | Skip column trimming; use sequence-level outlier filtering |\n\n**The 20%\u002F40% rule (gap- and entropy-based trimming only).** Tan et al 2015 (Syst Biol) found that automated filtering frequently worsens single-gene trees. As an operational heuristic for modes that remove columns by gap content or entropy (ClipKIT `smart-gap`\u002F`gappy`\u002F`gappyout`, trimAl gap and similarity modes, BMGE, Gblocks): removing \u003C20% of columns is light trimming; if the trimmer removes >40% (retention \u003C 0.6), it is too aggressive for the dataset -- switch to a less aggressive setting or skip trimming. The heuristic does NOT apply to ClipKIT `kpic*`\u002F`kpi*` modes: they drop every singleton column (`kpi*` also every constant column) by design, so they routinely remove 40-55% of a single gene. Judge those modes only by comparing topology AND branch lengths against the untrimmed alignment, never by column fraction.\n\nAlways run a sensitivity analysis: build the tree on trimmed AND untrimmed alignments. If topology and support are stable across trimming choices, the conclusion is robust; if unstable, report this and pick the result better supported by independent evidence (gene-tree concordance, biological priors).\n\n## Goal-Driven Tool Selection\n\n| Downstream goal | First-line tool | Rationale |\n|----------------|-----------------|-----------|\n| Phylogenetic-tree input (concatenated genes) | ClipKIT `smart-gap`, per locus (Steenwyk et al 2020 PLOS Bio) | ClipKIT 2.14.0 default; removes only gappy columns, so branch lengths stay close to the untrimmed tree |\n| Phylogenetic-tree input (single gene) | ClipKIT `smart-gap` | Default mode; dynamic gap-threshold determination |\n| HMM profile building (HMMER, HHsuite) | trimAl `-gappyout` (Capella-Gutierrez et al 2009 Bioinf) | Aggressive gap removal acceptable; profile quality benefits |\n| Selection \u002F dN\u002FdS analysis (PAML, HyPhy) | TCS column masking or GUIDANCE2 (NOT aggressive trimming) | Removing columns causes false-positive selection signals (Fletcher & Yang 2010 MBE) |\n| Deep prokaryotic phylogenomics | BMGE (Criscuolo & Gribaldo 2010 BMC Evol Biol) | Entropy-based with BLOSUM62 context; standard in GToTree pipeline |\n| Cross-contaminated sequences | HMMcleaner (Di Franco et al 2019 BMC Evol Biol) | Per-residue cleaning; targets contamination not column quality |\n| Preserve phylogenetic signal in indels | Divvier (Ali, Bogusz & Whelan 2019 MBE) | Splits ambiguous columns rather than removing them |\n| Column-mapping retention for site analysis | trimAl `-colnumbering` | Outputs original-column indices for downstream cross-reference |\n| Codon-aware trimming | MACSE `trimAlignment` (Ranwez et al 2018 MBE) | Preserves codon boundaries; pairs with MACSE codon MSA |\n\n## ClipKIT Modes\n\nPick a `-m` mode by what the downstream task needs the alignment to KEEP. Run `clipkit --help` for the full list of 15 modes.\n\n| Pick this mode | When |\n|----------------|------|\n| `smart-gap` | Default for single genes and supermatrices (ClipKIT's own default); keeps singleton and constant columns, so branch lengths are preserved |\n| `kpic-smart-gap` | Topology-focused option for taxonomically balanced datasets only. Drops all singleton columns (typically 40-55% of a gene). Always compare outgroup\u002Fstem branch lengths before vs after; do not use when branch lengths feed dating, rate estimates or rooting |\n| `gappy` \u002F `gappyout` | Need an explicit gap threshold or trimAl-like behaviour |\n| `kpi-smart-gap` \u002F `kpi` | Parsimony-only input. Drops constant AND singleton columns, which inflates ML branch lengths; do not use for ML\u002FBayesian trees |\n| `c3` \u002F `cst` \u002F `entropy` \u002F `block-gappy` \u002F `composition-bias` \u002F `heterotachy` | Specialist needs: third-codon stripping, manual masks, entropy thresholding, conserved-block preservation, long-branch mitigation, or heterotachy filtering -- consult `clipkit --help` |\n\n**Goal:** Run ClipKIT on an MSA with the mode appropriate to the downstream goal.\n\n**Approach:** Pick a `-m` mode from the table above, optionally enable `--log` for reproducibility, and write the trimmed alignment in the desired format.\n\n```bash\nclipkit input.fasta -m smart-gap -o trimmed.fasta\nclipkit input.fasta -m gappy -g 0.9 -o trimmed.fasta\nclipkit input.fasta -m smart-gap -of phylip -o trimmed.phy\nclipkit input.fasta -m smart-gap --log -o trimmed.fasta\n```\n\nThe `--log` flag writes `\u003Coutput>.log` with a per-column kept\u002Fremoved record -- essential for reproducibility audits. ClipKIT also has a Python API (`clipkit.api.clipkit`) for in-memory trimming.\n\n### ClipKIT kpic Failure Modes\n\n`kpic` keeps parsimony-informative sites (\"at least 2 sequences with each of at least 2 different residues\") and constant sites, and removes singletons. On taxonomically unbalanced datasets (e.g. many close relatives + a few outgroups), a column where a single outgroup carries a private state is a singleton and is removed, so much of the outgroup-vs-ingroup signal is lost. In a simulated 30-strain + 3-outgroup DNA alignment, `kpic-smart-gap` removed most such columns: topology was unchanged, but the ingroup\u002Foutgroup stem length went from 0.44 to 1.2 substitutions\u002Fsite (true 0.44) and one outgroup's terminal branch collapsed to 0. `smart-gap` left every branch length unchanged. Mitigations:\n- Use `smart-gap` on unbalanced datasets and whenever branch lengths matter (dating, rates, rooting)\n- If `kpic-smart-gap` is used, compare outgroup stem and terminal branch lengths before vs after trimming; if they move, discard the kpic result\n- ClipKIT's site classification is count-based and unweighted (no sequence weighting by clade); manual subsampling to balance clades is the practical fix\n\nBMGE's `-w` option is a sliding window for smoothing entropy values (default 3), not a clade-aware weighting.\n\n## trimAl Modes\n\nPick a trimAl mode by downstream tool. `-gappyout` for HMM profile builds, `-gappyout` or explicit `-strict` for ML tree input (`-strictplus` is documented by trimAl as optimized for Neighbour Joining), `-automated1` (documented as optimized for ML) only when audit-grade reproducibility is not required (heuristic has changed across point releases).\n\n| Mode | Flag | Description |\n|------|------|-------------|\n| Automated heuristic | `-automated1` | Picks `gappyout`, `strict`, or `strictplus` based on alignment characteristics |\n| Gap-only | `-gappyout` | Automatic gap-fraction threshold from gap distribution |\n| Strict | `-strict` | Combined gap + similarity criterion |\n| Strict-plus | `-strictplus` | Stricter than `-strict`; optimized for Neighbour Joining per trimAl help |\n| Manual gap | `-gt 0.5` | Remove columns with > 50% gaps (set fraction explicitly) |\n| Manual similarity | `-st 0.5` | Remove columns with similarity below threshold |\n| Manual conservation | `-cons 60` | Keep at least 60% of original columns regardless of other criteria |\n| Sequence-quality | `-resoverlap 0.8 -seqoverlap 75` | Remove sequences with poor residue\u002Fsequence overlap |\n| HTML report | `-htmlout report.html` | Visual diff of kept\u002Fremoved columns |\n| Column mapping | `-colnumbering` | Output original column indices preserved |\n\n**Goal:** Trim an MSA with trimAl using a heuristic or manual threshold suited to the downstream tool.\n\n**Approach:** Select an automated mode (`-automated1`, `-gappyout`, `-strict`; `-strictplus` for NJ) for typical use, or compose `-gt`, `-st`, `-cons` thresholds for manual control; export an HTML diff or column index mapping when audit-grade reproducibility is required.\n\n```bash\ntrimal -in input.fasta -out trimmed.fasta -automated1\ntrimal -in input.fasta -out trimmed.fasta -gappyout\ntrimal -in input.fasta -out trimmed.fasta -strictplus -htmlout report.html\ntrimal -in input.fasta -out trimmed.fasta -gt 0.3 -st 0.5 -cons 60 -colnumbering > columns.txt\n```\n\n`-gappyout` is the recommended choice for HMM profile building (HMMER `hmmbuild` benefits from aggressive gap removal). For ML tree input use `-gappyout` or `-strict`; `-strictplus` is NJ-oriented and was the only trimAl mode that lost topological accuracy in a 10-replicate simulated check. `-automated1` is the fallback when characterising the dataset is impractical (it chose `-strict` and removed 61% of columns on one 15-sequence protein alignment -- check retention).\n\n**Reproducibility note:** `trimAl -automated1` selects between `gappyout`, `strict`, and `strictplus` via internal heuristics that have changed between releases. For audit-grade reproducibility, do NOT use `-automated1`; specify the underlying mode explicitly and record `trimal --version` in pipeline manifests.\n\n## BMGE: Block Mapping and Gathering with Entropy\n\nUse BMGE for deep prokaryotic phylogenomics (the GToTree default) or whenever entropy-based, matrix-aware column filtering is preferred over gap-only heuristics.\n\n**Goal:** Filter MSA columns by matrix-aware entropy and gap-rate thresholds, particularly for deep prokaryotic phylogenomics.\n\n**Approach:** Invoke BMGE with `-t` (sequence type) and tune the entropy and gap-rate thresholds against the divergence depth of the dataset; recalibrate the entropy threshold if the substitution matrix is changed via `-m`. BMGE 1.12 and 2.0 use different flags: on 2.0, `-h` prints help and exits 0 without writing anything, so always check that the output file exists and is non-empty.\n\n```bash\n# BMGE 1.12\njava -jar BMGE.jar -i input.fasta -t AA  -h 0.5 -g 0.2 -of trimmed.fasta\njava -jar BMGE.jar -i input.fasta -t DNA -m DNAPAM100:2 -h 0.5 -g 0.2 -of trimmed.fasta\n\n# BMGE 2.0 (entropy is -e; types AA|CO|NT; output -o or -of)\njava -jar BMGE.jar -i input.fasta -t AA -e 0.5 -g 0.2 -o trimmed.fasta\njava -jar BMGE.jar -i input.fasta -t NT -m DNAPAM100:2 -e 0.5 -g 0.2 -o trimmed.fasta\n\ntest -s trimmed.fasta || echo \"BMGE wrote no alignment: check flags against the installed version\"\n```\n\n| Meaning | BMGE 1.12 | BMGE 2.0 |\n|---------|-----------|----------|\n| Entropy threshold (lower = more aggressive) | `-h`, default 0.5 | `-e`, default 0.5 |\n| Gap rate threshold | `-g`, default 0.2 | `-g`, default 0.5 |\n| Substitution matrix | `-m`, default BLOSUM62 (AA) | `-m`, default BLOSUM30 (AA) \u002F DNAPAM180:2 (NT) |\n| Sequence type (required) | `-t AA`, `CODON`, `DNA` | `-t AA`, `CO`, `NT` |\n| Minimum block size | `-b`, default 5 | `-b`, default 3 |\n| Help | -- | `-h` |\n\nLower entropy thresholds trim much harder: on a simulated deep 16-taxon protein supermatrix, BMGE 1.12 `-h 0.4 -g 0.2` removed 87% of columns, shrank tree length from 12.5 (true) to 8.4 and lowered support, while `-h 0.5` removed 71%. Check retention against the 20%\u002F40% rule and compare trees before lowering the threshold.\n\n**Matrix-aware threshold:** BMGE computes entropy weighted by the chosen substitution-matrix probabilities. Entropy thresholds are calibrated for the version's default matrix (BLOSUM62 in 1.12, BLOSUM30 in 2.0). Switching to `-m BLOSUM30` (deep phylogenomics) makes the same numeric `-h` more permissive; `-m BLOSUM90` (close orthologs) makes it more aggressive. When using a non-default matrix, recalibrate by running on a known-good benchmark before applying.\n\n## Divvier: Column Splitting Instead of Removal\n\nUse Divvier when phylogenetic signal in indels matters and pure removal would discard block-boundary information; it splits ambiguous columns rather than dropping them.\n\n```bash\n# Divvier ships as a compiled binary; invoke as .\u002Fdivvier or `divvier` if on PATH\n.\u002Fdivvier -divvy input.fasta\n\n.\u002Fdivvier -partial -mincol 4 -divvygap input.fasta\n```\n\n`-divvy` (default) outputs `input.fasta.divvy.fas` (full divvying); `-partial` only filters individual ambiguous characters. `-mincol N` sets the minimum number of confident characters required to keep a split column (integer count, default 2). `-divvygap` writes gaps instead of asterisks for phylogenetics-tool compatibility. Divvier is particularly useful when input alignments have many short conserved blocks separated by ambiguous regions -- removing the regions discards information about block boundaries that splitting preserves.\n\nMaintenance note: Divvier's last release was 2019 (`simonwhelan\u002FDivvier`); the tool is no longer actively maintained but results remain reproducible with the v2019 binary.\n\n## HMMcleaner: Per-Residue Cleaning\n\nRun HMMcleaner before column trimming when cross-contamination or annotation errors are suspected; it masks suspect residues with `X` rather than removing columns. Apply only to alignments with >= 15 sequences (below that the per-residue pHMM has too little signal and over-flags divergent residues).\n\n```bash\nHmmCleaner.pl input.fasta\n```\n\nOutput is `input_hmm.fasta` with low-confidence residues masked. Used in OrthoMaM and Compositional Heterogeneity-aware phylogenomic pipelines where cross-contamination from sequencing or annotation errors is suspected.\n\n**Sample-size sensitivity:** HMMcleaner builds a per-residue HMM from the OTHER sequences at each position, so on small alignments (\u003C15 sequences) the HMM has insufficient signal and over-flags real divergent residues as contamination. Di Franco et al 2019 show two related effects: pHMMs built from few sequences carry less signal, lowering HMMcleaner sensitivity, and its false positives are driven mainly by evolutionary divergence -- specificity falls with gap frequency, evolutionary rate, and the fraction of ambiguously-aligned regions rather than by a fixed sequence count (global specificity ~94% at default settings). OrthoMaM v11 and PhyloHerb pipelines apply HMMcleaner only to alignments with >= 15 sequences. For smaller alignments, manual inspection or BLAST-based contamination screening is more reliable.\n\n## Gblocks: The Legacy Default\n\nUse Gblocks only when matching a legacy pipeline; prefer ClipKIT or trimAl for new work. Default parameters are too aggressive -- relax them. `-b1` and `-b2` are integer sequence COUNTS, not percentages: `-b1` must be greater than half the number of sequences N (default N\u002F2 + 1), and `-b2` at least `-b1` (default 85% of N). Relaxed example for N = 20 sequences:\n\n```bash\nGblocks input.fasta -t=p -b1=11 -b2=11 -b3=10 -b4=5 -b5=h\n```\n\n## PhyIN: Phylogenetic Incompatibility Trimming\n\nPhyIN (Maddison 2024 PeerJ) is a complementary trimmer that flags neighbouring columns whose split patterns are phylogenetically incompatible (i.e. cannot share a tree). It targets a different failure mode than gap-based or entropy-based trimmers: ClipKIT, trimAl, and BMGE all evaluate columns independently, so a region with consistent gap structure passes their filters even if its character patterns are pairwise tree-incompatible (alignment artefact). PhyIN catches that case.\n\n```bash\n# PhyIN v1.0 is a single Python script; DNA\u002FRNA FASTA alignments only\npython phyin.py -input input.fasta -output trimmed.fasta -b 10 -d 2 -p 0.5\n```\n\n`-b` block length over which conflict is assessed, `-d` neighbour distance surveyed, `-p` proportion of conflicting neighbours that triggers removal; `-e` \u002F `-not.e` treat gaps as an extra state or not. Use PhyIN as a SECOND-PASS trimmer after ClipKIT\u002FtrimAl when alignment artefact is the suspected source of incongruence in a phylogenomic dataset; not a replacement for first-pass column filtering. PhyIN's incompatibility test is signal-direction agnostic, so it does not distinguish \"the alignment is wrong here\" from \"true incongruent locus\" (e.g. introgression, ILS); only gene-tree comparison after tree-building can disambiguate. Reference: PeerJ 2024 paper.\n\n## Decision Tree by Downstream Goal\n\n```\nWhat is the next step?\n+- Phylogenetic ML tree (RAxML, IQ-TREE)\n|  +- Concatenated supermatrix? -> ClipKIT smart-gap per locus, then concatenate\n|  +- Single gene? -> ClipKIT smart-gap or trimAl -automated1\n|  +- Topology only, balanced taxa? -> kpic-smart-gap allowed, with the branch-length check\n|  +- Deep prokaryotic? -> BMGE at its default entropy threshold; check retention\n|  +- Suspected cross-contamination? -> HMMcleaner first, then ClipKIT\n|\n+- Bayesian inference (MrBayes, BEAST)\n|  +- Same as ML; trimming is acceptable but log column mapping\n|\n+- HMM profile (HMMER hmmbuild, HHsuite)\n|  +- trimAl -gappyout (aggressive gap removal helps profile quality)\n|\n+- Selection analysis (PAML codeml, HyPhy)\n|  +- DO NOT aggressively trim\n|  +- Use TCS column masking (T-Coffee -evaluate) or GUIDANCE2\n|  +- See alignment\u002Fmultiple-alignment confidence assessment\n|\n+- Sequence logo \u002F motif scan\n   +- Light gap-only trim (trimAl -gt 0.5)\n   +- Preserve all variable positions\n```\n\n## TCS Column Masking for Selection Analysis\n\nTCS (Chang et al 2014 MBE) scores each column on a 0-9 scale by consistency across a pairwise-alignment library. The recommended dN\u002FdS workflow:\n\n**Goal:** Mask unreliable columns before selection analysis to prevent alignment errors from inflating false-positive dN\u002FdS calls.\n\n**Approach:** Build a library-rich consistency score via M-Coffee, evaluate the alignment against that library to obtain per-column TCS scores, then keep columns at or above a chosen confidence threshold using `seq_reformat`.\n\n```bash\n# 1. Generate library-rich consistency scores via M-Coffee (combines libraries from MAFFT, MUSCLE, ClustalW, ProbCons)\nt_coffee input.fasta -mode mcoffee -output fasta_aln -outfile aligned.fasta\n\n# 2. Compute per-column TCS scores; T-Coffee writes aligned.score_ascii itself (not to stdout)\nt_coffee -infile aligned.fasta -mode evaluate -output score_ascii\n\n# 3. Filter COLUMNS at a chosen threshold (5-9 = retain columns scoring 5 or higher).\n#    +use_cons +keep acts on column scores; +keep alone keeps individual residues within the range.\nt_coffee -other_pg seq_reformat -in aligned.fasta -struc_in aligned.score_ascii \\\n    -struc_in_f number_aln -action +use_cons +keep '[5-9]' -output fasta_aln > aligned_tcs5.fasta\n```\n\nThreshold guidance: TCS >= 5 retains columns confidently aligned by the majority of library methods; TCS >= 7 is a stricter operational convention on the seq_reformat 0-9 display scale. Chang et al 2014 do not prescribe an integer 5\u002F7 cutoff -- on BAliBASE 3 and PREFAB 4 structural benchmarks they keep residues scoring above ~0.6 on the native 0-1 scale and drop columns scoring below 2, with TCS outperforming GUIDANCE and HoT. TCS-from-mcoffee gives substantially better column-confidence ranking than TCS-from-default-tcoffee because the library is more diverse. For the PAML branch-site test, Fletcher & Yang 2010 showed alignment errors inflate false positives dramatically (up to ~0.99 with ClustalW, ~0.13 even with codon-aware PRANK) and that removing gappy columns did not reduce them; confidence-based column masking (TCS, GUIDANCE2) is a common mitigation but was not evaluated in that study, since TCS postdates it (Chang et al 2014).\n\n## MACSE Frameshift Markers Need Post-Processing\n\nMACSE encodes detected frameshifts as `!` (within-codon insertion) and `*` (premature stop) in the nucleotide output. PAML codeml does not accept `!`: codeml 4.10.10 stops with \"Error in sequence data file\" (and still exits 0), so replace `!` before every codeml run; HyPhy `BUSTED`\u002F`MEME` interpret `!` as `N` but `*` triggers a parse error mid-sequence. Standard cleanup before downstream analysis:\n\n**Goal:** Convert MACSE frameshift and stop markers into formats that PAML and HyPhy will parse correctly.\n\n**Approach:** Replace `!` with gaps for PAML, and use MACSE's own `exportAlignment` sub-program to replace both frameshift codons and internal stops for HyPhy-safe output.\n\n```bash\n# Convert frameshift markers to gaps (PAML)\nsed -e '\u002F^>\u002F!s\u002F!\u002F-\u002Fg' aligned_nt.fasta > aligned_paml.fasta\n# Replace frameshift codons and internal stops (HyPhy); checked on MACSE 2.07\njava -jar macse_v2.jar -prog exportAlignment -align aligned_nt.fasta \\\n    -codonForFinalStop --- -codonForInternalStop NNN \\\n    -codonForInternalFS --- -charForRemainingFS - \\\n    -out_NT aligned_hyphy.fasta -out_AA aligned_hyphy_aa.fasta\n```\n\n`-codonForInternalStop NNN` replaces internal stops with `NNN`; `-codonForInternalFS ---` and `-charForRemainingFS -` remove the `!` frameshift markers, which `exportAlignment` otherwise leaves in place. Without this step, the dN\u002FdS run silently produces results that do not correspond to the alignment shown.\n\n## Aggressiveness Cap\n\nFor gap- and entropy-based modes, compute the retained-column fraction and apply the 20%\u002F40% rule above: warn if retention drops below 0.6 (more than 40% removed).\n\n```python\ndef trimming_fraction(input_alignment, trimmed_alignment):\n    return trimmed_alignment.get_alignment_length() \u002F input_alignment.get_alignment_length()\n```\n\nIf retention drops below 0.6, switch to a less aggressive setting or accept the original alignment unfiltered. For ClipKIT `kpic*`\u002F`kpi*` modes the fraction is not informative (they remove singleton columns by design); compare the trimmed tree's topology and branch lengths with the untrimmed tree instead.\n\n## Column Mapping for Reproducibility\n\nWhen trimming for phylogenetic input, retain the column-index mapping so downstream site-specific analyses (selection per site, structure-mapped residues, etc.) can be back-traced:\n\n```bash\ntrimal -in input.fasta -out trimmed.fasta -automated1 -colnumbering > kept_columns.txt\n\nclipkit input.fasta -m smart-gap --log -o trimmed.fasta\n```\n\nThese two flags emit different formats (checked on trimAl 1.4.1 and ClipKIT 2.14.0). `trimal -colnumbering` prints one line on stdout: `#ColumnsMap`, a tab, then a comma-separated list of the 0-based original column indices that survived (`#ColumnsMap\t0, 1, 2, 4, ...`). `clipkit --log` writes `\u003Coutput>.log` with one space-separated row per original column: 1-based position, `keep`\u002F`trim`, site class (`constant`, `parsimony-informative`, `singleton`, `other`), gap fraction (e.g. `1 keep constant 0.0`). Parse both into the same 0-based kept-column list:\n\n```python\nkept_trimal = [int(x) for x in open('kept_columns.txt').read().split('\\t', 1)[1].split(',')]\nkept_clipkit = [int(row.split()[0]) - 1 for row in open('trimmed.fasta.log') if row.split()[1] == 'keep']\n```\n\n## Common Errors\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| ClipKIT empty output | All columns failed `kpic` filter | Switch to `smart-gap` mode (less aggressive); check input for non-amino-acid characters |\n| trimAl \"all sequences are identical\" | Input has duplicates with no variation | Remove duplicate sequences first |\n| BMGE Java OutOfMemoryError | Default JVM heap too small | `java -Xmx16g -jar BMGE.jar` |\n| Divvier crashes on large input | Memory limits | Run on per-gene alignments rather than concatenated supermatrices |\n| HMMcleaner reports \"no contamination\" | Input alignment too small (\u003C 5 sequences) | Pool more sequences or skip per-residue cleaning |\n| Trimming removes 80%+ of columns | Mode too aggressive for divergent input | Switch to `smart-gap`, raise the BMGE entropy threshold, or skip trimming (`kpic-gappy` is no less aggressive than `kpic-smart-gap`) |\n| BMGE exits 0, prints usage, writes no file | BMGE 1.12 flags (`-h`, `-t DNA`) on BMGE 2.0 | Use `-e` and `-t NT`\u002F`CO` on 2.0; check the output with `test -s` |\n| IQ-TREE \"Too large site ID\" after trimming | Concatenated matrix trimmed; charsets still use untrimmed coordinates | Trim each locus, then concatenate and rebuild charsets |\n| codeml \"Error in sequence data file\" on MACSE output | `!` frameshift characters left in the alignment | Replace `!` (sed, or MACSE `exportAlignment -codonForInternalFS ---`) |\n\n## Related Skills\n\n- alignment\u002Fmultiple-alignment - Generate the input MSA before trimming; confidence assessment (GUIDANCE2, TCS, MUSCLE5 ensemble) for selection-analysis input\n- alignment\u002Fmsa-parsing - Parse the trimmed alignment; sequence weighting; coordinate mapping\n- alignment\u002Fmsa-statistics - Compute conservation and gap statistics to inform mode selection\n- alignment\u002Fstructural-alignment - Trim structural MSAs the same way as sequence MSAs\n- phylogenetics\u002Fmodern-tree-inference - Build trees from trimmed alignments\n\n## References\n\n- Steenwyk JL, Buida TJ, Li Y, Shen XX, Rokas A. 2020. ClipKIT: a multiple sequence alignment trimming software for accurate phylogenomic inference. PLOS Bio 18:e3001007.\n- Capella-Gutierrez S, Silla-Martinez JM, Gabaldon T. 2009. trimAl: a tool for automated alignment trimming in large-scale phylogenetic analyses. Bioinf 25:1972-1973.\n- Criscuolo A, Gribaldo S. 2010. BMGE: a new software for selection of phylogenetic informative regions from multiple sequence alignments. BMC Evol Biol 10:210.\n- Maddison WP. 2024. PhyIN: trimming alignments by phylogenetic incompatibilities among neighbouring sites. PeerJ 12:e18504.\n- Tan G, Muffato M, Ledergerber C, Herrero J, Goldman N, Gil M, Dessimoz C. 2015. Current methods for automated filtering of multiple sequence alignments frequently worsen single-gene phylogenetic inference. Syst Biol 64:778-791.\n- Fletcher W, Yang Z. 2010. The effect of insertions, deletions, and alignment errors on the branch-site test of positive selection. MBE 27:2257-2267.\n- Chang JM, Di Tommaso P, Notredame C. 2014. TCS: a new multiple sequence alignment reliability measure. MBE 31:1625-1637.\n",{"name":5,"tool_type":24,"description":7,"primary_tool":25},"mixed","ClipKIT","main","e0956dc9606356ab78468936b502e55a365282e2","specialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-alignment-trimming",0,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists","https:\u002F\u002Fgithub.com\u002Fmrsonord2240","2026-10-12 03:19:04",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add mrsonord2240\u002Fopenscience-specialists --skill bio-alignment-trimming",{"tool":39,"command":40},"bunx","bunx skills add mrsonord2240\u002Fopenscience-specialists --skill bio-alignment-trimming",{"tool":42,"command":43},"pnpm","pnpm dlx skills add mrsonord2240\u002Fopenscience-specialists --skill bio-alignment-trimming","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-alignment-trimming\u002FSKILL.md",true,[47,53,57,61,65],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"examples\u002Fbmge_trim.py","SCRIPT","脚本",2458,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-alignment-trimming\u002Fexamples\u002Fbmge_trim.py",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"examples\u002Fclipkit_trim.py",2600,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-alignment-trimming\u002Fexamples\u002Fclipkit_trim.py",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"examples\u002Fdivvier_split.py",1585,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-alignment-trimming\u002Fexamples\u002Fdivvier_split.py",{"path":62,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":63,"sourceHtmlUrl":64},"examples\u002Ftrimal_modes.py",1835,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-alignment-trimming\u002Fexamples\u002Ftrimal_modes.py",{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"usage-guide.md","REFERENCE","参考文档",6078,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-alignment-trimming\u002Fusage-guide.md",[72,79,86,93,100,107],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7CW36A6QAGWFE2C008M1XPG","bio-workflows-metabolomics-pipeline","Orchestrates the untargeted LC-MS metabolomics pipeline end-to-end (xcms 4.x feature extraction, QC\u002Fdrift\u002Fnormalization, confidence-stratified annotation, permutation-validated statistics, background-aware pathway mapping), naming what each stage decides and where it silently fails. Use when running a full LC-MS metabolomics study from raw mzML to enriched pathways and needing the honest handoffs between stages. Each stage defers to its component skill for parameters and traps; for stable-isotope flux (a separate branch, not this untargeted flow) see metabolomics\u002Fisotope-tracing.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-workflows-metabolomics-pipeline\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7CW2Y18623NA2S1Y30FRQW1","bio-metabolomics-xcms-preprocessing","Programmatic untargeted LC-MS feature extraction in R with the modern xcms 4.x MsExperiment\u002FXcmsExperiment API, taking raw mzML to a feature table via CentWave peak detection, retention-time alignment, peak-density correspondence, gap-filling, CAMERA redundancy collapse, and built-in QC feature filtering. Use when converting centroided LC-MS runs into a features-by-samples matrix and deciding centWave\u002Fgrouping\u002Falignment parameters. For drift correction and QC\u002FCV filtering execution see metabolomics\u002Fnormalization-qc; for metabolite identification see metabolomics\u002Fmetabolite-annotation; for the MS-DIAL GUI alternative with MS2Dec deconvolution see metabolomics\u002Fmsdial-preprocessing; for downstream statistics see metabolomics\u002Fstatistical-analysis.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-xcms-preprocessing\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7CW2M364HVWPNQEKE2WP4PP","bio-metabolomics-statistical-analysis","Decision-grade statistical analysis for metabolomics intensity tables. Covers transformation and scaling (Pareto vs unit-variance as a hidden hypothesis), unsupervised structure (PCA\u002FHCA for QC), permutation-validated PLS-DA\u002FOPLS-DA (R2 vs Q2, double CV, VIP as heuristic), univariate testing (Welch\u002FMann-Whitney\u002FANOVA\u002FLMM with covariate adjustment), and dependence-aware multiple testing. Use when testing which metabolites differ, building or validating a discriminant model, choosing a scaling, or correcting many correlated tests. For sample-wise normalization\u002Fdrift correction see metabolomics\u002Fnormalization-qc; for ML classifiers and selection-inside-CV leakage see machine-learning\u002Fbiomarker-discovery and machine-learning\u002Fmodel-validation; for pathway interpretation see metabolomics\u002Fpathway-mapping; for design\u002Fpower\u002Fmultiplicity regime see experimental-design\u002Fmultiple-testing.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-statistical-analysis\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M7CW2BCBF851WYE03Z8XPEDQ","bio-metabolomics-pathway-mapping","Maps metabolomics results to biological pathways via over-representation (ORA), metabolite-set enrichment (MSEA\u002FQEA), mummichog\u002FPSEA on raw m\u002Fz peaks, and network-diffusion enrichment (FELLA), with correct background-set construction and honest interpretive ceilings. Use when interpreting differential metabolites or an untargeted LC-MS feature table in pathway context, choosing ORA vs MSEA vs mummichog vs topology, or setting the reference\u002Fbackground set. For annotation confidence levels feeding ORA see metabolomics\u002Fmetabolite-annotation; for gene-set concepts see pathway-analysis\u002Fgo-enrichment and pathway-analysis\u002Fgsea; for joint gene+metabolite pathways see multi-omics-integration\u002Fmofa-integration.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-pathway-mapping\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":19},"01M7CW21NSZMCPMF7D9CHJM718","bio-metabolomics-normalization-qc","Designs QC, corrects signal drift, removes batch effects, filters features, normalizes samples, and imputes missing values for untargeted LC-MS\u002FGC-MS metabolomics, framing each step as a measurement model that can create or erase biological signal. Use when processing a peak\u002Ffeature table before statistical analysis, choosing a drift-correction or sample-normalization method, deciding QC RSD vs D-ratio filtering, or handling left-censored missing values. The feature table is produced by metabolomics\u002Fxcms-preprocessing or metabolomics\u002Fmsdial-preprocessing; transformation\u002Fscaling for modeling defers to metabolomics\u002Fstatistical-analysis; cross-study design issues link to experimental-design\u002Fbatch-design.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-normalization-qc\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":19},"01M7CW1SWVM0NYHVE6Q7MA3G7R","bio-metabolomics-msdial-preprocessing","Runs the MS-DIAL preprocessing workflow (peak picking, MS2Dec spectral deconvolution, alignment, gap-filling) and imports the alignment-result table into R or Python with honest filtering. Use when preprocessing LC-MS DDA\u002FDIA (SWATH) or GC-MS raw data with MS-DIAL, deciding MS-DIAL vs XCMS, configuring the MSDIALCUI console run, or parsing an MS-DIAL export into a clean feature matrix. For programmatic R peak detection and the feature-table-as-artifact framing see metabolomics\u002Fxcms-preprocessing; for lipid annotation mode see metabolomics\u002Flipidomics; for MSI-level confidence honesty see metabolomics\u002Fmetabolite-annotation; for drift correction and QC see metabolomics\u002Fnormalization-qc.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-msdial-preprocessing\u002FSKILL.md",[],[]]