query: query bfabric

View source: R/fgcz.R

queryR Documentation

query bfabric

Description

query bfabric

Usage

query(
  login,
  webservicepassword,
  endpoint = "workunit",
  query,
  posturl = "http://localhost:5000/q",
  as_data_frame = FALSE
)

Arguments

login

bfabric login

webservicepassword

bfabric webservicepassword, visible when you check your user details in the bfabric system.

endpoint

the endpoint, e.g., 'sample'

query

e,g, list(containerid = 3000)

posturl

where the flask server is working

as_data_frame

if TRUE it returns a data.frame object.

Value

a nested list object

Examples


## Not run: 
query(login, webservicepassword, endpoint='sample', query = list(id=206577))

## End(Not run)

## Not run: 
 RES <- query(endpoint = 'resource',
    query = list('filechecksum' = '127f0c5b6352a326f9a6c8458d59d921'),
    login, webservicepassword)

 WU.pending <- query(endpoint='workunit',
    query = list('status' = 'pending'),
    login, webservicepassword)

 APP.analysis <- query(endpoint='application',
    query=list('applicationtype' = 'analysis'),
    login, webservicepassword)

 # a more complex example

 ## query metadata
 Q <- query(login, webservicepassword,
   endpoint = 'resource',
   query = list('workunitid' = 163763))

 ## stage data
 uris <- sapply(Q$res, function(x){x$uris[3]})
 (rawfilenames <- sapply(strsplit(unlist(uris), ":"), function(x){x[3]}))
 library(rawfileQC)
 library(parallel)
 RAW <- do.call('rbind',
   mclapply(rawfilenames, read.raw, ssh = TRUE, mc.cores = 12))

 ## have fun
 hex.bin(RAW)

## End(Not run)

## Have Fun!

cpanse/bfabricShiny documentation built on March 27, 2024, 1:53 a.m.