genotype.fsa: Calls alleles for a SNP genotyping experiment

genotype.fsaR Documentation

Calls alleles for a SNP genotyping experiment

Description

Calls alleles in experiments where fragments of different sizes are expected according to the allele.

genotype.closest.fsa selects for each allele the closest expected normalized peak height among the 0, 1 and 2 copy values provided in the design.

genotype.ratio.fsa calls an allele as absent, heterozygous or homozygous using fixed thresholds on the proportion of signal from a locus.

genotype.N1.fsa calls an allele as present if it exceeds a given proportion of the expected signal for 1 copy, as provided in the design. When a single allele is called present for a locus, it is considered homozygous.

Usage

  genotype.closest.fsa(x)
  genotype.ratio.fsa(x, homo = 0.85, hetero = c(0.3, 0.7))
  genotype.N1.fsa(x, threshold = 0.1)

Arguments

x

The fsa object to use, which must have a peaks attribute (see peaks.fsa). Peaks are expected to be named according to the LOCUS_ALLELE pattern. genotype.closest.fsa() expected optional N0, N1 and N2 columns with expected normalized heights for 0, 1 and 2 copies of the allele.

homo

Single numeric value, the ratio of the considered allele signal over all signal from this locus to call a homozygous allele. Similarly alleles below 1 - homo will be called "absent".

hetero

Numeric vector of length two, minimum and maximum ratios of the considered allele signal over all signal from this locus to call a heterozygous allele.

threshold

Single numeric value, the ratio of the considered allele signal over the expected value for 1n to call an allele.

Value

Returns x, with a new or updated genotypes attribute, a data.frame with a row for each locus :

call

The concatenation of the two called alleles, possibly with ?.

alleles

The comma-separated list of ratios observed for all alleles (genotype.ratio.fsa() only).

A calls vector attribute is also set, corresponding to the call column only.

Note

All three functions assume peaks to be named according to the following convention : "ALLELE - LOCUS".

Author(s)

Sylvain Mareschal

See Also

generic.process

Examples

  # Using a design file
  design <- designFile(system.file("extdata/design_SNP.conf", package="FSAtools"))
  
  # Example FSA file provided
  fsa <- read.fsa(system.file("extdata/fsa_SNP/A7840.fsa", package="FSAtools"))
  fsa <- align.fsa(
    fsa,
    channel = design$align.fsa$channel,
    outThreshold = design$align.fsa$outThreshold,
    useLadder = design$align.fsa$useLadder
  )
  fsa <- peaks.fsa(fsa, peaks=design$GLOBALS$PEAKS)
  
  # Genotype
  fsa <- genotype.ratio.fsa(fsa)
  print(attr(fsa, "genotypes"))
  print(attr(fsa, "calls"))

FSAtools documentation built on Aug. 19, 2023, 1:06 a.m.