run_oc_req: build a runnable python program that posts a file of variants...

View source: R/build_req.R

run_oc_reqR Documentation

build a runnable python program that posts a file of variants to OpenCRAVAT

Description

build a runnable python program that posts a file of variants to OpenCRAVAT

Usage

run_oc_req(
  url = "http://0.0.0.0:8080/submit/submit",
  postfile = "/tmp/abc.txt",
  annotators = c("clinvar", "segway_lung"),
  reports = c("text", "vcf"),
  assembly = "hg38",
  note = "test run"
)

Arguments

url

'submit/submit' OpenCRAVAT endpoint url

postfile

path to file with variants in TSV format

annotators

character() vector of annotator names, must be installed in server identified by 'url'

reports

character() vector of reporter names, must be available in server identified by 'url'

assembly

character(1) hg38 or hg37

note

character(1) arbitrary string

Value

a reticulate python.builtin.dict with component 'r' for which 'r$json()' will return metadata about run; an attribute 'serverurl' is added with the serverurl string, omitting the 'submit/submit...'

Note

This is an extremely fragile and cumbersome approach. It would be better to compose using a JSON constructor, and to use httr::POST. But the quoting requirements and the use of open() in the request seem hard for such an approach.

Examples

if (interactive()) run_oc_req()  # then use reticulate run_py_*

vjcitn/oc2bioc documentation built on Sept. 7, 2024, 10:23 a.m.