bootstrap.mulgene | R Documentation |
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.
bootstrap.mulgene(sequence,gene,name,boot,outfile="")
sequence |
data matrix |
gene |
location of each locus |
name |
taxa names of sequences |
boot |
the number of bootstrap samples |
outfile |
output file |
In the sequences matrix, the rows are "Taxa" and the columns are "sites".
The function generates a data file in phylip format.
Liang Liu lliu@uga.edu
bootstrap
#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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.