How to solve this error in the "read.gb" R function?
So I am trying to read a file with the extension "gb", that a downloaded directly from the website. I am using the "read.gb" function:
library(read.gb)
df<-read.gb("sequence.gb",Type = "full", Source = "File")
I thought it would be straightfoward, and it seems to read the first 5 "samples", but them it returns this error (I inspected the file and it looked ok):
Sample 1 in 759 done
Sample 2 in 759 done
Sample 3 in 759 done
Sample 4 in 759 done
Sample 5 in 759 done
Sample 6 in 759 done
Error in apply(D_loop, 2, function(x) { :
dim(X) must have a positive length
Anyone has any idea what might be happening?
Thank you in advance!
• 1,521 views
•
link
1 answer
I experienced a similar issue with the apply(F_UTR and apply(T_UTR functions. To address this problem, I made some modifications to original code. I have uploaded the updated version to my GitHub repository at https://github.com/lpmor22/read.gb.
• 0 views
•
link
Log in to answer this question.
The codes are on GitHub, hard to guess why it breaks, have a look and test: