Closed jennahamlin closed 3 years ago
potential alternative r scripting to input into tinsel module to check if it is an reader problem didn't get this to work in r shiny modules, yet
dataFile <- read.delim("/Users/jennahamlin/Desktop/Tinsel/data/example_1504MLEXH-1/1504MLEXH-1_geneticMatrix.tsv",
sep = "\t",
strip.white = T,
blank.lines.skip=T,
header = F,
stringsAsFactors = F
)
names(dataFile)<- dataFile[1,]
dataFile <- dataFile[-1,]
dataFile <- Filter(function(x)!all(is.na(x)), dataFile)
metaFile<-read.delim("/Users/jennahamlin/Desktop/Tinsel/data/example_1504MLEXH-1/1504MLEXH-1_metaData.csv",
sep = ",",
strip.white = T,
blank.lines.skip=T,
header = F,
stringsAsFactors = F)
names(metaFile) <- metaFile[1,]
metaFile <- metaFile[-1,]
colnames(dataFile)[2:ncol(dataFile)] = metaFile$Display.labels[which(metaFile$Tip.labels %in% colnames(dataFile)[2:ncol(dataFile)])]
dataFile$. = metaFile$Display.labels[which(metaFile$Tip.labels %in% dataFile$.)]
I confirmed that there was an extra tab (\t) in one of the genetic distance test matrix files (1504..) and removed this by hand using text wrangling (show invisible), I used this file as the upload on the cdc server instance of tinsel and the same error occurred when using the annotation function.
I believe that trim_ws =T using reader should have removed this extra column due to the tab at the end of each line; however, it doesn't appear to be doing that. I will post as an issue on readr github.
Posted issue on readr github
Was a result of a different package version for tibble. On my local machine, I was using. 2.1.3 and on the server 3.0.1 was installed. With tibble package version on cdc server now set to 2.1.3, the problem is resolved.
The error occurs when downloading. The above error occurs if the user does this order of operations:
The order of operations to result in the error is as so:
Order of operations which produces an error that is uninformative for the user:
tree upload, genetic distance upload, add annotation is selected, then meta data is upload for tip label correction
When this happens, then the above error is produces
Error when using clade annotator in Tinsel on CDC server
This is not a problem on my mac
Error message from CDC log file:
This error appears like it might be associated with the vctrs package
Checking for reproducible error in Rstudio