Thanks for the comment @rpolicastro ! When I run your code, I get the following error:
Error in column_to_rownames(., "Gene") : is.data.frame(.data) is not TRUE
Traceback:
13.
stop(simpleError(msg, call = if (p <- sys.parent(1L)) sys.call(p)))
12.
stopifnot(is.data.frame(.data))
11.
column_to_rownames(., "Gene")
10.
function_list[[i]](value)
9.
freduce(value, `_function_list`)
8.
`_fseq`(`_lhs`)
7.
eval(quote(`_fseq`(`_lhs`)), env, env)
6.
eval(quote(`_fseq`(`_lhs`)), env, env)
5.
withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
4.
read_tsv %>% column_to_rownames("Gene") %>% as.matrix %>% CreateSeuratObject(project = y)
3.
.f(.x[[i]], .y[[i]], ...)
2.
map2(.x, vec_index(.x), .f, ...)
1.
imap(list_of_files, function(x, y) {
cts <- x
read_tsv %>% column_to_rownames("Gene") %>% as.matrix %>%
CreateSeuratObject(project = y) ...
My current working directory has the 64 files in it. Any Idea why the function requires the data to be a dataframe?