Question: ORF lengths using Yeast Annotation package
0
gravatar for dktarathym
5.0 years ago by
dktarathym40
United States
dktarathym40 wrote:

Hi,

I am trying to find out length of Yeast ORF. Where is my mistake?

> sacCer3Length <- function(symbols)
  {
  require(TxDb.Scerevisiae.UCSC.sacCer3.sgdGene)
  require(org.Sc.sgd.db)
  exons.db = exonsBy(TxDb.Scerevisiae.UCSC.sacCer3.sgdGene, by='gene')
  egs    = unlist(  mget(symbols[ symbols %in% keys(org.Sc.sgd) ],org.Sc.sgd) )
  sapply(egs,function(eg)
  {
  exons = exons.db[[eg]]
  exons = reduce(exons)
  sum( width(exons) )
  })
  }

> sacCer3Length('YNL079C')

Error in unlist(mget(symbols[symbols %in% keys(org.Sc.sgd)], org.Sc.sgd)) : 
  error in evaluating the argument 'x' in selecting a method for function 'unlist': Error in mget(symbols[symbols %in% keys(org.Sc.sgd)], org.Sc.sgd) : 
  error in evaluating the argument 'x' in selecting a method for function 'mget': Error in symbols %in% keys(org.Sc.sgd) : 
  error in evaluating the argument 'table' in selecting a method for function '%in%': Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘keys’ for signature ‘"function"'


Regards,

Deepak
 

bioconductor R • 1.5k views
ADD COMMENTlink written 5.0 years ago by dktarathym40

Don't yeast have alternatively spliced genes? If so, getting exons by gene, reduce()ing that and then summing the exons won't work. Also, UTRs will mess that up.

ADD REPLYlink written 5.0 years ago by Devon Ryan92k

Should I use:

exons.db = cdsBy(TxDb.Scerevisiae.UCSC.sacCer3.sgdGene, by='gene')

ADD REPLYlink written 5.0 years ago by dktarathym40

That'll at least solve the UTR issue, though it'll still miss alternative splicing. The general idea is to pull out CDS for a gene and then calculate from that the ORF length of each transcript. You then return the longest ORF length (or the mean, or median, or...). Not calculating by transcript will often over-estimate things in cases where there's more than pure exon skipping.

ADD REPLYlink written 5.0 years ago by Devon Ryan92k

> sacCer3Length <- function(symbols)
+ {
+ require(TxDb.Scerevisiae.UCSC.sacCer3.sgdGene)
+ require(org.Sc.sgd.db)
+ exons.db = transcriptsBy(TxDb.Scerevisiae.UCSC.sacCer3.sgdGene, by='gene')
+ egs    = unlist(get(symbols[symbols %in% keys(org.Sc.sgd)],org.Sc.sgd))
+ sapply(egs,function(eg)
+ {
+ exons = exons.db[[eg]]
+ exons = reduce(exons)
+ sum( width(exons) )
+ })
+ }
> sacCer3Length('YNL079C')
Error in unlist(get(symbols[symbols %in% keys(org.Sc.sgd)], org.Sc.sgd)) : 
  error in evaluating the argument 'x' in selecting a method for function 'unlist': Error in get(symbols[symbols %in% keys(org.Sc.sgd)], org.Sc.sgd) : 
  error in evaluating the argument 'x' in selecting a method for function 'get': Error in symbols %in% keys(org.Sc.sgd) : 
  error in evaluating the argument 'table' in selecting a method for function '%in%': Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘keys’ for signature ‘"function"’




Problem is in code (I believe):  *** egs    = unlist(get(symbols[symbols %in% keys(org.Sc.sgd)],org.Sc.sgd))
 

ADD REPLYlink written 5.0 years ago by dktarathym40

Yes, the problem in the code can be deduced from

error in evaluating the argument 'table' in selecting a method for function '%in%': Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘keys’ for signature ‘"function"’

You probably want org.Sc.sgdGENENAME or something like that rather than org.Sc.sgd.

Note that your ORFs are still wrong, though.

ADD REPLYlink written 5.0 years ago by Devon Ryan92k

I have ORF. I want to make a function, that will return the length of these ORF.

ADD REPLYlink written 5.0 years ago by dktarathym40
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 2.3.0
Traffic: 2176 users visited in the last hour