diff --git a/NAMESPACE b/NAMESPACE index e2f371e..823493b 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,10 +1,5 @@ # Generated by roxygen2: do not edit by hand -export(ov.config.cravat) -export(ov.config.md) -export(ov.config.system) -export(ov.feedback) -export(ov.gui) export(ov.module.info) export(ov.module.install) export(ov.module.installbase) @@ -13,18 +8,17 @@ export(ov.module.uninstall) export(ov.module.update) export(ov.new.annotator) export(ov.new.exampleinput) -export(ov.report) -export(ov.run) export(ov.store.changepassword) export(ov.store.checklogin) -export(ov.store.newaccount) +export(ov.store.createaccount) export(ov.store.publish) export(ov.store.resetpassword) export(ov.store.verifyemail) +export(ov.system.config) +export(ov.system.md) +export(ov.system.setup) +export(ov.util.addjob) export(ov.util.filtersqlite) export(ov.util.mergesqlite) -export(ov.util.sendgui) -export(ov.util.showsqliteinfo) +export(ov.util.sqliteinfo) export(ov.util.test) -export(ov.util.updateresult) -export(ov.version) diff --git a/R/roakvar.R b/R/roakvar.R index f50a6ff..a6027c3 100644 --- a/R/roakvar.R +++ b/R/roakvar.R @@ -1,346 +1,839 @@ -#' ov.run -#' -#' Run a job -#' -#' @param inputs Input file(s). One or more variant files in a supported format like VCF. See the -i/--input-format flag for supported formats. In the special case where you want to add annotations to an existing OakVar analysis, provide the output sqlite database from the previous run as input instead of a variant input file. -#' @param annotators Annotator module names or directories. If --package is used also, annotator modules defined with -a will be added. -#' @param annotators_replace Annotator module names or directories. If --package is used also, annotator modules defined with -A will replace those defined with --package. -A has priority over -a. -#' @param excludes annotators to exclude -#' @param run_name name of oakvar run -#' @param output_dir directory for output files -#' @param startat starts at given stage -#' @param endat ends after given stage. -#' @param skip skips given stage(s). -#' @param conf path to a conf file -#' @param confs configuration string -#' @param verbose verbose -#' @param reports Reporter types or reporter module directories -#' @param genome reference genome of input. OakVar will lift over to hg38 if needed. -#' @param cleandb deletes the existing result database and creates a new one. -#' @param newlog deletes the existing log file and creates a new one. -#' @param note note will be written to the run status file (.status.json) -#' @param mp number of processes to use to run annotators -#' @param forcedinputformat Force input format -#' @param temp_files Leave temporary files after run is complete. -#' @param writeadmindb Write job information to admin db after job completion -#' @param jobid Job ID for server version -#' @param show_version Shows OakVar version. -#' @param separatesample Separate variant results by sample -#' @param unique_variants Set to get only unique variants in output -#' @param primary_transcript "mane" for MANE transcripts as primary transcripts, or a path to a file of primary transcripts. MANE is default. -#' @param clean_run Deletes all previous output files for the job and generate new ones. -#' @param do_not_change_status Job status in status.json will not be changed -#' @param module_option Module-specific option in module_name.key=value syntax. For example, --module-option vcfreporter.type=separate -#' @param system_option System option in key=value syntax. For example, --system-option modules_dir=/home/user/oakvar/modules -#' @param silent Runs silently. -#' @param concise_report Generate concise reports with default columns defined by each annotation module -#' @param package Use package -#' @param filtersql Filter SQL -#' @param includesample Sample IDs to include -#' @param excludesample Sample IDs to exclude -#' @param filter ==SUPPRESS== -#' @param filterpath Path to a filter file -#' @param md Specify the root directory of OakVar modules (annotators, etc) -#' @param mapper_name Mapper module name or mapper module directory -#' @param postaggregators Postaggregators to run. Additionally, tagsampler, casecontrol, varmeta, and vcfinfo will automatically run depending on conditions. +#' ov.module.installbase +#' +#' installs base modules. +#' +#' @param force Overwrite existing modules +#' @param force_data Download data even if latest data is already installed +#' @param md Specify the root directory of OakVar modules +#' @param quiet suppress stdout output +#' +#' @return A boolean. TRUE if successful, FALSE if not +#' #' @export -ov.run <- function( - inputs=NULL, - annotators=list(), - annotators_replace=list(), - excludes=list(), - run_name=NULL, - output_dir=NULL, - startat=NULL, - endat=NULL, - skip=NULL, - conf="oc.yml", - confs=NULL, - verbose=NULL, - reports=list(), - genome=NULL, - cleandb=FALSE, - newlog=NULL, - note=NULL, - mp=NULL, - forcedinputformat=NULL, - temp_files=NULL, - writeadmindb=NULL, - jobid=NULL, - show_version=NULL, - separatesample=NULL, - unique_variants=NULL, - primary_transcript=list(), - clean_run=NULL, - do_not_change_status=NULL, - module_option=NULL, - system_option=NULL, - silent=NULL, - concise_report=NULL, - package=NULL, - filtersql=NULL, - includesample=NULL, - excludesample=NULL, - filter=NULL, - filterpath=NULL, +#' +#' @examples +#' # Install OakVar system modules +#' ov.module.installbase() +#' +ov.module.installbase <- function( + force=FALSE, + force_data=FALSE, md=NULL, - mapper_name=list(), - postaggregators=list() + quiet=TRUE ) { - if (typeof(inputs) == "character") { - inputs = list(inputs) + oakvar = reticulate::import("oakvar") + ret <- oakvar$ov_module_installbase( + list( + force=force, + force_data=force_data, + md=md, + quiet=quiet + ) + ) + return(ret) +} + +#' ov.module.install +#' +#' Installs OakVar modules. +#' +#' @param modules Modules to install. May be regular expressions. +#' @param force Install module even if latest version is already installed +#' @param force_data Download data even if latest data is already installed +#' @param yes Proceed without prompt +#' @param skip_dependencies Skip installing dependencies +#' @param private Install a private module +#' @param skip_data Skip installing data +#' @param md Specify the root directory of OakVar modules +#' @param to 'stdout' to print. 'return' to return +#' @param quiet suppress stdout output +#' +#' @return A boolean. TRUE if successful, FALSE if not +#' +#' @export +#' +#' @examples +#' # Install the ClinVar module +#' ov.module.install(modules="clinvar") +#' # Install the ClinVar and the COSMIC modules +#' ov.module.install(modules=list("clinvar", "cosmic") +#' # Re-install the ClinVar module overwriting the already installed copy +#' ov.module.install(modules="clinvar", force=TRUE) +#' +ov.module.install <- function( + modules=NULL, + force=FALSE, + force_data=FALSE, + yes=FALSE, + skip_dependencies=FALSE, + private=FALSE, + skip_data=FALSE, + md=NULL, + to="return", + quiet=TRUE +) { + if (is.null(modules) || modules == "") { + print("modules is required. returning.") } - if (typeof(annotators) == "character") { - annotators = list(annotators) + oakvar = reticulate::import("oakvar") + ret <- oakvar$ov_module_install( + list( + modules=modules, + force=force, + force_data=force_data, + yes=yes, + skip_dependencies=skip_dependencies, + private=private, + skip_data=skip_data, + md=md, + to=to, + quiet=quiet + ) + ) + return(ret) +} + +#' ov.module.update +#' +#' updates modules. +#' +#' @param modules Modules to update. +#' @param y Proceed without prompt +#' @param strategy Dependency resolution strategy. "consensus" will attempt to resolve dependencies. "force" will install the highest available version. "skip" will skip modules with constraints. +#' @param md Specify the root directory of OakVar modules +#' @param quiet suppress stodout output +#' +#' @return A boolean. TRUE if successful, FALSE if not +#' +#' @export +#' +#' @examples +#' # Update the ClinVar module +#' ov.module.update(modules="clinvar") +#' # Update all the installed modules +#' ov.module.update() +#' +ov.module.update <- function( + modules=NULL, + y=FALSE, + strategy="consensus", + md=NULL, + quiet=TRUE +) { + if (is.null(modules) || modules == "") { + print("modules is required. returning.") } - if (typeof(annotators_replace) == "character") { - annotators_replace = list(annotators_replace) + oakvar = reticulate::import("oakvar") + ret <- oakvar$ov_module_update( + list( + modules=modules, + y=y, + strategy=strategy, + md=md, + quiet=quiet + ) + ) + return(ret) +} + +#' ov.module.uninstall +#' +#' @param modules Modules to uninstall +#' @param yes Proceed without prompt +#' @param md Specify the root directory of OakVar modules +#' @param quiet Run quietly +#' +#' @return A boolean. TRUE if successful, FALSE if not +#' +#' @export +#' +#' @examples +#' # Uninstall the ClinVar module +#' ov.module.uninstall(modules="clinvar")# Uninstall the ClinVar and the COSMIC modules +#' ov.module.uninstall(modules=("clinvar", "cosmic") +#' +ov.module.uninstall <- function( + modules=NULL, + yes=FALSE, + md=NULL, + quiet=TRUE +) { + if (is.null(modules) || modules == "") { + print("modules is required. returning.") } - if (typeof(excludes) == "character") { - excludes = list(excludes) + oakvar = reticulate::import("oakvar") + ret <- oakvar$ov_module_uninstall( + list( + modules=modules, + yes=yes, + md=md, + quiet=quiet + ) + ) + return(ret) +} + +#' ov.module.info +#' +#' @param module Module to get info about +#' @param local Include local info +#' @param md Specify the root directory of OakVar modules +#' @param fmt format of module information data. json or yaml +#' @param to "stdout" to stdout / "return" to return +#' @param quiet Run quietly +#' +#' @return A named list. Information of the queried module +#' +#' @export +#' +#' @examples +#' # Get the information of the ClinVar module +#' ov.module.info(module="clinvar") +#' +ov.module.info <- function( + module=NULL, + local=FALSE, + md=NULL, + fmt="json", + to="return", + quiet=TRUE +) { + if (is.null(module) || module == "") { + print("module is required. returning.") } - if (typeof(skip) == "character") { - skip = list(skip) + oakvar = reticulate::import("oakvar") + ret <- oakvar$ov_module_info( + list( + module=module, + local=local, + md=md, + fmt=fmt, + to=to, + quiet=quiet + ) + ) + return(ret) +} + +#' ov.module.ls +#' +#' lists modules. +#' +#' @param pattern Regular expression for module names +#' @param available Include available modules +#' @param types Only list modules of certain types +#' @param include_hidden Include hidden modules +#' @param tags Only list modules of given tag(s) +#' @param nameonly Only list module names +#' @param raw_bytes Machine readable data sizes +#' @param md Specify the root directory of OakVar modules +#' @param fmt Output format. tabular or json +#' @param to stdout to print / return to return +#' @param quiet Run quietly +#' +#' @return A named list. List of modules +#' +#' @export +#' +#' @examples +#' # Get the list of all installed modules +#' ov.module.ls() +#' # Get the list of all available modules +#' ov.module.ls(available=TRUE) +#' # Get the list of all available modules of the type "converter" +#' ov.module.ls(available=TRUE, types="converter") +#' +ov.module.ls <- function( + pattern=".*", + available=FALSE, + types=list(), + include_hidden=FALSE, + tags=list(), + nameonly=FALSE, + raw_bytes=FALSE, + md=NULL, + fmt="json", + to="return", + quiet=TRUE +) { + oakvar = reticulate::import("oakvar") + ret <- oakvar$ov_module_ls( + list( + pattern=pattern, + available=available, + types=types, + include_hidden=include_hidden, + tags=tags, + nameonly=nameonly, + raw_bytes=raw_bytes, + md=md, + fmt=fmt, + to=to, + quiet=quiet + ) + ) + return(ret) +} + +#' ov.new.exampleinput +#' +#' @param directory Directory to make the example input file in +#' @param quiet Run quietly +#' +#' @return A string. Location of the example input file +#' +#' @export +#' +#' @examples +#' # Create an example input file in the current working directory +#' ov.new.exampleinput() +#' # Create an example input file at /home/user1/ +#' ov.new.exampleinput(directory="/home/user1") +#' +ov.new.exampleinput <- function( + directory=".", + quiet=TRUE +) { + oakvar = reticulate::import("oakvar") + ret <- oakvar$ov_new_exampleinput( + list( + directory=directory, + quiet=quiet + ) + ) + return(ret) +} + +#' ov.new.annotator +#' +#' @param annotator_name Annotator name +#' @param md Specify the root directory of OakVar modules +#' @param quiet No print to stdout +#' +#' @return A string. Location of the new annotator module +#' +#' @export +#' +#' @examples +#' # Create an annotator template at the OakVar modules directory/annotators/annotatortest +#' ov.new.annotator(annotator_name="annotatortest") +#' +ov.new.annotator <- function( + annotator_name="exampleannotator", + md=NULL, + quiet=TRUE +) { + oakvar = reticulate::import("oakvar") + ret <- oakvar$ov_new_annotator( + list( + annotator_name=annotator_name, + md=md, + quiet=quiet + ) + ) + return(ret) +} + +#' ov.store.publish +#' +#' @param module module to publish +#' @param data publishes module with data. +#' @param code publishes module without data. +#' @param user user to publish as. Typically your email. +#' @param password password for the user. Enter at prompt if missing. +#' @param force_yes overrides yes to overwrite question +#' @param overwrite overwrites a published module/version +#' @param md Specify the root directory of OakVar modules +#' @param quiet Run quietly +#' +#' @return A boolean. A boolean. TRUE if successful, FALSE if not +#' +#' @export +#' +#' @examples +#' # Publish "customannot" module to the store +#' ov.store.publish(module="customannot", user="user1", password="password") +#' +ov.store.publish <- function( + module=NULL, + data=FALSE, + code=FALSE, + user=NULL, + password=NULL, + force_yes=FALSE, + overwrite=FALSE, + md=NULL, + quiet=TRUE +) { + if (is.null(module) || module == "") { + print("module is required. returning.") } - if (typeof(reports) == "character") { - reports = list(reports) + oakvar = reticulate::import("oakvar") + ret <- oakvar$ov_store_publish( + list( + module=module, + data=data, + code=code, + user=user, + password=password, + force_yes=force_yes, + overwrite=overwrite, + md=md, + quiet=quiet + ) + ) + return(ret) +} + +#' ov.store.createaccount +#' +#' @param username use your email as your username. +#' @param password this is your password. +#' @param quiet Run quietly +#' +#' @return A string. Response from the store server +#' +#' @export +#' +#' @examples +#' # Create a store account +#' ov.store.newaccount(username="user1", password="password") +#' +ov.store.createaccount <- function( + username=NULL, + password=NULL, + quiet=TRUE +) { + if (is.null(username) || username == "") { + print("username is required. returning.") } - if (typeof(module_option) == "character") { - module_option = list(module_option) + if (is.null(password) || password == "") { + print("password is required. returning.") } - if (typeof(system_option) == "character") { - system_option = list(system_option) + oakvar = reticulate::import("oakvar") + ret <- oakvar$ov_store_createaccount( + list( + username=username, + password=password, + quiet=quiet + ) + ) + return(ret) +} + +#' ov.store.changepassword +#' +#' @param username username +#' @param current_password current password +#' @param new_password new password +#' @param quiet Run quietly +#' +#' @return A string. Response from the store server +#' +#' @export +#' +#' @examples +#' # Change the password of a store account +#' ov.store.changepassword(username="user1", current_password="password", new_password="newpassword") +#' +ov.store.changepassword <- function( + username=NULL, + current_password=NULL, + new_password=NULL, + quiet=TRUE +) { + if (is.null(username) || username == "") { + print("username is required. returning.") } - if (typeof(includesample) == "character") { - includesample = list(includesample) + if (is.null(current_password) || current_password == "") { + print("current_password is required. returning.") } - if (typeof(excludesample) == "character") { - excludesample = list(excludesample) + if (is.null(new_password) || new_password == "") { + print("new_password is required. returning.") } - if (typeof(mapper_name) == "character") { - mapper_name = list(mapper_name) + oakvar = reticulate::import("oakvar") + ret <- oakvar$ov_store_changepassword( + list( + username=username, + current_password=current_password, + new_password=new_password, + quiet=quiet + ) + ) + return(ret) +} + +#' ov.store.resetpassword +#' +#' @param quiet Run quietly +#' @param username username +#' +#' @return A boolean. A boolean. TRUE if successful, FALSE if not +#' +#' @export +#' +#' @examples +#' # Ask the store to send an email to reset the password of a store account +#' ov.store.resetpassword(username="user1") +#' +ov.store.resetpassword <- function( + quiet=TRUE, + username=NULL +) { + if (is.null(username) || username == "") { + print("username is required. returning.") } - if (typeof(postaggregators) == "character") { - postaggregators = list(postaggregators) + oakvar = reticulate::import("oakvar") + ret <- oakvar$ov_store_resetpassword( + list( + quiet=quiet, + username=username + ) + ) + return(ret) +} + +#' ov.store.verifyemail +#' +#' @param username username +#' @param quiet Run quietly +#' +#' @return `NULL` +#' +#' @export +#' +#' @examples +#' # Ask the store to send an email to verify the email of a user account +#' ov.store.verifyemail(username="user1") +#' +ov.store.verifyemail <- function( + username=NULL, + quiet=TRUE +) { + if (is.null(username) || username == "") { + print("username is required. returning.") } oakvar = reticulate::import("oakvar") - ret <- oakvar$cli_run$fn_run( + ret <- oakvar$ov_store_verifyemail( list( - inputs=inputs, - annotators=annotators, - annotators_replace=annotators_replace, - excludes=excludes, - run_name=run_name, - output_dir=output_dir, - startat=startat, - endat=endat, - skip=skip, - conf=conf, - confs=confs, - verbose=verbose, - reports=reports, - genome=genome, - cleandb=cleandb, - newlog=newlog, - note=note, - mp=mp, - forcedinputformat=forcedinputformat, - temp_files=temp_files, - writeadmindb=writeadmindb, - jobid=jobid, - show_version=show_version, - separatesample=separatesample, - unique_variants=unique_variants, - primary_transcript=primary_transcript, - clean_run=clean_run, - do_not_change_status=do_not_change_status, - module_option=module_option, - system_option=system_option, - silent=silent, - concise_report=concise_report, - package=package, - filtersql=filtersql, - includesample=includesample, - excludesample=excludesample, - filter=filter, - filterpath=filterpath, - md=md, - mapper_name=mapper_name, - postaggregators=postaggregators + username=username, + quiet=quiet ) ) return(ret) } -#' ov.report +#' ov.store.checklogin #' -#' Generate reports from a job +#' @param username username +#' @param password password +#' @param quiet Run quietly +#' +#' @return A boolean. A boolean. TRUE if successful, FALSE if not #' -#' @param dbpath Path to aggregator output -#' @param reporttypes report types -#' @param filterpath Path to filter file -#' @param filter ==SUPPRESS== -#' @param filtersql Filter SQL -#' @param filtername Name of filter (stored in aggregator output) -#' @param filterstring ==SUPPRESS== -#' @param savepath Path to save file -#' @param confpath path to a conf file -#' @param module_name report module name -#' @param nogenelevelonvariantlevel Use this option to prevent gene level result from being added to variant level result. -#' @param confs Configuration string -#' @param inputfiles Original input file path -#' @param separatesample Write each variant-sample pair on a separate line -#' @param output_dir directory for output files -#' @param do_not_change_status Job status in status.json will not be changed -#' @param silent Suppress output to STDOUT -#' @param system_option System option in key=value syntax. For example, --system-option modules_dir=/home/user/oakvar/modules -#' @param module_option Module-specific option in module_name.key=value syntax. For example, --module-option vcfreporter.type=separate -#' @param concise_report Generate concise report with default columns defined by annotation modules -#' @param includesample Sample IDs to include -#' @param excludesample Sample IDs to exclude -#' @param package Use filters and report types in a package -#' @param md Specify the root directory of OakVar modules (annotators, etc) #' @export -ov.report <- function( - dbpath=NULL, - reporttypes=list(), - filterpath=NULL, - filter=NULL, - filtersql=NULL, - filtername=NULL, - filterstring=NULL, - savepath=NULL, - confpath=NULL, - module_name=NULL, - nogenelevelonvariantlevel=FALSE, - confs="{}", - inputfiles=NULL, - separatesample=FALSE, - output_dir=NULL, - do_not_change_status=FALSE, - silent=FALSE, - system_option=NULL, - module_option=NULL, - concise_report=FALSE, - includesample=NULL, - excludesample=NULL, - package=NULL, - md=NULL +#' +#' @examples +#' # Check if the login information of a user is correct +#' ov.store.checklogin(username="user1", password="password") +#' +ov.store.checklogin <- function( + username=NULL, + password=NULL, + quiet=TRUE ) { - if (is.null(dbpath) || dbpath == "") { - print("dbpath is required. returning.") + if (is.null(username) || username == "") { + print("username is required. returning.") } - if (typeof(reporttypes) == "character") { - reporttypes = list(reporttypes) + if (is.null(password) || password == "") { + print("password is required. returning.") } - if (typeof(inputfiles) == "character") { - inputfiles = list(inputfiles) + oakvar = reticulate::import("oakvar") + ret <- oakvar$ov_store_checklogin( + list( + username=username, + password=password, + quiet=quiet + ) + ) + return(ret) +} + +#' ov.util.test +#' +#' Test modules +#' +#' @param rundir Directory for output +#' @param modules Name of module(s) to test. (e.g. gnomad) +#' @param mod_types Type of module(s) to test (e.g. annotators) +#' @param to stdout to print / return to return +#' @param quiet Run quietly +#' +#' @return A named list. Field result is a named list showing the test result for each module. Fields num_passed and num_failed show the number of passed and failed modules. +#' +#' @export +#' +#' @examples +#' # Test the ClinVar module +#' ov.util.test(modules="clinvar") +#' # Test the ClinVar and the COSMIC modules +#' ov.util.test(modules=list("clinvar", "cosmic")) +#' +ov.util.test <- function( + rundir=NULL, + modules=NULL, + mod_types=NULL, + to="return", + quiet=TRUE +) { + oakvar = reticulate::import("oakvar") + ret <- oakvar$ov_util_test( + list( + rundir=rundir, + modules=modules, + mod_types=mod_types, + to=to, + quiet=quiet + ) + ) + return(ret) +} + +#' ov.util.addjob +#' +#' @param path Path to result database +#' @param user User who will own the job. Defaults to single user default user. +#' +#' @return A boolean. TRUE if successful, FALSE if not +#' +#' @export +#' +#' @examples +#' # Add a result file to the job list of a user +#' ov.util.addjob(path="example.sqlite", user="user1") +#' +ov.util.addjob <- function( + path=NULL, + user="default" +) { + if (is.null(path) || path == "") { + print("path is required. returning.") } - if (typeof(system_option) == "character") { - system_option = list(system_option) + oakvar = reticulate::import("oakvar") + ret <- oakvar$ov_util_addjob( + list( + path=path, + user=user + ) + ) + return(ret) +} + +#' ov.util.mergesqlite +#' +#' @param path Path to result database +#' @param outpath Output SQLite file path +#' +#' @return A boolean. TRUE if successful, FALSE if not +#' +#' @export +#' +#' @examples +#' # Merge two OakVar analysis result files into one SQLite file +#' ov.util.mergesqlite(path=list("example1.sqlite", "example2.sqlite"), outpath="merged.sqlite") +#' +ov.util.mergesqlite <- function( + path=NULL, + outpath=NULL +) { + if (is.null(path) || path == "") { + print("path is required. returning.") } - if (typeof(module_option) == "character") { - module_option = list(module_option) + if (is.null(outpath) || outpath == "") { + print("outpath is required. returning.") } - if (typeof(includesample) == "character") { - includesample = list(includesample) + oakvar = reticulate::import("oakvar") + ret <- oakvar$ov_util_mergesqlite( + list( + path=path, + outpath=outpath + ) + ) + return(ret) +} + +#' ov.util.sqliteinfo +#' +#' @param paths SQLite result file paths +#' @param fmt Output format. text / json / yaml +#' @param to Output to. stdout / return +#' +#' @return A named list. Information of a job SQLite file +#' +#' @export +#' +#' @examples +#' # Get the named list of the information of an analysis result file +#' ov.util.sqliteinfo(paths="example.sqlite") +#' +ov.util.sqliteinfo <- function( + paths=NULL, + fmt="json", + to="return" +) { + if (is.null(paths) || paths == "") { + print("paths is required. returning.") } - if (typeof(excludesample) == "character") { - excludesample = list(excludesample) + oakvar = reticulate::import("oakvar") + ret <- oakvar$ov_util_sqliteinfo( + list( + paths=paths, + fmt=fmt, + to=to + ) + ) + return(ret) +} + +#' ov.util.filtersqlite +#' +#' @param paths Path to result database +#' @param out Output SQLite file folder +#' @param suffix Suffix for output SQLite files +#' @param filterpath Path to a filter JSON file +#' @param filtersql Filter SQL +#' @param includesample Sample IDs to include +#' @param excludesample Sample IDs to exclude +#' +#' @return A boolean. TRUE if successful, FALSE if not +#' +#' @export +#' +#' @examples +#' # Filter an analysis result file with an SQL filter set +#' ov.util.filtersqlite(paths="example.sqlite", filtersql='base__so=="MIS" and gnomad__af>0.01')# Filter two analysis result files with a filter definition file +#' ov.util.filtersqlite(paths=list("example1.sqlite", "example2.sqlite"), filterpath="filter.json") +#' +ov.util.filtersqlite <- function( + paths=NULL, + out=".", + suffix="filtered", + filterpath=NULL, + filtersql=NULL, + includesample=NULL, + excludesample=NULL +) { + if (is.null(paths) || paths == "") { + print("paths is required. returning.") } oakvar = reticulate::import("oakvar") - ret <- oakvar$cli_report$run_reporter( + ret <- oakvar$ov_util_filtersqlite( list( - dbpath=dbpath, - reporttypes=reporttypes, + paths=paths, + out=out, + suffix=suffix, filterpath=filterpath, - filter=filter, filtersql=filtersql, - filtername=filtername, - filterstring=filterstring, - savepath=savepath, - confpath=confpath, - module_name=module_name, - nogenelevelonvariantlevel=nogenelevelonvariantlevel, - confs=confs, - inputfiles=inputfiles, - separatesample=separatesample, - output_dir=output_dir, - do_not_change_status=do_not_change_status, - silent=silent, - system_option=system_option, - module_option=module_option, - concise_report=concise_report, includesample=includesample, - excludesample=excludesample, - package=package, - md=md + excludesample=excludesample ) ) return(ret) } -#' ov.gui -#' -#' @param servermode Runs in multiuser mode -#' @param headless do not open the OakVar web page -#' @param http_only Force not to accept https connection -#' @param debug Console echoes exceptions written to log file. -#' @param result Path to a OakVar result SQLite file -#' @param webapp Name of OakVar webapp module to run -#' @param port Port number for OakVar graphical user interface -#' @param noguest Disables guest mode +#' ov.system.setup +#' +#' Sets up OakVar system +#' +#' @param setup_file setup file to use +#' @param quiet Run quietly +#' +#' @return A boolean. TRUE if successful, FALSE if not +#' #' @export -ov.gui <- function( - servermode=FALSE, - headless=FALSE, - http_only=FALSE, - debug=FALSE, - result=NULL, - webapp=NULL, - port=NULL, - noguest=FALSE +#' +#' @examples +#' # Set up OakVar with defaults +#' ov.system.setup() +#' # Set up OakVar with a setup file +#' ov.system.setup(setup_file="setup.yml") +#' +ov.system.setup <- function( + setup_file=NULL, + quiet=TRUE ) { oakvar = reticulate::import("oakvar") - ret <- oakvar$cli_gui$fn_gui( + ret <- oakvar$ov_system_setup( list( - servermode=servermode, - headless=headless, - http_only=http_only, - debug=debug, - result=result, - webapp=webapp, - port=port, - noguest=noguest + setup_file=setup_file, + quiet=quiet ) ) return(ret) } -#' ov.version +#' ov.system.md +#' +#' displays or changes OakVar modules directory. +#' +#' @param directory sets modules directory. +#' @param to 'stdout' to print. 'return' to return. +#' @param quiet Run quietly +#' +#' @return A string. OakVar modules directory #' -#' @param to "stdout" to print. "return" to return #' @export -ov.version <- function( - to="stdout" +#' +#' @examples +#' # Get the OakVar modules directory +#' ov.system.md() +#' # Set the OakVar modules directory to /home/user1/.oakvar/modules +#' ov.system.md(directory="/home/user1/.oakvar/modules") +#' +ov.system.md <- function( + directory=NULL, + to="return", + quiet=TRUE ) { oakvar = reticulate::import("oakvar") - ret <- oakvar$cli_version$fn_version( + ret <- oakvar$ov_system_md( list( - to=to + directory=directory, + to=to, + quiet=quiet ) ) return(ret) } -#' ov.feedback +#' ov.system.config +#' +#' @param fmt Format of output. json or yaml. +#' @param to "stdout" to print. "return" to return +#' @param quiet Run quietly +#' +#' @return A named list. System config information #' #' @export -ov.feedback <- function( +#' +#' @examples +#' # Get named list of the OakVar system configuration +#' ov.system.config() +#' # Get the OakVar system configuration in YAML text +#' ov.system.config(fmt="yaml")# Print to stdout the OakVar system configuration in YAML text +#' ov.system.config(fmt="yaml", to="stdout") +#' +ov.system.config <- function( + fmt="json", + to="return", + quiet=TRUE ) { oakvar = reticulate::import("oakvar") - ret <- oakvar$cli_feedback$fn_feedback( + ret <- oakvar$ov_system_config( list( + fmt=fmt, + to=to, + quiet=quiet ) ) return(ret) diff --git a/man/ov.config.cravat.Rd b/man/ov.config.cravat.Rd deleted file mode 100644 index 32637d2..0000000 --- a/man/ov.config.cravat.Rd +++ /dev/null @@ -1,16 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/roakvar.R -\name{ov.config.cravat} -\alias{ov.config.cravat} -\title{ov.config.cravat} -\usage{ -ov.config.cravat(fmt = "yaml", to = "stdout") -} -\arguments{ -\item{fmt}{Format of output. json or yaml.} - -\item{to}{"stdout" to print. "return" to return} -} -\description{ -ov.config.cravat -} diff --git a/man/ov.config.md.Rd b/man/ov.config.md.Rd deleted file mode 100644 index c31223c..0000000 --- a/man/ov.config.md.Rd +++ /dev/null @@ -1,14 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/roakvar.R -\name{ov.config.md} -\alias{ov.config.md} -\title{ov.config.md} -\usage{ -ov.config.md(directory = NULL) -} -\arguments{ -\item{directory}{sets modules directory.} -} -\description{ -ov.config.md -} diff --git a/man/ov.config.system.Rd b/man/ov.config.system.Rd deleted file mode 100644 index d5701a5..0000000 --- a/man/ov.config.system.Rd +++ /dev/null @@ -1,16 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/roakvar.R -\name{ov.config.system} -\alias{ov.config.system} -\title{ov.config.system} -\usage{ -ov.config.system(fmt = "yaml", to = "stdout") -} -\arguments{ -\item{fmt}{Format of output. json or yaml.} - -\item{to}{"stdout" to print. "return" to return} -} -\description{ -ov.config.system -} diff --git a/man/ov.feedback.Rd b/man/ov.feedback.Rd deleted file mode 100644 index d85ad2d..0000000 --- a/man/ov.feedback.Rd +++ /dev/null @@ -1,11 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/roakvar.R -\name{ov.feedback} -\alias{ov.feedback} -\title{ov.feedback} -\usage{ -ov.feedback() -} -\description{ -ov.feedback -} diff --git a/man/ov.gui.Rd b/man/ov.gui.Rd deleted file mode 100644 index 11a8a23..0000000 --- a/man/ov.gui.Rd +++ /dev/null @@ -1,37 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/roakvar.R -\name{ov.gui} -\alias{ov.gui} -\title{ov.gui} -\usage{ -ov.gui( - servermode = FALSE, - headless = FALSE, - http_only = FALSE, - debug = FALSE, - result = NULL, - webapp = NULL, - port = NULL, - noguest = FALSE -) -} -\arguments{ -\item{servermode}{Runs in multiuser mode} - -\item{headless}{do not open the OakVar web page} - -\item{http_only}{Force not to accept https connection} - -\item{debug}{Console echoes exceptions written to log file.} - -\item{result}{Path to a OakVar result SQLite file} - -\item{webapp}{Name of OakVar webapp module to run} - -\item{port}{Port number for OakVar graphical user interface} - -\item{noguest}{Disables guest mode} -} -\description{ -ov.gui -} diff --git a/man/ov.module.info.Rd b/man/ov.module.info.Rd index 7df5d33..c445670 100644 --- a/man/ov.module.info.Rd +++ b/man/ov.module.info.Rd @@ -4,7 +4,14 @@ \alias{ov.module.info} \title{ov.module.info} \usage{ -ov.module.info(module = NULL, local = FALSE, md = NULL, to = "stdout") +ov.module.info( + module = NULL, + local = FALSE, + md = NULL, + fmt = "json", + to = "return", + quiet = TRUE +) } \arguments{ \item{module}{Module to get info about} @@ -13,8 +20,20 @@ ov.module.info(module = NULL, local = FALSE, md = NULL, to = "stdout") \item{md}{Specify the root directory of OakVar modules} -\item{to}{"print" to stdout / "return" to return} +\item{fmt}{format of module information data. json or yaml} + +\item{to}{"stdout" to stdout / "return" to return} + +\item{quiet}{Run quietly} +} +\value{ +A named list. Information of the queried module } \description{ ov.module.info } +\examples{ +# Get the information of the ClinVar module +ov.module.info(module="clinvar") + +} diff --git a/man/ov.module.install.Rd b/man/ov.module.install.Rd index 7457fec..4712d0c 100644 --- a/man/ov.module.install.Rd +++ b/man/ov.module.install.Rd @@ -12,7 +12,9 @@ ov.module.install( skip_dependencies = FALSE, private = FALSE, skip_data = FALSE, - md = NULL + md = NULL, + to = "return", + quiet = TRUE ) } \arguments{ @@ -31,7 +33,23 @@ ov.module.install( \item{skip_data}{Skip installing data} \item{md}{Specify the root directory of OakVar modules} + +\item{to}{'stdout' to print. 'return' to return} + +\item{quiet}{suppress stdout output} +} +\value{ +A boolean. TRUE if successful, FALSE if not } \description{ -Install modules +Installs OakVar modules. +} +\examples{ +# Install the ClinVar module +ov.module.install(modules="clinvar") +# Install the ClinVar and the COSMIC modules +ov.module.install(modules=list("clinvar", "cosmic") +# Re-install the ClinVar module overwriting the already installed copy +ov.module.install(modules="clinvar", force=TRUE) + } diff --git a/man/ov.module.installbase.Rd b/man/ov.module.installbase.Rd index b190c13..f981e2f 100644 --- a/man/ov.module.installbase.Rd +++ b/man/ov.module.installbase.Rd @@ -7,8 +7,8 @@ ov.module.installbase( force = FALSE, force_data = FALSE, - install_pypi_dependency = TRUE, - md = NULL + md = NULL, + quiet = TRUE ) } \arguments{ @@ -16,10 +16,18 @@ ov.module.installbase( \item{force_data}{Download data even if latest data is already installed} -\item{install_pypi_dependency}{Try to install non-OakVar package dependency with pip} - \item{md}{Specify the root directory of OakVar modules} + +\item{quiet}{suppress stdout output} +} +\value{ +A boolean. TRUE if successful, FALSE if not } \description{ -ov.module.installbase +installs base modules. +} +\examples{ +# Install OakVar system modules +ov.module.installbase() + } diff --git a/man/ov.module.ls.Rd b/man/ov.module.ls.Rd index 1dae9f5..45ec3ef 100644 --- a/man/ov.module.ls.Rd +++ b/man/ov.module.ls.Rd @@ -10,11 +10,12 @@ ov.module.ls( types = list(), include_hidden = FALSE, tags = list(), - quiet = FALSE, + nameonly = FALSE, raw_bytes = FALSE, md = NULL, - fmt = "tabular", - to = "stdout" + fmt = "json", + to = "return", + quiet = TRUE ) } \arguments{ @@ -28,7 +29,7 @@ ov.module.ls( \item{tags}{Only list modules of given tag(s)} -\item{quiet}{Only list module names} +\item{nameonly}{Only list module names} \item{raw_bytes}{Machine readable data sizes} @@ -37,7 +38,21 @@ ov.module.ls( \item{fmt}{Output format. tabular or json} \item{to}{stdout to print / return to return} + +\item{quiet}{Run quietly} +} +\value{ +A named list. List of modules } \description{ -ov.module.ls +lists modules. +} +\examples{ +# Get the list of all installed modules +ov.module.ls() +# Get the list of all available modules +ov.module.ls(available=TRUE) +# Get the list of all available modules of the type "converter" +ov.module.ls(available=TRUE, types="converter") + } diff --git a/man/ov.module.uninstall.Rd b/man/ov.module.uninstall.Rd index 72931ea..cc300f1 100644 --- a/man/ov.module.uninstall.Rd +++ b/man/ov.module.uninstall.Rd @@ -4,7 +4,7 @@ \alias{ov.module.uninstall} \title{ov.module.uninstall} \usage{ -ov.module.uninstall(modules = NULL, yes = FALSE, md = NULL) +ov.module.uninstall(modules = NULL, yes = FALSE, md = NULL, quiet = TRUE) } \arguments{ \item{modules}{Modules to uninstall} @@ -12,7 +12,18 @@ ov.module.uninstall(modules = NULL, yes = FALSE, md = NULL) \item{yes}{Proceed without prompt} \item{md}{Specify the root directory of OakVar modules} + +\item{quiet}{Run quietly} +} +\value{ +A boolean. TRUE if successful, FALSE if not } \description{ ov.module.uninstall } +\examples{ +# Uninstall the ClinVar module +ov.module.uninstall(modules="clinvar")# Uninstall the ClinVar and the COSMIC modules +ov.module.uninstall(modules=("clinvar", "cosmic") + +} diff --git a/man/ov.module.update.Rd b/man/ov.module.update.Rd index 5f61d7b..6c67c6f 100644 --- a/man/ov.module.update.Rd +++ b/man/ov.module.update.Rd @@ -8,8 +8,8 @@ ov.module.update( modules = NULL, y = FALSE, strategy = "consensus", - install_pypi_dependency = TRUE, - md = NULL + md = NULL, + quiet = TRUE ) } \arguments{ @@ -19,10 +19,20 @@ ov.module.update( \item{strategy}{Dependency resolution strategy. "consensus" will attempt to resolve dependencies. "force" will install the highest available version. "skip" will skip modules with constraints.} -\item{install_pypi_dependency}{Try to install non-OakVar package dependency with pip} - \item{md}{Specify the root directory of OakVar modules} + +\item{quiet}{suppress stodout output} +} +\value{ +A boolean. TRUE if successful, FALSE if not } \description{ -ov.module.update +updates modules. +} +\examples{ +# Update the ClinVar module +ov.module.update(modules="clinvar") +# Update all the installed modules +ov.module.update() + } diff --git a/man/ov.new.annotator.Rd b/man/ov.new.annotator.Rd index 1db68d5..6fd9b2f 100644 --- a/man/ov.new.annotator.Rd +++ b/man/ov.new.annotator.Rd @@ -4,13 +4,23 @@ \alias{ov.new.annotator} \title{ov.new.annotator} \usage{ -ov.new.annotator(annotator_name = "annotator", md = NULL) +ov.new.annotator(annotator_name = "exampleannotator", md = NULL, quiet = TRUE) } \arguments{ \item{annotator_name}{Annotator name} \item{md}{Specify the root directory of OakVar modules} + +\item{quiet}{No print to stdout} +} +\value{ +A string. Location of the new annotator module } \description{ ov.new.annotator } +\examples{ +# Create an annotator template at the OakVar modules directory/annotators/annotatortest +ov.new.annotator(annotator_name="annotatortest") + +} diff --git a/man/ov.new.exampleinput.Rd b/man/ov.new.exampleinput.Rd index b722d06..635366c 100644 --- a/man/ov.new.exampleinput.Rd +++ b/man/ov.new.exampleinput.Rd @@ -4,11 +4,23 @@ \alias{ov.new.exampleinput} \title{ov.new.exampleinput} \usage{ -ov.new.exampleinput(directory = ".") +ov.new.exampleinput(directory = ".", quiet = TRUE) } \arguments{ \item{directory}{Directory to make the example input file in} + +\item{quiet}{Run quietly} +} +\value{ +A string. Location of the example input file } \description{ ov.new.exampleinput } +\examples{ +# Create an example input file in the current working directory +ov.new.exampleinput() +# Create an example input file at /home/user1/ +ov.new.exampleinput(directory="/home/user1") + +} diff --git a/man/ov.report.Rd b/man/ov.report.Rd deleted file mode 100644 index 5410c95..0000000 --- a/man/ov.report.Rd +++ /dev/null @@ -1,85 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/roakvar.R -\name{ov.report} -\alias{ov.report} -\title{ov.report} -\usage{ -ov.report( - dbpath = NULL, - reporttypes = list(), - filterpath = NULL, - filter = NULL, - filtersql = NULL, - filtername = NULL, - filterstring = NULL, - savepath = NULL, - confpath = NULL, - module_name = NULL, - nogenelevelonvariantlevel = FALSE, - confs = "{}", - inputfiles = NULL, - separatesample = FALSE, - output_dir = NULL, - do_not_change_status = FALSE, - silent = FALSE, - system_option = NULL, - module_option = NULL, - concise_report = FALSE, - includesample = NULL, - excludesample = NULL, - package = NULL, - md = NULL -) -} -\arguments{ -\item{dbpath}{Path to aggregator output} - -\item{reporttypes}{report types} - -\item{filterpath}{Path to filter file} - -\item{filter}{==SUPPRESS==} - -\item{filtersql}{Filter SQL} - -\item{filtername}{Name of filter (stored in aggregator output)} - -\item{filterstring}{==SUPPRESS==} - -\item{savepath}{Path to save file} - -\item{confpath}{path to a conf file} - -\item{module_name}{report module name} - -\item{nogenelevelonvariantlevel}{Use this option to prevent gene level result from being added to variant level result.} - -\item{confs}{Configuration string} - -\item{inputfiles}{Original input file path} - -\item{separatesample}{Write each variant-sample pair on a separate line} - -\item{output_dir}{directory for output files} - -\item{do_not_change_status}{Job status in status.json will not be changed} - -\item{silent}{Suppress output to STDOUT} - -\item{system_option}{System option in key=value syntax. For example, --system-option modules_dir=/home/user/oakvar/modules} - -\item{module_option}{Module-specific option in module_name.key=value syntax. For example, --module-option vcfreporter.type=separate} - -\item{concise_report}{Generate concise report with default columns defined by annotation modules} - -\item{includesample}{Sample IDs to include} - -\item{excludesample}{Sample IDs to exclude} - -\item{package}{Use filters and report types in a package} - -\item{md}{Specify the root directory of OakVar modules (annotators, etc)} -} -\description{ -ov.report -} diff --git a/man/ov.run.Rd b/man/ov.run.Rd deleted file mode 100644 index a1d474a..0000000 --- a/man/ov.run.Rd +++ /dev/null @@ -1,136 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/roakvar.R -\name{ov.run} -\alias{ov.run} -\title{ov.run} -\usage{ -ov.run( - inputs = NULL, - annotators = list(), - annotators_replace = list(), - excludes = list(), - run_name = NULL, - output_dir = NULL, - startat = NULL, - endat = NULL, - skip = NULL, - conf = "oc.yml", - confs = NULL, - verbose = NULL, - reports = list(), - genome = NULL, - cleandb = FALSE, - newlog = NULL, - note = NULL, - mp = NULL, - forcedinputformat = NULL, - temp_files = NULL, - writeadmindb = NULL, - jobid = NULL, - show_version = NULL, - separatesample = NULL, - unique_variants = NULL, - primary_transcript = list(), - clean_run = NULL, - do_not_change_status = NULL, - module_option = NULL, - system_option = NULL, - silent = NULL, - concise_report = NULL, - package = NULL, - filtersql = NULL, - includesample = NULL, - excludesample = NULL, - filter = NULL, - filterpath = NULL, - md = NULL, - mapper_name = list(), - postaggregators = list() -) -} -\arguments{ -\item{inputs}{Input file(s). One or more variant files in a supported format like VCF. See the -i/--input-format flag for supported formats. In the special case where you want to add annotations to an existing OakVar analysis, provide the output sqlite database from the previous run as input instead of a variant input file.} - -\item{annotators}{Annotator module names or directories. If --package is used also, annotator modules defined with -a will be added.} - -\item{annotators_replace}{Annotator module names or directories. If --package is used also, annotator modules defined with -A will replace those defined with --package. -A has priority over -a.} - -\item{excludes}{annotators to exclude} - -\item{run_name}{name of oakvar run} - -\item{output_dir}{directory for output files} - -\item{startat}{starts at given stage} - -\item{endat}{ends after given stage.} - -\item{skip}{skips given stage(s).} - -\item{conf}{path to a conf file} - -\item{confs}{configuration string} - -\item{verbose}{verbose} - -\item{reports}{Reporter types or reporter module directories} - -\item{genome}{reference genome of input. OakVar will lift over to hg38 if needed.} - -\item{cleandb}{deletes the existing result database and creates a new one.} - -\item{newlog}{deletes the existing log file and creates a new one.} - -\item{note}{note will be written to the run status file (.status.json)} - -\item{mp}{number of processes to use to run annotators} - -\item{forcedinputformat}{Force input format} - -\item{temp_files}{Leave temporary files after run is complete.} - -\item{writeadmindb}{Write job information to admin db after job completion} - -\item{jobid}{Job ID for server version} - -\item{show_version}{Shows OakVar version.} - -\item{separatesample}{Separate variant results by sample} - -\item{unique_variants}{Set to get only unique variants in output} - -\item{primary_transcript}{"mane" for MANE transcripts as primary transcripts, or a path to a file of primary transcripts. MANE is default.} - -\item{clean_run}{Deletes all previous output files for the job and generate new ones.} - -\item{do_not_change_status}{Job status in status.json will not be changed} - -\item{module_option}{Module-specific option in module_name.key=value syntax. For example, --module-option vcfreporter.type=separate} - -\item{system_option}{System option in key=value syntax. For example, --system-option modules_dir=/home/user/oakvar/modules} - -\item{silent}{Runs silently.} - -\item{concise_report}{Generate concise reports with default columns defined by each annotation module} - -\item{package}{Use package} - -\item{filtersql}{Filter SQL} - -\item{includesample}{Sample IDs to include} - -\item{excludesample}{Sample IDs to exclude} - -\item{filter}{==SUPPRESS==} - -\item{filterpath}{Path to a filter file} - -\item{md}{Specify the root directory of OakVar modules (annotators, etc)} - -\item{mapper_name}{Mapper module name or mapper module directory} - -\item{postaggregators}{Postaggregators to run. Additionally, tagsampler, casecontrol, varmeta, and vcfinfo will automatically run depending on conditions.} -} -\description{ -Run a job -} diff --git a/man/ov.store.changepassword.Rd b/man/ov.store.changepassword.Rd index 3e073be..85aa84e 100644 --- a/man/ov.store.changepassword.Rd +++ b/man/ov.store.changepassword.Rd @@ -7,7 +7,8 @@ ov.store.changepassword( username = NULL, current_password = NULL, - new_password = NULL + new_password = NULL, + quiet = TRUE ) } \arguments{ @@ -16,7 +17,17 @@ ov.store.changepassword( \item{current_password}{current password} \item{new_password}{new password} + +\item{quiet}{Run quietly} +} +\value{ +A string. Response from the store server } \description{ ov.store.changepassword } +\examples{ +# Change the password of a store account +ov.store.changepassword(username="user1", current_password="password", new_password="newpassword") + +} diff --git a/man/ov.store.checklogin.Rd b/man/ov.store.checklogin.Rd index b23847b..53c52d4 100644 --- a/man/ov.store.checklogin.Rd +++ b/man/ov.store.checklogin.Rd @@ -4,13 +4,23 @@ \alias{ov.store.checklogin} \title{ov.store.checklogin} \usage{ -ov.store.checklogin(username = NULL, password = NULL) +ov.store.checklogin(username = NULL, password = NULL, quiet = TRUE) } \arguments{ \item{username}{username} \item{password}{password} + +\item{quiet}{Run quietly} +} +\value{ +A boolean. A boolean. TRUE if successful, FALSE if not } \description{ ov.store.checklogin } +\examples{ +# Check if the login information of a user is correct +ov.store.checklogin(username="user1", password="password") + +} diff --git a/man/ov.store.createaccount.Rd b/man/ov.store.createaccount.Rd new file mode 100644 index 0000000..9166251 --- /dev/null +++ b/man/ov.store.createaccount.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/roakvar.R +\name{ov.store.createaccount} +\alias{ov.store.createaccount} +\title{ov.store.createaccount} +\usage{ +ov.store.createaccount(username = NULL, password = NULL, quiet = TRUE) +} +\arguments{ +\item{username}{use your email as your username.} + +\item{password}{this is your password.} + +\item{quiet}{Run quietly} +} +\value{ +A string. Response from the store server +} +\description{ +ov.store.createaccount +} +\examples{ +# Create a store account +ov.store.newaccount(username="user1", password="password") + +} diff --git a/man/ov.store.newaccount.Rd b/man/ov.store.newaccount.Rd deleted file mode 100644 index d0f805e..0000000 --- a/man/ov.store.newaccount.Rd +++ /dev/null @@ -1,16 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/roakvar.R -\name{ov.store.newaccount} -\alias{ov.store.newaccount} -\title{ov.store.newaccount} -\usage{ -ov.store.newaccount(username = NULL, password = NULL) -} -\arguments{ -\item{username}{use your email as your username.} - -\item{password}{this is your password.} -} -\description{ -ov.store.newaccount -} diff --git a/man/ov.store.publish.Rd b/man/ov.store.publish.Rd index 2c4e631..f6e98e9 100644 --- a/man/ov.store.publish.Rd +++ b/man/ov.store.publish.Rd @@ -12,7 +12,8 @@ ov.store.publish( password = NULL, force_yes = FALSE, overwrite = FALSE, - md = NULL + md = NULL, + quiet = TRUE ) } \arguments{ @@ -31,7 +32,17 @@ ov.store.publish( \item{overwrite}{overwrites a published module/version} \item{md}{Specify the root directory of OakVar modules} + +\item{quiet}{Run quietly} +} +\value{ +A boolean. A boolean. TRUE if successful, FALSE if not } \description{ ov.store.publish } +\examples{ +# Publish "customannot" module to the store +ov.store.publish(module="customannot", user="user1", password="password") + +} diff --git a/man/ov.store.resetpassword.Rd b/man/ov.store.resetpassword.Rd index 942d991..d6eff95 100644 --- a/man/ov.store.resetpassword.Rd +++ b/man/ov.store.resetpassword.Rd @@ -4,11 +4,21 @@ \alias{ov.store.resetpassword} \title{ov.store.resetpassword} \usage{ -ov.store.resetpassword(username = NULL) +ov.store.resetpassword(quiet = TRUE, username = NULL) } \arguments{ +\item{quiet}{Run quietly} + \item{username}{username} } +\value{ +A boolean. A boolean. TRUE if successful, FALSE if not +} \description{ ov.store.resetpassword } +\examples{ +# Ask the store to send an email to reset the password of a store account +ov.store.resetpassword(username="user1") + +} diff --git a/man/ov.store.verifyemail.Rd b/man/ov.store.verifyemail.Rd index 6442428..6933cda 100644 --- a/man/ov.store.verifyemail.Rd +++ b/man/ov.store.verifyemail.Rd @@ -4,11 +4,21 @@ \alias{ov.store.verifyemail} \title{ov.store.verifyemail} \usage{ -ov.store.verifyemail(username = NULL) +ov.store.verifyemail(username = NULL, quiet = TRUE) } \arguments{ \item{username}{username} + +\item{quiet}{Run quietly} +} +\value{ +\code{NULL} } \description{ ov.store.verifyemail } +\examples{ +# Ask the store to send an email to verify the email of a user account +ov.store.verifyemail(username="user1") + +} diff --git a/man/ov.system.config.Rd b/man/ov.system.config.Rd new file mode 100644 index 0000000..a7ba13d --- /dev/null +++ b/man/ov.system.config.Rd @@ -0,0 +1,29 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/roakvar.R +\name{ov.system.config} +\alias{ov.system.config} +\title{ov.system.config} +\usage{ +ov.system.config(fmt = "json", to = "return", quiet = TRUE) +} +\arguments{ +\item{fmt}{Format of output. json or yaml.} + +\item{to}{"stdout" to print. "return" to return} + +\item{quiet}{Run quietly} +} +\value{ +A named list. System config information +} +\description{ +ov.system.config +} +\examples{ +# Get named list of the OakVar system configuration +ov.system.config() +# Get the OakVar system configuration in YAML text +ov.system.config(fmt="yaml")# Print to stdout the OakVar system configuration in YAML text +ov.system.config(fmt="yaml", to="stdout") + +} diff --git a/man/ov.system.md.Rd b/man/ov.system.md.Rd new file mode 100644 index 0000000..e7676c8 --- /dev/null +++ b/man/ov.system.md.Rd @@ -0,0 +1,28 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/roakvar.R +\name{ov.system.md} +\alias{ov.system.md} +\title{ov.system.md} +\usage{ +ov.system.md(directory = NULL, to = "return", quiet = TRUE) +} +\arguments{ +\item{directory}{sets modules directory.} + +\item{to}{'stdout' to print. 'return' to return.} + +\item{quiet}{Run quietly} +} +\value{ +A string. OakVar modules directory +} +\description{ +displays or changes OakVar modules directory. +} +\examples{ +# Get the OakVar modules directory +ov.system.md() +# Set the OakVar modules directory to /home/user1/.oakvar/modules +ov.system.md(directory="/home/user1/.oakvar/modules") + +} diff --git a/man/ov.system.setup.Rd b/man/ov.system.setup.Rd new file mode 100644 index 0000000..87f14fc --- /dev/null +++ b/man/ov.system.setup.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/roakvar.R +\name{ov.system.setup} +\alias{ov.system.setup} +\title{ov.system.setup} +\usage{ +ov.system.setup(setup_file = NULL, quiet = TRUE) +} +\arguments{ +\item{setup_file}{setup file to use} + +\item{quiet}{Run quietly} +} +\value{ +A boolean. TRUE if successful, FALSE if not +} +\description{ +Sets up OakVar system +} +\examples{ +# Set up OakVar with defaults +ov.system.setup() +# Set up OakVar with a setup file +ov.system.setup(setup_file="setup.yml") + +} diff --git a/man/ov.util.addjob.Rd b/man/ov.util.addjob.Rd new file mode 100644 index 0000000..a923afc --- /dev/null +++ b/man/ov.util.addjob.Rd @@ -0,0 +1,24 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/roakvar.R +\name{ov.util.addjob} +\alias{ov.util.addjob} +\title{ov.util.addjob} +\usage{ +ov.util.addjob(path = NULL, user = "default") +} +\arguments{ +\item{path}{Path to result database} + +\item{user}{User who will own the job. Defaults to single user default user.} +} +\value{ +A boolean. TRUE if successful, FALSE if not +} +\description{ +ov.util.addjob +} +\examples{ +# Add a result file to the job list of a user +ov.util.addjob(path="example.sqlite", user="user1") + +} diff --git a/man/ov.util.filtersqlite.Rd b/man/ov.util.filtersqlite.Rd index 9c56e9e..607ab29 100644 --- a/man/ov.util.filtersqlite.Rd +++ b/man/ov.util.filtersqlite.Rd @@ -29,6 +29,15 @@ ov.util.filtersqlite( \item{excludesample}{Sample IDs to exclude} } +\value{ +A boolean. TRUE if successful, FALSE if not +} \description{ ov.util.filtersqlite } +\examples{ +# Filter an analysis result file with an SQL filter set +ov.util.filtersqlite(paths="example.sqlite", filtersql='base__so=="MIS" and gnomad__af>0.01')# Filter two analysis result files with a filter definition file +ov.util.filtersqlite(paths=list("example1.sqlite", "example2.sqlite"), filterpath="filter.json") + +} diff --git a/man/ov.util.mergesqlite.Rd b/man/ov.util.mergesqlite.Rd index 2bf78ef..698da29 100644 --- a/man/ov.util.mergesqlite.Rd +++ b/man/ov.util.mergesqlite.Rd @@ -11,6 +11,14 @@ ov.util.mergesqlite(path = NULL, outpath = NULL) \item{outpath}{Output SQLite file path} } +\value{ +A boolean. TRUE if successful, FALSE if not +} \description{ ov.util.mergesqlite } +\examples{ +# Merge two OakVar analysis result files into one SQLite file +ov.util.mergesqlite(path=list("example1.sqlite", "example2.sqlite"), outpath="merged.sqlite") + +} diff --git a/man/ov.util.sendgui.Rd b/man/ov.util.sendgui.Rd deleted file mode 100644 index 9f712c7..0000000 --- a/man/ov.util.sendgui.Rd +++ /dev/null @@ -1,16 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/roakvar.R -\name{ov.util.sendgui} -\alias{ov.util.sendgui} -\title{ov.util.sendgui} -\usage{ -ov.util.sendgui(path = NULL, user = "default") -} -\arguments{ -\item{path}{Path to result database} - -\item{user}{User who will own the job. Defaults to single user default user.} -} -\description{ -ov.util.sendgui -} diff --git a/man/ov.util.showsqliteinfo.Rd b/man/ov.util.showsqliteinfo.Rd deleted file mode 100644 index 64909ae..0000000 --- a/man/ov.util.showsqliteinfo.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/roakvar.R -\name{ov.util.showsqliteinfo} -\alias{ov.util.showsqliteinfo} -\title{ov.util.showsqliteinfo} -\usage{ -ov.util.showsqliteinfo(paths = NULL, fmt = "text", to = "stdout") -} -\arguments{ -\item{paths}{SQLite result file paths} - -\item{fmt}{Output format. text / json / yaml} - -\item{to}{Output to. stdout / return} -} -\description{ -ov.util.showsqliteinfo -} diff --git a/man/ov.util.sqliteinfo.Rd b/man/ov.util.sqliteinfo.Rd new file mode 100644 index 0000000..5c2804b --- /dev/null +++ b/man/ov.util.sqliteinfo.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/roakvar.R +\name{ov.util.sqliteinfo} +\alias{ov.util.sqliteinfo} +\title{ov.util.sqliteinfo} +\usage{ +ov.util.sqliteinfo(paths = NULL, fmt = "json", to = "return") +} +\arguments{ +\item{paths}{SQLite result file paths} + +\item{fmt}{Output format. text / json / yaml} + +\item{to}{Output to. stdout / return} +} +\value{ +A named list. Information of a job SQLite file +} +\description{ +ov.util.sqliteinfo +} +\examples{ +# Get the named list of the information of an analysis result file +ov.util.sqliteinfo(paths="example.sqlite") + +} diff --git a/man/ov.util.test.Rd b/man/ov.util.test.Rd index ed0972f..d09b352 100644 --- a/man/ov.util.test.Rd +++ b/man/ov.util.test.Rd @@ -4,7 +4,13 @@ \alias{ov.util.test} \title{ov.util.test} \usage{ -ov.util.test(rundir = NULL, modules = NULL, mod_types = NULL, to = "stdout") +ov.util.test( + rundir = NULL, + modules = NULL, + mod_types = NULL, + to = "return", + quiet = TRUE +) } \arguments{ \item{rundir}{Directory for output} @@ -14,7 +20,19 @@ ov.util.test(rundir = NULL, modules = NULL, mod_types = NULL, to = "stdout") \item{mod_types}{Type of module(s) to test (e.g. annotators)} \item{to}{stdout to print / return to return} + +\item{quiet}{Run quietly} +} +\value{ +A named list. Field result is a named list showing the test result for each module. Fields num_passed and num_failed show the number of passed and failed modules. } \description{ -ov.util.test +Test modules +} +\examples{ +# Test the ClinVar module +ov.util.test(modules="clinvar") +# Test the ClinVar and the COSMIC modules +ov.util.test(modules=list("clinvar", "cosmic")) + } diff --git a/man/ov.util.updateresult.Rd b/man/ov.util.updateresult.Rd deleted file mode 100644 index b6411b3..0000000 --- a/man/ov.util.updateresult.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/roakvar.R -\name{ov.util.updateresult} -\alias{ov.util.updateresult} -\title{ov.util.updateresult} -\usage{ -ov.util.updateresult(dbpath = NULL, recursive = FALSE, backup = FALSE) -} -\arguments{ -\item{dbpath}{path to a result db file or a directory} - -\item{recursive}{recursive operation} - -\item{backup}{backup original copy with .bak extension} -} -\description{ -ov.util.updateresult -} diff --git a/man/ov.version.Rd b/man/ov.version.Rd deleted file mode 100644 index 4dd9edc..0000000 --- a/man/ov.version.Rd +++ /dev/null @@ -1,14 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/roakvar.R -\name{ov.version} -\alias{ov.version} -\title{ov.version} -\usage{ -ov.version(to = "stdout") -} -\arguments{ -\item{to}{"stdout" to print. "return" to return} -} -\description{ -ov.version -}