ndex_connect: Connect to NDEx REST API

Description Usage Arguments Value See Also Examples

View source: R/ndex_connect.r

Description

This function creates an NDExConnection which stores options and authentication details. It is a parameter required for most of the other ndexr functions. If username and password are missing an anonymous connection is created, which already offers most of the retrieval functionality.

Usage

1
2
3
ndex_connect(username, password, host = ndexConf$connection$host,
  apiPath = ndexConf$connection$api, ndexConf = ndex_config,
  verbose = FALSE)

Arguments

username

character (optional); username

password

character (optional); password

host

character (default: ndexConf$connection$host); Host address of NDEx server; By default the url set in ndexConf$defaults$connection$host is used. ("http://www.ndexbio.org")

apiPath

character (default: ndexConf$connection$api); URL path of the REST api; By default the url set in ndexConf$defaults$connection$api is used. ("/v2" for NDEx version 2.0, "/rest" for NDEx version 1.3)

ndexConf

config object (nested list, default: ndex_config); Configuration of NDEx REST server; Set in ndex_config (set in ndex_api_config.r or ndex_api_config.yml): It contains specifications for NDEx server api version 1.3 and 2.0. The default api is specified by 'defaultVersion'

verbose

logical (optional); whether to print out extended feedback

Value

returns object of class NDExConnection which stores options, authentication and api configuration if successfull, NULL otherwise

See Also

ndex_config

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## log in anonymously
ndexcon = ndex_connect()
## same as above with extended feedback
ndexcon = ndex_connect(verbose=TRUE)
## Not run: 
## log in with credentials
ndexcon = ndex_connect('user','password')
## running some NDEx server locally
ndexcon = ndex_connect(host='localhost:8765')
## manually change the api and connection configuration
ndexcon = ndex_connect(ndexConf=ndex_config$Version_2.0)   

## End(Not run)

ndexr documentation built on April 29, 2020, 5:20 a.m.