[Genabel-commits] r1424 - in pkg/GenABEL.data: . R data inst/extdata

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 27 19:26:37 CET 2013


Author: maksim
Date: 2013-11-27 19:26:37 +0100 (Wed, 27 Nov 2013)
New Revision: 1424

Added:
   pkg/GenABEL.data/R/
   pkg/GenABEL.data/R/ge03d2c.R
   pkg/GenABEL.data/R/ge03d2ex.R
   pkg/GenABEL.data/R/srdta.R
   pkg/GenABEL.data/data/clean.R
   pkg/GenABEL.data/data/ge03d2c.RData
   pkg/GenABEL.data/data/ge03d2ex.RData
   pkg/GenABEL.data/data/srdta.RData
Removed:
   pkg/GenABEL.data/data/ge03d2c.R
   pkg/GenABEL.data/data/ge03d2ex.R
   pkg/GenABEL.data/data/srdta.R
   pkg/GenABEL.data/inst/extdata/original_data/
Log:
Changed the approach of how the files *.RData in GenABEL.data/data are created. Before, they were generated by R functons during R CMD build time. But, this is a bad approach because the GenABEL package is needed to be installed for this. At the same time, GenABEL package depends on GenABEL.data package and can not be installed before GenABEL.data. Thus, GenABEL can be installed after GenABEL.data is installed and, at the same time, GenABEL.data can be installed before GenABEL only. To avoid this, I forbided creating files in GenABEL.data/data and just copied them from GenABEL. Now, we can install GenABEL.data without GenABEL. All the *.R file are copied from GenABEL.data/data to GenABEL.data/R just to keep them. They are deleted during R CMD build time by runing GenABEL.data/data/clean.R

Added: pkg/GenABEL.data/R/ge03d2c.R
===================================================================
--- pkg/GenABEL.data/R/ge03d2c.R	                        (rev 0)
+++ pkg/GenABEL.data/R/ge03d2c.R	2013-11-27 18:26:37 UTC (rev 1424)
@@ -0,0 +1,53 @@
+#=====================================================================================
+#
+#       Filename:  ge03d2c.R
+#
+#    Description:  Generate ge03d2c.RData from the ge03d2.RData
+#
+#        Version:  1.0
+#        Created:  27-Nov-2013
+#       Revision:  none
+#       
+#
+#         Author:  Maksim V. Struchalin
+#        Company:  YuriiA
+#          Email:  m.struch at mail.ru
+#
+#=====================================================================================
+
+
+
+
+
+##If you would like to generate the RData during 'R CMD build' process, then move this R file in GenABEL.data/data 
+#
+#
+#if(require(GenABEL)) {
+#
+## How we get id and snop names:
+##_____________________________
+##load("../../GenABEL/data/ge03d2c.RData")
+##snpnames_ge03d2c <- colnames(ge03d2c at gtdata)
+##idnames_ge03d2c <- rownames(ge03d2c at gtdata)
+##write.table(data.frame(snpnames_ge03d2c=snpnames_ge03d2c), file="../inst/extdata/ge03d2c_snp_names.txt", quote=F, row.names=F, col.names=T)
+##write.table(data.frame(idnames_ge03d2c=idnames_ge03d2c), file="../inst/extdata/ge03d2c_id_names.txt", quote=F, row.names=F, col.names=T)
+##_____________________________
+#
+#load("ge03d2.RData")
+#adpr <- paste(getwd(), "/../inst/extdata/", sep="")
+#snpnames_file <- paste(adpr, "ge03d2c_snp_names.txt", sep="")
+#idnames_file <- paste(adpr, "ge03d2c_id_names.txt", sep="")
+#
+#snpnames_ge03d2c <- read.table(snpnames_file, header=T, strings=F)$snpnames_ge03d2c
+#idnames_ge03d2c <- read.table(idnames_file, header=T, strings=F)$idnames_ge03d2c
+#
+#ge03d2c <- ge03d2[idnames_ge03d2c,snpnames_ge03d2c]
+#
+#rm(adpr, snpnames_ge03d2c, idnames_ge03d2c, ge03d2, pop2.ids, qc.nostr, qc.str)
+#unlink(snpnames_file)
+#unlink(idnames_file)
+#
+#
+#} else {
+#		error("GenABEL package should be installed. Try install.package(GenABEL).")
+#}

Added: pkg/GenABEL.data/R/ge03d2ex.R
===================================================================
--- pkg/GenABEL.data/R/ge03d2ex.R	                        (rev 0)
+++ pkg/GenABEL.data/R/ge03d2ex.R	2013-11-27 18:26:37 UTC (rev 1424)
@@ -0,0 +1,55 @@
+#=====================================================================================
+#
+#       Filename:  ge03d2ex.R
+#
+#    Description:  Generate ge03d2ex.RData from the ge03d2.RData
+#
+#        Version:  1.0
+#        Created:  27-Nov-2013
+#       Revision:  none
+#       
+#
+#         Author:  Maksim V. Struchalin
+#        Company:  YuriiA
+#          Email:  m.struch at mail.ru
+#
+#=====================================================================================
+
+
+
+
+##If you would like to generate the RData during 'R CMD build' process, then move this R file in GenABEL.data/data 
+#
+#
+#
+#
+#if(require(GenABEL)) {
+#
+## How we get id and snop names:
+##_____________________________
+##load("ge03d2ex.RData")
+##snpnames_ge03d2ex <- colnames(ge03d2ex at gtdata)
+##idnames_ge03d2ex <- rownames(ge03d2ex at gtdata)
+##write.table(data.frame(snpnames_ge03d2ex=snpnames_ge03d2ex), file="ge03d2ex_snp_names.txt", quote=F, row.names=F, col.names=T)
+##write.table(data.frame(idnames_ge03d2ex=idnames_ge03d2ex), file="ge03d2ex_id_names.txt", quote=F, row.names=F, col.names=T)
+##_____________________________
+#
+#load("ge03d2.RData")
+#adpr <- paste(getwd(), "/../inst/extdata/", sep="")
+#
+#snpnames_file <- paste(adpr, "ge03d2ex_snp_names.txt", sep="")
+#idnames_file <- paste(adpr, "ge03d2ex_id_names.txt", sep="")
+#
+#snpnames_ge03d2ex <- read.table(snpnames_file, header=T, strings=F)$snpnames_ge03d2ex
+#idnames_ge03d2ex <- read.table(idnames_file, header=T, strings=F)$idnames_ge03d2ex
+#
+#ge03d2ex <- ge03d2[idnames_ge03d2ex,snpnames_ge03d2ex]
+#
+#rm(adpr, snpnames_ge03d2ex, idnames_ge03d2ex, ge03d2, pop2.ids, qc.nostr, qc.str)
+#unlink(snpnames_file)
+#unlink(idnames_file)
+#
+#
+#} else {
+#		error("GenABEL package should be installed. Try install.package(GenABEL).")
+#}

Added: pkg/GenABEL.data/R/srdta.R
===================================================================
--- pkg/GenABEL.data/R/srdta.R	                        (rev 0)
+++ pkg/GenABEL.data/R/srdta.R	2013-11-27 18:26:37 UTC (rev 1424)
@@ -0,0 +1,42 @@
+#=====================================================================================
+#
+#       Filename:  srdta.R
+#
+#    Description:  Generate srdta.RData from GenABEL/inst/extdata/srgenos.dat
+#
+#        Version:  1.0
+#        Created:  20-Nov-2013
+#       Revision:  none
+#       
+#
+#         Author:  Maksim V. Struchalin
+#        Company:  YuriiA
+#          Email:  m.struch at mail.ru
+#
+#=====================================================================================
+
+
+
+##If you would like to generate the RData during 'R CMD build' process, then move this R file in GenABEL.data/data 
+#
+#
+#
+#
+#
+#if(require(GenABEL)) {
+#adpr <- paste(getwd(), "/../inst/extdata/", sep="")
+#genofile <- paste(adpr,"srgenos.dat",sep="")
+#convert.snp.text(infile=genofile,outfile="srgenos.raw",bcast=200)
+#phenofile <- paste(adpr,"srphenos.dat",sep="")
+#srdta <- load.gwaa.data(geno="srgenos.raw",pheno=phenofile)
+#unlink("srgenos.raw")
+#
+#unlink(genofile)
+#unlink(phenofile)
+#unlink(paste(adpr, "/original_data/", sep=""), recursive = T)
+#rm(adpr, genofile, phenofile)
+#
+#} else {
+#		error("GenABEL package should be installed. Try install.package(GenABEL).")
+#}
+#

Added: pkg/GenABEL.data/data/clean.R
===================================================================
--- pkg/GenABEL.data/data/clean.R	                        (rev 0)
+++ pkg/GenABEL.data/data/clean.R	2013-11-27 18:26:37 UTC (rev 1424)
@@ -0,0 +1,8 @@
+#This file is needed only to clean the package during R CMD build
+	
+
+#adpr <- paste(getwd(), "/../inst/extdata/", sep="")
+
+unlink(paste(getwd(), "/../inst/", sep=""), recursive = T)
+unlink(paste(getwd(), "/../R/", sep=""), recursive = T)
+

Deleted: pkg/GenABEL.data/data/ge03d2c.R
===================================================================
--- pkg/GenABEL.data/data/ge03d2c.R	2013-11-27 17:18:13 UTC (rev 1423)
+++ pkg/GenABEL.data/data/ge03d2c.R	2013-11-27 18:26:37 UTC (rev 1424)
@@ -1,48 +0,0 @@
-#=====================================================================================
-#
-#       Filename:  ge03d2c.R
-#
-#    Description:  Generate ge03d2c.RData from the ge03d2.RData
-#
-#        Version:  1.0
-#        Created:  27-Nov-2013
-#       Revision:  none
-#       
-#
-#         Author:  Maksim V. Struchalin
-#        Company:  YuriiA
-#          Email:  m.struch at mail.ru
-#
-#=====================================================================================
-
-
-
-if(require(GenABEL)) {
-
-# How we get id and snop names:
-#_____________________________
-#load("../../GenABEL/data/ge03d2c.RData")
-#snpnames_ge03d2c <- colnames(ge03d2c at gtdata)
-#idnames_ge03d2c <- rownames(ge03d2c at gtdata)
-#write.table(data.frame(snpnames_ge03d2c=snpnames_ge03d2c), file="../inst/extdata/ge03d2c_snp_names.txt", quote=F, row.names=F, col.names=T)
-#write.table(data.frame(idnames_ge03d2c=idnames_ge03d2c), file="../inst/extdata/ge03d2c_id_names.txt", quote=F, row.names=F, col.names=T)
-#_____________________________
-
-load("ge03d2.RData")
-adpr <- paste(getwd(), "/../inst/extdata/", sep="")
-snpnames_file <- paste(adpr, "ge03d2c_snp_names.txt", sep="")
-idnames_file <- paste(adpr, "ge03d2c_id_names.txt", sep="")
-
-snpnames_ge03d2c <- read.table(snpnames_file, header=T, strings=F)$snpnames_ge03d2c
-idnames_ge03d2c <- read.table(idnames_file, header=T, strings=F)$idnames_ge03d2c
-
-ge03d2c <- ge03d2[idnames_ge03d2c,snpnames_ge03d2c]
-
-rm(adpr, snpnames_ge03d2c, idnames_ge03d2c, ge03d2, pop2.ids, qc.nostr, qc.str)
-unlink(snpnames_file)
-unlink(idnames_file)
-
-
-} else {
-		error("GenABEL package should be installed. Try install.package(GenABEL).")
-}

Added: pkg/GenABEL.data/data/ge03d2c.RData
===================================================================
(Binary files differ)


Property changes on: pkg/GenABEL.data/data/ge03d2c.RData
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Deleted: pkg/GenABEL.data/data/ge03d2ex.R
===================================================================
--- pkg/GenABEL.data/data/ge03d2ex.R	2013-11-27 17:18:13 UTC (rev 1423)
+++ pkg/GenABEL.data/data/ge03d2ex.R	2013-11-27 18:26:37 UTC (rev 1424)
@@ -1,49 +0,0 @@
-#=====================================================================================
-#
-#       Filename:  ge03d2ex.R
-#
-#    Description:  Generate ge03d2ex.RData from the ge03d2.RData
-#
-#        Version:  1.0
-#        Created:  27-Nov-2013
-#       Revision:  none
-#       
-#
-#         Author:  Maksim V. Struchalin
-#        Company:  YuriiA
-#          Email:  m.struch at mail.ru
-#
-#=====================================================================================
-
-
-
-if(require(GenABEL)) {
-
-# How we get id and snop names:
-#_____________________________
-#load("ge03d2ex.RData")
-#snpnames_ge03d2ex <- colnames(ge03d2ex at gtdata)
-#idnames_ge03d2ex <- rownames(ge03d2ex at gtdata)
-#write.table(data.frame(snpnames_ge03d2ex=snpnames_ge03d2ex), file="ge03d2ex_snp_names.txt", quote=F, row.names=F, col.names=T)
-#write.table(data.frame(idnames_ge03d2ex=idnames_ge03d2ex), file="ge03d2ex_id_names.txt", quote=F, row.names=F, col.names=T)
-#_____________________________
-
-load("ge03d2.RData")
-adpr <- paste(getwd(), "/../inst/extdata/", sep="")
-
-snpnames_file <- paste(adpr, "ge03d2ex_snp_names.txt", sep="")
-idnames_file <- paste(adpr, "ge03d2ex_id_names.txt", sep="")
-
-snpnames_ge03d2ex <- read.table(snpnames_file, header=T, strings=F)$snpnames_ge03d2ex
-idnames_ge03d2ex <- read.table(idnames_file, header=T, strings=F)$idnames_ge03d2ex
-
-ge03d2ex <- ge03d2[idnames_ge03d2ex,snpnames_ge03d2ex]
-
-rm(adpr, snpnames_ge03d2ex, idnames_ge03d2ex, ge03d2, pop2.ids, qc.nostr, qc.str)
-unlink(snpnames_file)
-unlink(idnames_file)
-
-
-} else {
-		error("GenABEL package should be installed. Try install.package(GenABEL).")
-}

Added: pkg/GenABEL.data/data/ge03d2ex.RData
===================================================================
(Binary files differ)


Property changes on: pkg/GenABEL.data/data/ge03d2ex.RData
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Deleted: pkg/GenABEL.data/data/srdta.R
===================================================================
--- pkg/GenABEL.data/data/srdta.R	2013-11-27 17:18:13 UTC (rev 1423)
+++ pkg/GenABEL.data/data/srdta.R	2013-11-27 18:26:37 UTC (rev 1424)
@@ -1,36 +0,0 @@
-#=====================================================================================
-#
-#       Filename:  srdta.R
-#
-#    Description:  Generate srdta.RData from GenABEL/inst/extdata/srgenos.dat
-#
-#        Version:  1.0
-#        Created:  20-Nov-2013
-#       Revision:  none
-#       
-#
-#         Author:  Maksim V. Struchalin
-#        Company:  YuriiA
-#          Email:  m.struch at mail.ru
-#
-#=====================================================================================
-
-
-
-if(require(GenABEL)) {
-adpr <- paste(getwd(), "/../inst/extdata/", sep="")
-genofile <- paste(adpr,"srgenos.dat",sep="")
-convert.snp.text(infile=genofile,outfile="srgenos.raw",bcast=200)
-phenofile <- paste(adpr,"srphenos.dat",sep="")
-srdta <- load.gwaa.data(geno="srgenos.raw",pheno=phenofile)
-unlink("srgenos.raw")
-
-unlink(genofile)
-unlink(phenofile)
-unlink(paste(adpr, "/original_data/", sep=""), recursive = T)
-rm(adpr, genofile, phenofile)
-
-} else {
-		error("GenABEL package should be installed. Try install.package(GenABEL).")
-}
-

Added: pkg/GenABEL.data/data/srdta.RData
===================================================================
(Binary files differ)


Property changes on: pkg/GenABEL.data/data/srdta.RData
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream



More information about the Genabel-commits mailing list