recount3
recount3 copied to clipboard
[BUG] different row counts implied by arguments error at expand_sra_attributes()
Describe the bug
DataFrame dimension mismatch error using data from project SRP017465
rse_expanded <- expand_sra_attributes(rse)
Error in DataFrame(..., check.names = FALSE) :
different row counts implied by arguments
Provide a minimally reproducible example (reprex)
library(recount3)
projects <- available_projects("human")
rse <- create_rse(projects[3,])
rse_expanded <- expand_sra_attributes(rse)
Possible solution
This project seems to have sra.sample_attributes that are empty and thus gives a dimension mismatch when doing rbind. Solution is to add NA in expand_sra_attributes() for empty lines before doing rbind.
d[which(sapply(d,length)==0)] <- NA
Can you tell us what is in projects[3,]
? Otherwise we can't reproduce this issue.
I believe it is the entry for SRP017465