You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the rmsk table has a different schema, and causes this error. When I have needed rmsk I have used the underlying goldmine:::getUCSCTable() function. This can pull the table data, but will not adjust for 0-based start coordinates the way getFeatures() does. However, this way the rmsk data can still be pulled from within R and the column names could be changed manually. This is just a workaround, the code you have could also provide a fix. Please make a pull request if you think you could get getFeatures() working for the "rmsk" table in this manner.
R.3.5.2.>features.rmsk <- getFeatures(tables=c("rmsk"),genome="mm10", cachedir=cachedir,sync=TRUE)
|==================================================|
Error in setnames(x, c("chrom", "chromStart", "chromEnd"), c("chr", "start", :
Items of 'old' not found in column names: chrom,chromStart,chromEnd
R.3.5.2.>
R.3.5.2.>traceback()
6: stop("Items of 'old' not found in column names: ", paste(old[is.na(i)],
collapse = ","))
5: setnames(x, c("chrom", "chromStart", "chromEnd"), c("chr", "start",
"end"))
4: FUN(X[[i]], ...)
3: lapply(tab.dt, togr)
2: lapply(tab.dt, togr)
1: getFeatures(tables = c("rmsk"), genome = genome, cachedir = cachedir,
sync = TRUE)
Suggested partial fix:
if ("chrom" in colnames(x)){
setnames(x, c("chrom"), c("chr"))
} else {
stopifnot("chr" in colnames(x))
}
setnames(x, c("chromStart", "chromEnd"), c("start", "end"))
The text was updated successfully, but these errors were encountered: