Open wangzitiner opened 1 year ago
Hello!
I'm trying my own data using the code on this website. But I didn't find "tip.walk.files" anywhere before it was used. Thus, my process stopped here. I want to know how to make this file. Could you please help me?
tip.walk.files <- list.files(path = "walks/dm-8-tm-40-80/", pattern = ".rds", full.names = T)
tips.walked <- setdiff(unique(object@group.ids$ZF6S-Cluster-Num), NA)
ZF6S-Cluster-Num
for (tip in tips.walked) {
tip.files <- grep(paste0("walks-", tip, "-"), tip.walk.files, value=T) if (length(tip.files) > 0) {
these.walks <- unlist(lapply(tip.files, readRDS), recursive = F) object <<- processRandomWalks(object, walks=these.walks, walks.name=tip, verbose=F)
} }
Hello!
I'm trying my own data using the code on this website. But I didn't find "tip.walk.files" anywhere before it was used. Thus, my process stopped here. I want to know how to make this file. Could you please help me?
Process walks from cluster
Get list of walk files
tip.walk.files <- list.files(path = "walks/dm-8-tm-40-80/", pattern = ".rds", full.names = T)
Which tips were walked?
tips.walked <- setdiff(unique(object@group.ids$
ZF6S-Cluster-Num
), NA)Run through each tip, load the walks, and process them into visitation frequency for that tip.
for (tip in tips.walked) {
Get the files for that tip
tip.files <- grep(paste0("walks-", tip, "-"), tip.walk.files, value=T) if (length(tip.files) > 0) {
Read the files into a list of lists, and do a non-recursive unlist to combine into one list.
} }