How to solve this error in the "read.gb" R function?
1
1
Entering edit mode
2.7 years ago
João ▴ 10

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!

readgb R GenBank • 912 views
ADD COMMENT
0
Entering edit mode

The codes are on GitHub, hard to guess why it breaks, have a look and test:

ADD REPLY
1
Entering edit mode
17 months ago
Laise ▴ 10

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.

ADD COMMENT

Login before adding your answer.

Traffic: 3029 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6