EnsDb.Hsapiens.v86 package to get genes length, using this code:
exons = exonsBy(EnsDb.Hsapiens.v86, by="gene") exons = reduce(exons) len = sum(width(exons)) INDEX = intersect(rownames(counts_data),names(len)) gene_Lengths1 = len[INDEX] counts_data = counts_data[INDEX ,]
exons = reduce(exons) is causing this error:
Error in reduce_impl(.x, .f, ..., .init = .init, .dir = .dir) : argument ".f" is missing, with no default
When I remove it, the code works. The problem is I'm not guite sure what this line of code does (I found this code somewhere on github).
Do you think it's important? if so, how do I fix this error I'm getting?