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

Description Usage Arguments Value Note Examples

View source: R/build_req.R

Description

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

Usage

1
2
3
4
5
6
7
8
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

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

vjcitn/oc2bioc documentation built on Jan. 31, 2021, 6:20 p.m.