annmap.utils: annmap 'utils' functions

Description Usage Arguments Details Author(s) See Also Examples

Description

Functions to connect to the database and manage the database connections.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
  annmapConnect( name, use.webservice=FALSE, quiet.webservice=FALSE )
  annmapDisconnect()
  annmapAddConnection( dsname, species, version,
                       host='localhost',
                       username=as.character( Sys.info()[ 'user' ] ),
                       password='',
                       port='',
                       overwrite=FALSE,
                       testConnect=TRUE )
  arrayType( name=NULL, pick.default=FALSE, silent=FALSE )
  annmapToggleCaching()
  annmapClearCache()
  annmapRangeApply( x, f, filter=c( chr="space", start="start", end="end", strand="strand" ), coerce=c( as.character, as.numeric, as.numeric, as.numeric ), ... )
  strandAsInteger( granges )
  geneToGeneRegionTrack( genes, genome, coalesce.name=NULL, ... )

Arguments

name

The name of the database to connect to, or the array to select.

use.webservice

If TRUE, we will use the annmap webservices rather than a local MySQL installation.

quiet.webservice

If FALSE, there will be output as the webservice calls are processed. Set TRUE to silence these.

dsname

The name of the datasource to add or modify.

species

The species of interest.

version

The version of the database to connect to.

host

The location of the MySQL installation.

username

The username to connect to MySQL.

password

The password required to connect to MySQL.

port

The port MySQL is running on. (Use NA for default)

overwrite

If another connection with this dsname already exists, should it be overwritten?

testConnect

If TRUE, the connection will be attempted before adding it to the databases.txt file.

pick.default

If TRUE, arrayType will choose the first available arraytype for this species.

silent

If TRUE, it will skip telling you which array you have selected.

x

A RangedData object

f

A function to apply to each \'row\' of the RangedData object

filter

Which \'columns\' of the RangedData object does the function need, and what parameters in the function do they map on to?. For example, by default, the field \'space\' gets mapped to the parameter \'chr\'.

coerce

What is the type of each parameter in \'f\'?

...

additional parameters

granges

A GRanges object

genes

The genes you wish to load into a GeneRegionTrack they must all be on the same chromosome.

genome

A valid Gviz genome, ie: 'hg19'.

coalesce.name

If this is a character vector, all genes will be joined into a single track with this name. Otherwise each gene will have its own track.

Details

annmapConnect is used to establish a connection to an instance of the Annmap database, and annmapDisconnect closes the connection.

arrayType is used to specify the array you wish to use for queries based on Affymetrix probesets.

Many of the functions in annmap cache results locally. The function annmapToggleCaching turns this functionality on and off, and annmapClearCache can be used to clear the cache (this is not normally something a user needs to do).

Note that details of how to set up the default databases, connection details, etc. Can be found in the package vignette.

The function strandAsInteger takes a GRanges object and returns an integer vector of strands in the Ensembl style. "+" becomes 1, "-" becomes -1, and "*" becomes NA.

The function geneToGeneRegionTrack takes a list of genes (character vector, GRanges object, etc), and returns a list of GeneRegionTracks which can be plotted in Gviz. There is an example in the cookbook.

Author(s)

Tim Yates Crispin J. Miller

See Also

annmapTo
annmapDetails
annmapAll
annmapRange
annmapFilters

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  if(interactive()) {
    annmapConnect()
    annmapToggleCaching()
    annmapToggleCaching()

    annmapRangeApply(symbolToGene("TP53",as.vector=FALSE),probeInRange)

    #NOTE: since the next function empties out the local cache, don't
    #run it unless you want to do this!
    #annmapClearCache()
 }

annmap documentation built on Nov. 8, 2020, 7:43 p.m.