This is a test version of Biostars. For the public version, visit https://www.biostars.org.
argument ".f" is missing, with no default

I'm using 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 ,]

This line 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?

r exons genes

1 answer

change it to GenomicRanges::reduce(exons)

Other libraries have a reduce function so it's probably trying to use the wrong one.

Log in to answer this question.