[Rcolony-commits] r59 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Aug 4 19:30:29 CEST 2009
Author: jonesor
Date: 2009-08-04 19:30:29 +0200 (Tue, 04 Aug 2009)
New Revision: 59
Modified:
pkg/R/build.colony.input.R
Log:
fixed allele frequency import.
Modified: pkg/R/build.colony.input.R
===================================================================
--- pkg/R/build.colony.input.R 2009-08-04 17:22:21 UTC (rev 58)
+++ pkg/R/build.colony.input.R 2009-08-04 17:30:29 UTC (rev 59)
@@ -172,6 +172,13 @@
;warning(paste("The number of defined loci ","(", colonyfile$n.loci,") does not equal the number of markers provided in the file selected (", dim(colonyfile$allele.frequency)[1]/2,").\n\n",sep=""),immediate.=TRUE)}
}
+x<-count.fields(colonyfile$AlleleFreqPATH)[seq(2,length(count.fields(colonyfile$AlleleFreqPATH)),2)]
+x<-paste(paste(x,collapse=" "),"!Number of alleles per locus",collapse=" ")
+
+write.table(x,name,append=TRUE,quote=FALSE,row.names=FALSE,col.names=FALSE,na="")}
+
+write.table(colonyfile$allele.frequency,name,append=TRUE,quote=FALSE,row.names=FALSE,col.names=FALSE,na="")}
+
colonyfile$allele.frequency[,1+dim(colonyfile$allele.frequency)[2]]<-c("!Allele frequency",rep("",dim(colonyfile$allele.frequency)[1]-1))
write.table(colonyfile$allele.frequency,name,append=TRUE,quote=FALSE,row.names=FALSE,col.names=FALSE,na="")}
More information about the Rcolony-commits
mailing list