gmbecker / genbankr

http://bioconductor.org/packages/devel/bioc/html/genbankr.html
14 stars 9 forks source link

Errors parsiing specific genbank records that #1

Closed dwinter closed 8 years ago

dwinter commented 8 years ago

As part of the review of this package (ropensci/onboarding#47) we've uncovered two genbank records that throw errors on readGenBank. In both cases is seems like the record is missing soemthing that genbankr is expecting it to contain

readGenBank(GBAccession("AF020726.1"))
CDS annotations do not have 'locus_tag' label, using 'gene' as gene_id
CDS annotations do not have 'locus_tag' label, using 'gene' as gene_id
No exons read from genbank file. Assuming sections of CDS are full exons
Error in `[[<-`(`*tmp*`, name, value = logical(0)) : 
  0 elements in value to replace 7 elements
In addition: Warning messages:
1: In is.na(rawtxs$gene) :
  is.na() applied to non-(list or vector) of type 'NULL'
2: In is.na(rawtxs$gene) :

The other records looks.. a liitle strange.

readGenBank(GBAccession("DQ191758.1"))
Error in vapply(dflist, nrow, integer(1)) : values must be length 1,
 but FUN(X[[1]]) result is length 0
In addition: Warning messages:
1: In make_feat_gr(str = rngstr, chr = chr, ats = c(type = type, attrs),  :
  Incomplete feature annotation detected. Omitting feature at <1..>151
2: In make_feat_gr(str = rngstr, chr = chr, ats = c(type = type, attrs),  :
  Incomplete feature annotation detected. Omitting feature at <118..>151
3: In make_feat_gr(str = rngstr, chr = chr, ats = c(type = type, attrs),  :
  Incomplete feature annotation detected. Omitting feature at <118..151
4: In make_feat_gr(str = rngstr, chr = chr, ats = c(type = type, attrs),  :
  Incomplete feature annotation detected. Omitting feature at <1831..>3584
5: In FUN(X[[i]], ...) :
  Incomplete feature annotation detected. Omitting feature at <1831..2113
6: In FUN(X[[i]], ...) :
  Incomplete feature annotation detected. Omitting feature at 3043..>3584
gmbecker commented 8 years ago

@dwinter, Thanks for the bug report, and sorry for the delay in responding to it. These are fixed in the github master branch, and in Bioc Devel, though it will take a couple of days to get them through the build process. I have also backported the changes into Bioc release (3.3), so they should land there around the same time.

I will be posting my response to the review itself later today.