error with makeTxDbFromGFF
0
0
Entering edit mode
xvazquezc • 0
@xvazquezc-20551
Last seen 2.2 years ago

Hi there,

I'm trying to import a GFF file created with Prokka but makeTxDbFromGFF() and makeTxDbFromGRanges() complain when I try to do it.

gff1 <- import("mag00002.gff", "gff3")
txdb <- makeTxDbFromGRanges(gff1)

The same using import.gff3 and makeTxDbFromGFF() or any combination.

This is the error (with traceback):

Error in as.vector(x, mode) : coercing an AtomicList object to an atomic vector is supported only for objects with top-level elements of length <= 1

9.
stop("coercing an AtomicList object to an atomic vector ", "is supported only for\n", " objects with top-level elements of length <= 1")
8.
as.vector(x, mode)
7.
as.vector(x, mode)
6.
as.vector(x, mode = "logical")
5.
.local(x, ...)
4.
as.logical(unique(Parent[cds_IDX] %in% ID[gene_IDX]))
3.
as.logical(unique(Parent[cds_IDX] %in% ID[gene_IDX]))
2.
.get_cds_with_gene_parent_IDX(cds_IDX, Parent, gene_IDX, ID, gtf.format = gtf.format)
1.
makeTxDbFromGRanges(gff1)

Any idea how to make this work?


Aside from this, the instructions for importing the GFF in the help docs (see below) exits with another error at import(): Code in the docs

library(rtracklayer)  # for the import() function

## ---------------------------------------------------------------------
## WITH A GRanges OBJECT STRUCTURED AS GFF3
## ---------------------------------------------------------------------
GFF3_files <- system.file("extdata", "GFF3_files",
                          package="GenomicFeatures")

path <- file.path(GFF3_files, "a.gff3")
gr <- import(path)
txdb <- makeTxDbFromGRanges(gr)
txdb

Error at import(path):

Error in open.connection(con, open) : cannot open the connection
9.
open.connection(con, open)
8.
open(con, open)
7.
connectionForResource(con, "r")
6.
.sniffGFFVersion(resource(con))
5.
.local(con, format, text, ...)
4.
import(FileForFormat(con), ...)
3.
import(FileForFormat(con), ...)
2.
import(path)
1.
import(path)

Thank you in advance, Xabi

PS: using R 3.5.1, and GenomicFeatures installed today (and all deps updated too)

genomicfeatures gff custom genome makeTxDbFromGFF makeTxDbFromGRanges • 423 views
ADD COMMENT

Login before adding your answer.

Traffic: 523 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