bootstrap.mulgene: Bootstrap sequences from multiple loci

Description Usage Arguments Details Value Author(s) See Also Examples

Description

The function bootstraps sequence columns for each locus sampled from the original multilocus data. It consists of two step. First, it bootstraps loci. Then it bootstraps sequences for each locus.

Usage

1
bootstrap.mulgene(sequence,gene,name,boot,outfile="")

Arguments

sequence

data matrix

gene

location of each locus

name

taxa names of sequences

boot

the number of bootstrap samples

outfile

output file

Details

In the sequences matrix, the rows are "Taxa" and the columns are "sites".

Value

The function generates a data file in phylip format.

Author(s)

Liang Liu lliu@uga.edu

See Also

bootstrap

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#construct the DNA sequences of three taxa
seq <- matrix("A",ncol=4,nrow=3)
rownames(seq)<-c("taxa1","taxa2","taxa3")
seq[,2]<-"G"
seq[,3]<-"C"
seq[,4]<-"T" 

name<-rownames(seq) #taxa names of the sequences

#construct two loci. The first two nucleotides represent the first locus, 
#while nucleotide 3 and 4 represent the second locus.
gene<-matrix(0,ncol=2,nrow=2)
gene[1,]<-c(1,2)
gene[2,]<-c(3,4)
gene          
bootstrap.mulgene(seq,gene,name,boot=2,outfile="bootdata.txt")

bomeara/phybase documentation built on May 12, 2019, 11:35 p.m.