Learn R Programming

gCMAPWeb (version 1.12.0)

examplePost: Simulate POST request

Description

This function returns a simulated POST request, similar to those generated from user-input into the web interface.

Usage

examplePost(cmap, inputType = "non-directional", species = "human", array.platform = NULL, idType = "entrez", rows = 1000, add = 3, seed = 123)

Arguments

cmap
NChannelSet object, e.g. generated by the exampleCMAP function
inputType
character, one of directional, non-directional, profile
species
character, should match a species supported by the loaded gCMAPWeb configuration file
array.platform
character, should match an array platform supported by the loaded gCMAPWeb configuration file
idType
character, one of entrez, symbol or probe
rows
integer, number of genes to include in a 'profile' query.
add
numeric, score shift for scores in the first sample column. Scores for genes 1-50 will be shifted up, those for genes 51-100 down. Only used to simulate 'profile' queries.
seed
numeric, seed for the random number generator. Default=123

Value

list, containg the same elements as a gCMAPWeb POST request

Details

This function is mainly intented for testing purposes.

Examples

Run this code
if( require( "org.Hs.eg.db", character.only=TRUE)){
  ## generate an example NChannelSet for human EntrezIds
  e <- exampleCMAP( universe="org.Hs.eg", rows=1000, cols=10)
  ## generate a matching example Post, simulating a non-directional query
  examplePost( cmap=e )
  ## or a directional query
  examplePost( cmap=e, inputType="directional")
}

Run the code above in your browser using DataLab