Is there anyway to replace seqlevels in a txdb
1
0
Entering edit mode
A.J. ▴ 20
@aj-24333
Last seen 2.6 years ago
United States

In a previous post, I described having problems using maketxdbfromGFF, which led to a txdb with missing tx_id attributes

Now I found that:

txdb <- makeTxDbFromBiomart(dataset = "mochrogaster_gene_ensembl")

produces a txdb without any errors. This is much better, but I'd like to change the 'Ensembl' seqlevels to the 'NCBI' seqlevels. Is there any easy way to do this?

Thanks, Arjen

GenomicFeatures • 1.8k views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States
> txdb <- makeTxDbFromBiomart(dataset = "mochrogaster_gene_ensembl")
Download and preprocess the 'transcripts' data frame ... OK
Download and preprocess the 'chrominfo' data frame ... OK
Download and preprocess the 'splicings' data frame ... OK
Download and preprocess the 'genes' data frame ... OK
Prepare the 'metadata' data frame ... OK
Make the TxDb object ... OK
> seqlevelsStyle(txdb)
[1] "NCBI"    "Ensembl"
> seqlevelsStyle(txdb) <- "UCSC"
> transcripts(txdb)
GRanges object with 31519 ranges and 2 metadata columns:
            seqnames          ranges strand |     tx_id            tx_name
               <Rle>       <IRanges>  <Rle> | <integer>        <character>
      [1]       chr1   425957-426027      + |         1 ENSMOCT00000012730
      [2]       chr1 1838988-1859670      + |         2 ENSMOCT00000028573
      [3]       chr1 3465941-3467236      + |         3 ENSMOCT00000004649
      [4]       chr1 3881106-3885583      + |         4 ENSMOCT00000007229
      [5]       chr1 3925381-3991659      + |         5 ENSMOCT00000029615
      ...        ...             ...    ... .       ...                ...
  [31515] JH998628.1         251-533      - |     31515 ENSMOCT00000016493
  [31516] JH998633.1       2366-2460      - |     31516 ENSMOCT00000012116
  [31517] JH998737.1         171-268      + |     31517 ENSMOCT00000012456
  [31518] JH998833.1           30-70      + |     31518 ENSMOCT00000006125
  [31519] JH998869.1         293-396      + |     31519 ENSMOCT00000004497
  -------
  seqinfo: 6336 sequences (1 circular) from an unspecified genome
ADD COMMENT
0
Entering edit mode

Wow, that is VERY easy! Thanks James. Can I express my eternal gratitude for BioConductor and the people that make it here? It has been so extremely cool working with it!

ADD REPLY
0
Entering edit mode

Well, if you have a spare bitcoin or two sitting around that you aren't using... ;-D

ADD REPLY
0
Entering edit mode

Haha, I wish. But if I make any monetary gain by using BioConductor, sure. When (or maybe better if taking my level of experience into account) that happens were can I deposit?

ADD REPLY

Login before adding your answer.

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