% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geneSNP.R
\name{geneSNP}
\alias{geneSNP}
\title{Identifies Candidate Genes based on identified Single Nucleotide Polymorphisms (SNPs) from Genome Wide Association Studies (GWAS) Analysis}
\usage{
geneSNP(
  data_file,
  upstream = 1e+06,
  downstream = 1e+06,
  crop = "wheat",
  genome_source = "online",
  gff3_file = NULL
)
}
\arguments{
\item{data_file}{The input data in .csv format. (sample_data_wheat or sample_data_rice for demo purpose)}

\item{upstream}{The search window upstream of the current position of the SNP. (default: 1000000)}

\item{downstream}{The search window downstream of the current position of the SNP. (default: 1000000)}

\item{crop}{Either "wheat" or "rice". (default: wheat)}

\item{genome_source}{Character specifying either "online" (default Ensembl lookup) or "local" (uses a local GFF3 file).}

\item{gff3_file}{Path to a local custom .gff3 file. Only utilized if genome_source = "local".}
}
\value{
A data frame containing traits, SNP, search_window, gene_size, gene_id, and gene_type.
}
\description{
Identifies Candidate Genes based on identified Single Nucleotide Polymorphisms (SNPs) from Genome Wide Association Studies (GWAS) Analysis
}
\examples{
load(system.file("extdata", "precomputed_sample_results.rda", package = "geneNR"))
message(sample_results)
\dontrun{
result <- geneSNP("sample_data_wheat", 10000, 10000, crop = "wheat")
result <- geneSNP("sample_data_rice", 10000, 10000, crop = "rice")
# Local mapping workflow:
# gff_path <- system.file("extdata", "sample_crop.gff3", package = "geneNR")
# result <- geneSNP("sample_data_wheat", 500000, 500000, genome_source="local", gff3_file=gff_path)
}
}
