diagCharNA: Identification of diagnostic molecular characters in...

Description Usage Arguments Value Author(s) References Examples

Description

This function is a tool for an automated identification of diagnostic molecular characters that allow to distinguish taxa within a nucleotide alignment. For each taxon given in taxOfInt, it identifies the diagnostic characters and returns their alignment positions, their types, the states that are characteristic for the taxon of interest and (in case of type 4 characters) the taxon that it was compared with.

Usage

1
2
diagCharNA(DNAbin, taxVector = dimnames(DNAbin)[[1]], taxOfInt = "all",
  types = c("type1", "type2", "type3"), gapValid = TRUE)

Arguments

DNAbin

An object (the nucleotide alignment) of class 'DNAbin'.

taxVector

The taxon vector. Default assumes that each row in the alignment belongs to a different taxon.

taxOfInt

A vector containing the taxa for which diagnostic molecular characters shall be extracted. Default is "all".

types

A vector containing the types of diagnostic molecular characters that shall be extracted. The types can be "all" or any combination of "type1", "type2", "type3" and "type4". Default is "type1", "type 2" and "type3".

gapValid

Boolean variable denoting if a gap can be a characteristic state for taxon i (and taxon l in case of type 4). Default is TRUE.

Value

diagCharNA returns a list, where each entry belongs to one taxon of interest. Each taxon of interest has a set of diagnostic molecular characters (position, type, characteristic states for taxon of interest, compared taxa) assigned to it. type1 means that the character is suitable to distinguish each individual of the taxon of interest from all individuals of the remaining taxa, and that it is fixed for one state in the taxon of interest. type2 means that the character is suitable to distinguish each individual of the taxon of interest from all individuals of the remaining taxa, and that it is not fixed for one state in the taxon of interest. type3 means that the character is suitable to distinguish some (but not all) individuals of the taxon of interest from all individuals of the remaining taxa. type4 means that the character is suitable to distinguish each individual of the taxon of interest from all individuals of at least one (but not all) other taxon while being fixed in both the taxon of interest and the compared taxa.

diagCharNA returns for each taxon of interest the following elements:

position

The positions of its diagnostic molecular characters.

type

The types of the diagnostic molecular characters.

states

The states that are characteristic for the taxon i of interest, i.e. states that are distinct from "n" and unique to the taxon of interest (in case of type 1, 2 or 3), or fixed in the taxon of interest (type 4).

compared taxa

Only relevant for type 4 characters. It contains the name x if the character is found to be a type 4 character of the taxon of interest when being compared to taxon x.

Author(s)

A. Luise Kuehn <[email protected]>

References

Kuehn, A.L., Haase, M. 2019. QUIDDICH: QUick IDentification of DIagnostic CHaracters.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#using a dataset from spider
#install.packages("spider")
library(spider)
data("anoteropsis")
anoTax <- sapply(strsplit(dimnames(anoteropsis)[[1]], split="_"),
	function(x) paste(x[1], x[2], sep="_"))
diagCharNA(anoteropsis, anoTax, taxOfInt="all")
diagCharNA(anoteropsis, anoTax, taxOfInt="all", types=c("type1","type2"))
#
#with loading of a fasta file
#install.packages("adegenet")
library(adegenet)
alignment <- fasta2DNAbin(paste0(find.package("quiddich"), "/extData/example.fasta"))
taxonVector <- as.vector(sapply(dimnames(alignment)[[1]], function(x) substr(x,1,4)))
diagCharNA(alignment, taxonVector)

quiddich documentation built on May 2, 2019, 9:32 a.m.