User Tools

Site Tools


molecular_diversity_indexes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
molecular_diversity_indexes [2008/01/28 11:40] – created heidimolecular_diversity_indexes [2008/07/22 13:31] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== mismatch distribution ====== +====== Molecular diversity indexes ====== 
-  * file: lines_Mismatch.r +  * file: lines_MolecDiversityIndexes.r 
-  * document page: 1+  * document page: 30
  
 \\ \\
 **code:** **code:**
 <code> <code>
 +#----read data------------------------------------------------------------------
 +Names <- scan("D:/Heidi/Master/R_Daten/SummaryStatistics/molec_diversity_indexes.txt",
 +               what="list", skip=6, nlines=1)
 +
 +Data <- read.table("D:/Heidi/Master/R_Daten/SummaryStatistics/molec_diversity_indexes.txt",
 +                    skip=8, row.names=1)
 +Data <- as.matrix(Data[1:(length(Data)-2)])
 +
 +#----draw plot------------------------------------------------------------------
 +plot(Data[1,], type="l", xlab="Population", ylab=" ", main="molecular diversity indexes",
 +     ylim=c(0, max(Data)), lwd=2, axes=FALSE)
 +     axis(side=2, at=c(0:max(Data)),ylim=c(0:max(Data)), labels=c(0:max(Data)))
 +     axis(side=1, at=c(0:length(Data[1,])), labels=Names[1:(length(Names)-2)], las=2, cex.axis=0.7)
 +     box()
 +     
 +     lines(Data[2,], lty=2)
 +     lines(Data[3,], lty=2)
 +    
 +     lines(Data[4,], col="red", lwd=2)
 +     lines((Data[4,]+ Data[5,]), lty=2, col="red")
 +     lines((Data[4,]- Data[5,]), lty=2, col="red")
 +    
 +     lines(Data[6,], col="blue", lwd=2)
 +     lines((Data[6,]+ Data[7,]), lty=2, col="blue")
 +     lines((Data[6,]- Data[7,]), lty=2, col="blue")
 +    
 +     lines(Data[8,], col="green", lwd=2)
 +     lines((Data[8,]+ Data[9,]), lty=2, col="green")
 +     lines((Data[8,]- Data[9,]), lty=2, col="green")
 +    
 +     legend("topleft", c("Theta k (CI 0.05)" , "Theta H (+/- sd)", "Theta S (+/- sd)", 
 +            "Theta pi (+/- sd)"), lty=1, bty="n", col=c("black", "red", "blue", "green"))
 +</code>
  
molecular_diversity_indexes.1201516815.txt.gz · Last modified: 2008/07/22 13:30 (external edit)