Question: readTranscriptFeatures from genomation
0
gravatar for hwaterma
24 days ago by
hwaterma0
hwaterma0 wrote:

I have a GFF3 file that I turned into a Bed12 file. It load into R and works fine:

>feature_file <- readBed("gene_annotation.bed")
Parsed with column specification:
cols(
  X1 = col_character(),
  X2 = col_double(),
  X3 = col_double(),
  X4 = col_character(),
  X5 = col_double(),
  X6 = col_character(),
  X7 = col_double(),
  X8 = col_double(),
  X9 = col_double(),
  X10 = col_double(),
  X11 = col_number(),
  X12 = col_character()
)

Then I try to run readTranscriptFeatures and I keep getting this error:

> features <- readTranscriptFeatures(feature_file, up.flank=1001, down.flank=0, unique.prom=FALSE, remove.unusual=FALSE)
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘readTranscriptFeatures’ for signature ‘"GRanges"’

I am not sure what this means or how to fix it. Please help!

ADD COMMENTlink modified 24 days ago by altuna akalin20 • written 24 days ago by hwaterma0
Answer: readTranscriptFeatures from genomation
0
gravatar for James W. MacDonald
24 days ago by
United States
James W. MacDonald52k wrote:

The error might be a bit obscure, so here's a translation: it's saying that the first argument to readTranscriptFeatures is supposed to be something other than a GRanges object. Which you could have known if you read the help file (which is what you should have done first!).

Description:

     Function for reading exon intron and promoter structure from a
     given bed file

Usage:

     readTranscriptFeatures(location,remove.unusual=TRUE,
                                   up.flank=1000,down.flank=1000,unique.prom=TRUE)

     ## S4 method for signature 'character'
     readTranscriptFeatures(location, remove.unusual = TRUE,
       up.flank = 1000, down.flank = 1000, unique.prom = TRUE)

Arguments:

location: location of the bed file with 12 or more columns.  The file
          can end in .gz, .bz2, .xz, or .zip and/or start with
          http:// or ftp://. If the file is not compressed it can
          also start with https:// or ftps://.

Which seems to clearly outline what you are supposed to be doing?

ADD COMMENTlink written 24 days ago by James W. MacDonald52k

How do I read in my bed file without it truing into a GRanges file?

ADD REPLYlink written 23 days ago by hwaterma0

How do I read in my bed file without it truing into a GRanges file?

ADD REPLYlink written 23 days ago by hwaterma0

The first argument is for the location of the bed file! You don't read it in, you tell readTranscriptFeatures where it is.

ADD REPLYlink written 23 days ago by James W. MacDonald52k
Answer: readTranscriptFeatures from genomation
0
gravatar for altuna akalin
24 days ago by
Germany/Berlin/MDC-BIMSB
altuna akalin20 wrote:

GFF to bed12 conversion doesn’t always work. Assuming it worked, you should just use provide the bed12 file path as the first argument to readTranscriptFeatures function

Best

Altuna

Sent from mobile, excuse the brevity

ADD COMMENTlink written 24 days ago by altuna akalin20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 144 users visited in the last hour