← Về thư mục
📄 / / profiles / r-and-d / raw_evidence / OpenAI4S / skills / bioskills / bio-ecological-genomics-landscape-genomics / references / usage-guide.md

Landscape Genomics Usage Guide

Overview

Tests genotype-environment associations and identifies loci under local adaptation while correcting for the four-confound landscape (population structure, demographic history, background selection, sampling design). Covers LFMM2 latent factor mixed models with MANDATORY K selection via sNMF cross-entropy elbow (LEA 3), BayPass Core/AUX/C2/IS Bayesian framework with population-covariance matrix Omega (Gautier 2015), RDA / pRDA as the method-of-choice for polygenic adaptation per Forester 2018 (with the genotype-imputation requirement), OutFLANK demographically-calibrated FST outliers, pcadapt PC-based Mahalanobis scans, the Capblancq & Forester 2021 RDA Swiss-army-knife workflow including variance partitioning and adaptive indices, genomic-offset prediction (gradientForest, RONA, LFMM2offset, RDA-offset) WITH the Lind & Lotterhos 2025 three-regime prediction-novelty caveat, Lotterhos & Whitlock 2014 demographic confound + 2015 sampling-design optima (paired contrasts > random > transects under demographic concern), Wang & Bradburd 2014 IBD vs IBE, and Circuitscape + ResistanceGA for landscape resistance.

Prerequisites

Quick Start

Tell your AI agent what you want to do:

Example Prompts

LFMM2 with K Selection

"Run sNMF on my VCF for K=1...10 with 5 repetitions per K. Plot cross-entropy and pick K at the elbow. Pass that K to LFMM2 (LEA 3) and report genomic inflation factor (target ~1.0). Re-run at K-1 and K+1 for sensitivity; flag loci detected at only one K as lower-confidence."

Polygenic RDA: The Capblancq Workflow

"Implement Capblancq & Forester 2021 RDA workflow: (1) impute missing genotypes BEFORE RDA (mandatory; Forester 2018 benchmark assumes imputed data); (2) forward-select environmental predictors; (3) pRDA conditioning on Q-matrix; (4) variance partitioning into pure-env / pure-spatial / shared / residual; (5) GEA outliers at z > 3 on RDA axes 1-3."

BayPass Bayesian GEA

"Convert my VCF to BayPass allele-count format (NOT VCF directly). Run Core to estimate Omega; then AUX for environmental association with Bayes Factor reporting; consider C2 if binary group contrast is the question."

OutFLANK for Discrete Populations

"Run OutFLANK with LeftTrim=RightTrim=0.05 and Hmin=0.1 on my 5 discrete populations. Note: OutFLANK requires distinct populations; for continuous gradients use LFMM2 or RDA instead."

Genomic Offset with the Lind 2025 Caveat

"Predict genetic offset under SSP5-8.5 2070 using both gradientForest AND RDA-offset. CRITICAL: also compute prediction-novelty per location (Mahalanobis distance to training-data envelope). Annotate offset values with regime: 1 (interpolation), 2 (modest extrapolation), 3 (highly novel; uninformative or misleading per Lind 2025)."

Landscape Resistance

"Model landscape resistance with Circuitscape (Julia version) integrating ALL paths. Then optimize the resistance surface with ResistanceGA using MLPE genetic-distance random-effects."

What the Agent Will Do

  1. Identify the four-confound landscape applicable to the dataset (population structure, demographic history, background selection, sampling design) and pick methods that address each
  2. For GEA: select K for LFMM2 via sNMF cross-entropy elbow; report sensitivity at K-1, K+1; check genomic inflation factor lambda ~ 1.0
  3. For polygenic adaptation: impute missing genotypes BEFORE RDA (mandatory per Forester 2018 benchmark); run pRDA conditioning on Q-matrix; report variance partitioning per Capblancq & Forester 2021
  4. For monogenic adaptation in discrete populations: use OutFLANK with trimmed-tail null calibrated by demography
  5. For Bayesian inference with population-history correction: BayPass Core + AUX or C2 with Bayes Factor reporting
  6. For climate-change prediction: cross-validate genomic offset with gradientForest + RDA-offset + LFMM2offset; characterize prediction-novelty per location; cite Lind & Lotterhos 2025 caveat
  7. For sampling design: prefer paired contrasts at environmental endpoints; cite Lotterhos & Whitlock 2015
  8. For distinguishing IBD vs IBE: use dbRDA with geographic + environmental matrices (NOT partial Mantel)
  9. Apply Storey FDR (q < 0.05) for multiple-testing correction; report number of candidates AND overlap across methods

Tips