Skip to contents

This will use the form on the app located at the URL path of /sessions/new_session. It will create a new session (staging area) in order to put the data files prior to loading into the database portion of the app. After making a new session, then run send_file_to_session() for the required files. You can make sure the files have no warnings or errors by running dry_run_session(). Then you can run load_session() in order to trigger a task on the app which loads the data from the session and into the app database.

Usage

begin_new_session(
  session_name,
  session_type = c("expr", "GEO", "features", "extract", "analysis"),
  user_cookie = login_and_get_user_cookie(),
  server_url = Sys.getenv("GXPA_SERVER", "https://geneatlas.redda.bms.com/")
)

Arguments

session_name

the name of the new session in the app (letters, numbers and underscores only)

session_type

The type of session to begin: expr (default), GEO, features, extract, analysis

the cookie string. Can use login_and_get_user_cookie() to get it. If you don't provide the cookie string, then the function will run login_and_get_user_cookie(). So, if you provide the cookie then it saves one interaction with the server.

server_url

GXPA server (default GXPA_SERVER environment variable or https://geneatlas.redda.bms.com/ if missing)

Value

If successful, the session ID (6 characters) will be returned, and it can be used for other session functions. If unsuccessful returns the full html output which can be useful for debugging

Examples

if (FALSE) { # \dontrun{
user_cookie <- login_and_get_user_cookie()
begin_new_session("new_test_session", user_cookie = user_cookie)
} # }