% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/duckhts.R
\name{rduckhts_score}
\alias{rduckhts_score}
\title{Compute Polygenic Scores}
\usage{
rduckhts_score(
  con,
  bcf_path,
  summary_path,
  use = NULL,
  columns = "PLINK",
  columns_file = NULL,
  q_score_thr = NULL,
  use_variant_id = FALSE,
  counts = FALSE,
  samples = NULL,
  force_samples = FALSE,
  regions = NULL,
  regions_file = NULL,
  regions_overlap = 1,
  targets = NULL,
  targets_file = NULL,
  targets_overlap = 0,
  apply_filters = NULL,
  include = NULL,
  exclude = NULL
)
}
\arguments{
\item{con}{A DuckDB connection with DuckHTS loaded}

\item{bcf_path}{Path to genotype VCF/BCF file}

\item{summary_path}{Path to summary-statistics file}

\item{use}{Optional dosage source (`"GT"`, `"DS"`, `"HDS"`, `"AP"`, `"GP"`, `"AS"`)}

\item{columns}{Optional summary preset (`"PLINK"`, `"PLINK2"`, `"REGENIE"`, `"SAIGE"`,
`"BOLT"`, `"METAL"`, `"PGS"`, `"SSF"`, `"GWAS-SSF"`)}

\item{columns_file}{Optional two-column summary header mapping file}

\item{q_score_thr}{Optional comma-separated p-value thresholds (e.g. `"1e-8,1e-6,1e-4"`)}

\item{use_variant_id}{Logical; if TRUE, match variants by ID instead of CHR+BP}

\item{counts}{Logical; if TRUE, include per-threshold matched-variant counts}

\item{samples}{Optional comma-separated list of sample names to subset (e.g. `"SAMP1,SAMP2"`)}

\item{force_samples}{Logical; if TRUE, ignore missing samples instead of erroring}

\item{regions}{Optional comma-separated region list (e.g. `"1:1000-2000,2:50-90"`)}

\item{regions_file}{Optional path to a regions file}

\item{regions_overlap}{Overlap mode for regions (`0`, `1`, or `2`). Default 1 (trim to region).}

\item{targets}{Optional comma-separated targets list}

\item{targets_file}{Optional path to a targets file}

\item{targets_overlap}{Overlap mode for targets (`0`, `1`, or `2`). Default 0 (record must start in region).}

\item{apply_filters}{Optional comma-separated FILTER names to keep (e.g. `"PASS,."`)}

\item{include}{Optional site expression (currently unsupported)}

\item{exclude}{Optional site expression (currently unsupported)}
}
\value{
A data frame with one row per sample and score/count columns.
}
\description{
Calls the DuckHTS `bcftools_score(...)` table function to compute sample-level
polygenic scores from one genotype VCF/BCF file and one summary-statistics file.
}
