bootstrap.mulgene {phybase}R Documentation

Bootstrap sequences from multiple loci

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

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@oeb.harvard.edu

See Also

bootstrap

Examples

#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") #the output file is saved at "bootdata.txt"

[Package phybase version 1.1 Index]