Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upreadStandardGenotypes fails on recent data.table #7
Comments
|
This may be a regression of |
|
Dear Hannah,
This is because the The NEWS item affecting that is :
What happens is the "Samples:" is treated a column name and budged over to the right, with V1 becoming the automatic column name for the first column. This is intended new behaviour but it is a change from before. Once v1.11.0 is on CRAN, please could you change that line to : fread( filename, skip="POP1:", sep=" ", colClasses="character", header=FALSE)I've copied a subset of your file to our test suite and added the following tests : # skip= is now consistent as if the file started on that line.
+# Found via rev dep checking (package PhenotypeSimulator), #2786. It is still a breaking change that PhenotypeSimulator will need to accomodate please.
+test(1909.1, names(ans<-fread(testDir("genotypes_genome.txt"), skip="Samples:", sep=" ", colClasses="character")),
+ c("V1","Samples:"),
+ warning="Detected 1 column name.*but the data has 2 columns.*Added 1 extra default column name for the first column")
+test(1909.2, ans$V1, c("POP1:","POP1:","POP1:"))
+test(1909.3, nchar(ans[["Samples:"]]), INT(3287,3287,3287))
+test(1909.4, names(ans<-fread(testDir("genotypes_genome.txt"), skip="POP1:", sep=" ", colClasses="character", header=FALSE)),
+ c("V1","V2"))
+test(1909.5, ans$V1, c("POP1:","POP1:","POP1:"))
+test(1909.6, nchar(ans$V2), INT(3287,3287,3287)) |
|
Dear Matt, thanks for the heads up. I have changed the line in question and will update PhenotypeSimulator on CRAN as soon as data.table v1.11.0 is on CRAN. Could you let me know when this happened? Thanks! |
|
Dear Hannah, |
|
PhenotypeSimulator v0.2.2 on CRAN |
Hello,
data.tableis pushing for a release to CRAN (1.11.0) and we realized your package would be broken by recent updates. In particular:In particular this is because
datacomes fromfreadandV2no longer exists. I took a glance at the file and couldn't figure out why at a glance, but hopefully you can from a check on theNEWS. There have been a lot of changes (improvements, we hope!) tofreadsince the last update; if you believe the new behavior is in error, please file an issue.