recount3 icon indicating copy to clipboard operation
recount3 copied to clipboard

[BUG] different row counts implied by arguments error at expand_sra_attributes()

Open ivokwee opened this issue 1 year ago • 2 comments

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

ivokwee avatar Aug 23 '23 14:08 ivokwee

Can you tell us what is in projects[3,]? Otherwise we can't reproduce this issue.

lcolladotor avatar Oct 16 '23 18:10 lcolladotor

I believe it is the entry for SRP017465

ivokwee avatar Oct 16 '23 23:10 ivokwee