checkAmbiguity: Check for ambiguities in a DNA sequence

Description Usage Arguments Details Value Author(s)

Description

Check for ambiguities or other characters that are not allowed in haplotypes.

Usage

1
2
checkAmbiguity(file, format = "fasta", quiet = FALSE, Namb = TRUE,
  simplify = TRUE, ...)

Arguments

file

path and file name for a DNA alignment (character)

format

format of the DNA alignment (passed to read.dna)

quiet

if FALSE, outputs as messages the ambiguities found (logical)

Namb

should Ns be considered ambiguities? (logical)

simplify

if TRUE, the returned object is reduced to only include the sequences that contain ambiguities. If FALSE, the returned object has the same length as the number of sequences in the alignment.

...

additional arguments to be passed to ape:::read.dna

Details

This function takes a DNA alignment and looks for characters in the sequence that are not A, C, T, G, -, ? (and optionally N). It ignores case.

Value

If there are no ambiguities, the function returns a zero-length integer vector. Otherwise, it returns a named list which includes for each sequence, the position in the alignment of the ambiguities for each sequence that has one or more ambiguities (if simplify=TRUE), and is named using the ambiguity. if quiet=FALSE, this vector is returned invisibly in addition of the

Author(s)

Francois Michonneau


fmichonneau/chopper documentation built on May 16, 2019, 1:43 p.m.