JiscaH / sequoia

R package for pedigree inference based on SNP data
25 stars 6 forks source link

Error from R when trying to export dataset after a sequoia run. #4

Closed jblamyatifremer closed 7 years ago

jblamyatifremer commented 7 years ago

Dear Jisca,

Again It is me. Everything is ok with the new version of Sequoia, but I remark that is impossible to export a .Rdata after a sequoia run. The error message is weird :

-----------------------------------------------------------------------------

EstimateAssignmentPerformance <- function (geno=NA,ped=NA,lfh=NA,nb_repetition=NA,nb_loci= [... more lines with Sequoia in it ...] }

Run the function with small numbers

test <- EstimateAssignmentPerformance(geno=geno, ped=ped1,lfh=lfh1, nb_repetition=1 , nb_loci=c(5,10), ErroR=0.01 ) [... output from the function ...]

Trying to export test dataset as test.Rdata

name <- paste("test",version,".Rdata",sep="") mypath4 <- file.path("G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug",name,fsep = .Platform$file.sep) print(mypath4)

the output of this line is not OK... I should have only one line

[1] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/testx86_64-w64-mingw32.Rdata"
[2] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/testx86_64.Rdata"
[3] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/testmingw32.Rdata"
[4] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/testx86_64, mingw32.Rdata"
[5] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/test.Rdata"
[6] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/test3.Rdata"
[7] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/test4.1.Rdata"
[8] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/test2017.Rdata"
[9] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/test06.Rdata"
[10] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/test30.Rdata"
[11] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/test72865.Rdata"
[12] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/testR.Rdata"
[13] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/testR version 3.4.1 (2017-06-30).Rdata" [14] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/testSingle Candle.Rdata"

save(test,file=mypath4) Error in gzfile(file, "wb") : invalid 'description' argument In addition: Warning message: In if (!nzchar(file)) stop("'file' must be non-empty string") : the condition has length > 1 and only the first element will be used

-----------------------------------------------------------------------------

I attach folder to reproduce the bug. Cheers,

JB

jblamyatifremer commented 7 years ago

5 sec later I found the solution. Maybe It will help somebody.

Rather than "save(test,file=mypath4)" use "save(test,file=mypath4[5])" in my case. For me, it is a bug, but I do not know where should I submit this observation ?
Do not mind. JB

JiscaH commented 7 years ago

Hello,

I spotted the problem, which is unrelated to sequoia, and not a bug: the variable 'version' is a vector of length 14, with "x86_64-w64-mingw32", "x86_64", "mingw32", etc. (which you can check by simply typing 'version' into R - something new I discovered). Consequently, your variables 'name' and 'path4' will also become vectors of length 14. The variable you are looking for appears to be called 'R.version.string'.

Please don't hesitate to contact me with any further queries!

I'm quite curious to see how Sequoia will hold up in your simulations - will you be comparing it to any other pedigree reconstruction method?

Jisca

On 01/08/2017 23:27, jblamyatifremer wrote:

Dear Jisca,

Again It is me. Everything is ok with the new version of Sequoia, but I remark that is impossible to export a .Rdata after a sequoia run. The error message is weird :

-----------------------------------------------------------------------------

EstimateAssignmentPerformance <- function
(geno=NA,ped=NA,lfh=NA,nb_repetition=NA,nb_loci=
[... more lines with Sequoia in it ...]
}

    Run the function with small numbers

test <- EstimateAssignmentPerformance(geno=geno,
ped=ped1,lfh=lfh1, nb_repetition=1 , nb_loci=c(5,10), ErroR=0.01 )
[... output from the function ...]

    Trying to export test dataset as test.Rdata

name <- paste("test",version,".Rdata",sep="")
mypath4 <-
file.path("G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug",name,fsep
= .Platform$file.sep)
print(mypath4)

    the output of this line is not OK... I should have only one line

[1] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/testx86_64-w64-mingw32.Rdata" [2] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/testx86_64.Rdata" [3] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/testmingw32.Rdata" [4] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/testx86_64, mingw32.Rdata" [5] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/test.Rdata" [6] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/test3.Rdata" [7] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/test4.1.Rdata" [8] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/test2017.Rdata" [9] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/test06.Rdata" [10] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/test30.Rdata" [11] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/test72865.Rdata" [12] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/testR.Rdata" [13] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/testR version 3.4.1 (2017-06-30).Rdata" [14] "G:/IFREMER/02-PROJET/GENOYSTER/07_Sequoia_bug/ReproduceBug/testSingle Candle.Rdata"

save(test,file=mypath4)
Error in gzfile(file, "wb") : invalid 'description' argument
In addition: Warning message:
In if (!nzchar(file)) stop("'file' must be non-empty string") :
the condition has length > 1 and only the first element will be used
##-----------------------------------------------------------------------------

I attach folder to reproduce the bug. Cheers,

JB

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JiscaH/sequoia/issues/4, or mute the thread https://github.com/notifications/unsubscribe-auth/AQwkHfcZju1Tj1k9RO5GKVrdw3Upt93aks5sT6ZUgaJpZM4OqX9K.