% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/duckhts.R
\name{rduckhts_liftover}
\alias{rduckhts_liftover}
\title{Lift Over Variant Coordinates Against a Query}
\usage{
rduckhts_liftover(
  con,
  query,
  chain_path,
  dst_fasta_ref,
  chrom_col = "chrom",
  pos_col = "pos",
  ref_col = NULL,
  alt_col = NULL,
  src_fasta_ref = NULL,
  max_snp_gap = 1,
  max_indel_inc = 250,
  lift_mt = FALSE,
  end_pos_col = NULL,
  no_left_align = FALSE
)
}
\arguments{
\item{con}{A DuckDB connection with DuckHTS loaded}

\item{query}{SQL query or table expression to lift over}

\item{chain_path}{Path to a UCSC chain file}

\item{dst_fasta_ref}{Path to the destination FASTA reference}

\item{chrom_col}{Source chromosome column name}

\item{pos_col}{Source 1-based position column name}

\item{ref_col}{Optional reference allele column name}

\item{alt_col}{Optional alternate allele column name}

\item{src_fasta_ref}{Optional source FASTA reference}

\item{max_snp_gap}{Maximum chain block merge gap}

\item{max_indel_inc}{Maximum indel anchor expansion}

\item{lift_mt}{If FALSE (default), mitochondrial variants with matching
source/destination contig lengths are passed through with only contig
rename. If TRUE, MT variants are lifted through the chain like any
other contig.}

\item{end_pos_col}{Optional column name containing INFO/END positions
(1-based) to lift alongside the primary position. When provided, the
output includes a `dest_end` column with the lifted end position.}

\item{no_left_align}{If FALSE (default), lifted indels are left-aligned
against the destination reference. Set TRUE to skip left-alignment,
mirroring \code{--no-left-align} in \code{bcftools +liftover}.}
}
\value{
A data frame with source columns, lifted coordinates/alleles, and warnings.
}
\description{
Applies the DuckHTS `duckdb_liftover(...)` table macro to rows from a SQL query or
table expression with chromosome and position columns, plus optional reference
and alternate alleles.
}
