Skip to content

Some convenience functions for getting a connection object to (or collecting information about) the package annotation DB.

Usage

SomaScan_dbconn()
    SomaScan_dbfile()
    SomaScan_dbschema(file="", show.indices=FALSE)
    SomaScan_dbInfo()

Arguments

file

A connection, or a character string naming the file to print to (see the file argument of the cat function for the details).

show.indices

The CREATE INDEX statements are not shown by default. Use show.indices=TRUE to get them.

Details

SomaScan_dbconn returns a connection object to the package annotation DB. IMPORTANT: Don't call dbDisconnect on the connection object returned by SomaScan_dbconn or you will break all the AnnDbObj objects defined in this package!

SomaScan_dbfile returns the path (character string) to the package annotation DB (this is an SQLite file).

SomaScan_dbschema prints the schema definition of the package annotation DB.

SomaScan_dbInfo prints other information about the package annotation DB.

Value

SomaScan_dbconn: a DBIConnection object representing an open connection to the package annotation DB.

SomaScan_dbfile: a character string with the path to the package annotation DB.

SomaScan_dbschema: none (invisible NULL).

SomaScan_dbInfo: none (invisible NULL).

Examples

    library(DBI)
    ## Count the number of rows in the "probes" table:
    dbGetQuery(SomaScan_dbconn(), "SELECT COUNT(*) FROM probes")
#>   COUNT(*)
#> 1    10870

    SomaScan_dbschema()
#> CREATE TABLE metadata (name VARCHAR(80) PRIMARY KEY, value VARCHAR(255) );
#> CREATE TABLE map_metadata (
#>       map_name VARCHAR(80) NOT NULL,
#>       source_name VARCHAR(80) NOT NULL,
#>       source_url VARCHAR(255) NOT NULL,
#>       source_date VARCHAR(20) NOT NULL
#>     );
#> CREATE TABLE map_counts (
#>       map_name VARCHAR(80) PRIMARY KEY,
#>       count INTEGER NOT NULL
#>     );
#> CREATE TABLE sqlite_stat1(tbl,idx,stat);
#> CREATE TABLE accessions (probe_id VARCHAR(80),accession VARCHAR(20));
#> CREATE TABLE probes (probe_id VARCHAR(80), gene_id VARCHAR(10) NULL, is_multiple SMALLINT NOT NULL);
#> 

    SomaScan_dbInfo()
#>                  name
#> 1     DBSCHEMAVERSION
#> 2             Db type
#> 3  Supporting package
#> 4            DBSCHEMA
#> 5            ORGANISM
#> 6             SPECIES
#> 7        MANUFACTURER
#> 8            CHIPNAME
#> 9     MANUFACTURERURL
#> 10       EGSOURCEDATE
#> 11       EGSOURCENAME
#> 12        EGSOURCEURL
#> 13          CENTRALID
#> 14              TAXID
#> 15       GOSOURCENAME
#> 16        GOSOURCEURL
#> 17       GOSOURCEDATE
#> 18     GOEGSOURCEDATE
#> 19     GOEGSOURCENAME
#> 20      GOEGSOURCEURL
#> 21     KEGGSOURCENAME
#> 22      KEGGSOURCEURL
#> 23     KEGGSOURCEDATE
#> 24       GPSOURCENAME
#> 25        GPSOURCEURL
#> 26       GPSOURCEDATE
#> 27       ENSOURCEDATE
#> 28       ENSOURCENAME
#> 29        ENSOURCEURL
#> 30       UPSOURCENAME
#> 31        UPSOURCEURL
#> 32       UPSOURCEDATE
#>                                                    value
#> 1                                                    2.1
#> 2                                                 ChipDb
#> 3                                            SomaScan.db
#> 4                                           HUMANCHIP_DB
#> 5                                           Homo sapiens
#> 6                                                  Human
#> 7                                              SomaLogic
#> 8                                               SomaScan
#> 9               https://somalogic.com/somascan-platform/
#> 10                                            2023-Sep11
#> 11                                           Entrez Gene
#> 12                  ftp://ftp.ncbi.nlm.nih.gov/gene/DATA
#> 13                                              ENTREZID
#> 14                                                  9606
#> 15                                         Gene Ontology
#> 16 http://current.geneontology.org/ontology/go-basic.obo
#> 17                                            2023-07-27
#> 18                                            2023-Sep11
#> 19                                           Entrez Gene
#> 20                  ftp://ftp.ncbi.nlm.nih.gov/gene/DATA
#> 21                                           KEGG GENOME
#> 22                  ftp://ftp.genome.jp/pub/kegg/genomes
#> 23                                            2011-Mar15
#> 24             UCSC Genome Bioinformatics (Homo sapiens)
#> 25                                                      
#> 26                                            2023-Aug20
#> 27                                            2023-May10
#> 28                                               Ensembl
#> 29               ftp://ftp.ensembl.org/pub/current_fasta
#> 30                                               Uniprot
#> 31                               http://www.UniProt.org/
#> 32                              Mon Sep 18 16:12:39 2023