Identify accepted columns in TxDb objects
0
0
Entering edit mode
@lluis-revilla-sancho
Last seen 27 days ago
European Union

How can I know the columns accepted when querying a TxDb object?

I can explore the columns via columns but then other keys are accepted too:

suppressPackageStartupMessages(library("TxDb.Hsapiens.UCSC.hg19.knownGene"))
columns(TxDb.Hsapiens.UCSC.hg19.knownGene)
#>  [1] "CDSCHROM"   "CDSEND"     "CDSID"      "CDSNAME"    "CDSSTART"  
#>  [6] "CDSSTRAND"  "EXONCHROM"  "EXONEND"    "EXONID"     "EXONNAME"  
#> [11] "EXONRANK"   "EXONSTART"  "EXONSTRAND" "GENEID"     "TXCHROM"   
#> [16] "TXEND"      "TXID"       "TXNAME"     "TXSTART"    "TXSTRAND"  
#> [21] "TXTYPE"
genes(TxDb.Hsapiens.UCSC.hg19.knownGene, columns = "GENEID")
#>   403 genes were dropped because they have exons located on both strands
#>   of the same reference sequence or on more than one reference sequence,
#>   so cannot be represented by a single genomic range.
#>   Use 'single.strand.genes.only=FALSE' to get all the genes in a
#>   GRangesList object, or use suppressMessages() to suppress this message.
#> GRanges object with 23056 ranges and 1 metadata column:
#>         seqnames              ranges strand |          GENEID
#>            <Rle>           <IRanges>  <Rle> | <CharacterList>
#>       1    chr19   58858172-58874214      - |               1
#>      10     chr8   18248755-18258723      + |              10
#>     100    chr20   43248163-43280376      - |             100
#>    1000    chr18   25530930-25757445      - |            1000
#>   10000     chr1 243651535-244006886      - |           10000
#>     ...      ...                 ...    ... .             ...
#>    9991     chr9 114979995-115095944      - |            9991
#>    9992    chr21   35736323-35743440      + |            9992
#>    9993    chr22   19023795-19109967      - |            9993
#>    9994     chr6   90539619-90584155      + |            9994
#>    9997    chr22   50961997-50964905      - |            9997
#>   -------
#>   seqinfo: 93 sequences (1 circular) from hg19 genome
genes(TxDb.Hsapiens.UCSC.hg19.knownGene, columns = "gene_id")
#>   403 genes were dropped because they have exons located on both strands
#>   of the same reference sequence or on more than one reference sequence,
#>   so cannot be represented by a single genomic range.
#>   Use 'single.strand.genes.only=FALSE' to get all the genes in a
#>   GRangesList object, or use suppressMessages() to suppress this message.
#> GRanges object with 23056 ranges and 1 metadata column:
#>         seqnames              ranges strand |     gene_id
#>            <Rle>           <IRanges>  <Rle> | <character>
#>       1    chr19   58858172-58874214      - |           1
#>      10     chr8   18248755-18258723      + |          10
#>     100    chr20   43248163-43280376      - |         100
#>    1000    chr18   25530930-25757445      - |        1000
#>   10000     chr1 243651535-244006886      - |       10000
#>     ...      ...                 ...    ... .         ...
#>    9991     chr9 114979995-115095944      - |        9991
#>    9992    chr21   35736323-35743440      + |        9992
#>    9993    chr22   19023795-19109967      - |        9993
#>    9994     chr6   90539619-90584155      + |        9994
#>    9997    chr22   50961997-50964905      - |        9997
#>   -------
#>   seqinfo: 93 sequences (1 circular) from hg19 genome

Created on 2023-01-03 with reprex v2.0.2

I don't know if there is some translation/match between the accepted parameter in the accessors or if there are some hidden columns not provided by columns.
I couldn't find anything documented in ?GenomicFeatures::genes except that in filtere there are some hard coded filter names that seem to be used also for columns (Using Bioconductor version 3.16 with TxDb.Hsapiens.UCSC.hg19.knownGene version 3.2.2).

TxDb • 802 views
ADD COMMENT

Login before adding your answer.

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