Imports SNP genotype data from Illumina FinalReport files using data.table::fread and builds the SnpMatrix directly from the long-format calls. This is reliable even for very large files (millions of lines, hundreds of samples), where snpStats::read.snps.long may fail to read all samples. Empty or unreadable confidence values are treated as no calls. The original file on disk is never modified.

getGeno(...)

# S4 method for class 'ANY'
getGeno(
  path,
  fields = list(sample = 2, snp = 1, allele1 = 7, allele2 = 8, confidence = 9),
  codes = c("A", "B"),
  threshold = 0.15,
  sep = "\t",
  skip = 0,
  verbose = TRUE,
  every = NULL
)

Arguments

...

Additional optional arguments.

path

Path to the directory containing FinalReport.txt

fields

List specifying column indices (sample, snp, allele1, allele2, confidence)

codes

Allele codes (e.g., c("A", "B")); a genotype is coded as the count of codes[2] alleles (homozygous codes[1], heterozygous, homozygous codes[2]).

threshold

Confidence threshold; calls below it are set to missing

sep

Field separator

skip

Lines to skip

verbose

Logical; show progress

every

Deprecated; kept for backward compatibility and ignored.

Value

An SNPDataLong object