Learn R Programming

poppr (version 1.1.5)

informloci: Remove all non-phylogentically informative loci

Description

This function will facilitate in removing phylogenetically uninformative loci from a genclone or genind object. The user can specify what is meant by phylogenetically uninformative with a specification of the cutoff percentage. Any loci under the cutoff will be removed. For convenience's sake, the default cutoff is set to 2 individuals.

Usage

informloci(pop, cutoff = 2/nInd(pop), quiet = FALSE)

Arguments

pop
a genclone or genind object.
cutoff
numeric. This is a number from 0 to 1 representing the minimum percentage of differentiating individuals. Defaults is 2 individuals.
quiet
logical. When quiet = TRUE, messages indicating the loci removed will be printed to screen. When quiet = FALSE, nothing will be printed to screen.

Value

  • A genind object with user-defined informative loci.

Details

This function works by analyzing the genotypes at each locus. This has the effect that if a locus has fixed heterozygotes for two alleles, it will be removed as all individuals are invariant.

Examples

Run this code
# Load the data set H3N2
data(H3N2)
pop(H3N2) <- H3N2$other$x$country
Nepal <- popsub(H3N2, "Nepal")

# Using the default 2 individuals.
N.inform <- informloci(Nepal)

# 5 individuals.
N.informfive <- informloci(Nepal, cutoff = 5/nInd(Nepal))

# 10 individuals. Too many. Gives warning.
N.informten <- informloci(Nepal, cutoff = 10/nInd(Nepal))

# Decimate (10\%)
N.informdecimated <- informloci(Nepal, cutoff = 0.1)

Run the code above in your browser using DataLab