{"id":13941676,"url":"https://github.com/clindet/rctl","last_synced_at":"2026-01-17T17:01:43.115Z","repository":{"id":57310908,"uuid":"154477420","full_name":"clindet/rctl","owner":"clindet","description":"A set of command line tools based on R and JavaScript.","archived":false,"fork":false,"pushed_at":"2020-04-21T12:10:07.000Z","size":162,"stargazers_count":18,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-22T01:25:25.626Z","etag":null,"topics":["command-line-tool","ngs","r","workflow"],"latest_commit_sha":null,"homepage":"https://github.com/openanno/rctl","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clindet.png","metadata":{"files":{"readme":"README.Rmd","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-24T09:50:21.000Z","updated_at":"2025-10-06T09:25:48.000Z","dependencies_parsed_at":"2022-09-05T16:30:57.268Z","dependency_job_id":null,"html_url":"https://github.com/clindet/rctl","commit_stats":null,"previous_names":["ngsjs/ngsjs","openanno/rctl"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/clindet/rctl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clindet%2Frctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clindet%2Frctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clindet%2Frctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clindet%2Frctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clindet","download_url":"https://codeload.github.com/clindet/rctl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clindet%2Frctl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28511876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-tool","ngs","r","workflow"],"created_at":"2024-08-08T02:01:24.514Z","updated_at":"2026-01-17T17:01:43.069Z","avatar_url":"https://github.com/clindet.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\"\n)\n```\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/rctl\"\u003e\u003cimg src=\"https://img.shields.io/badge/lifecycle-experimental-orange.svg\" alt=\"Life cycle: experimental\"\u003e\n  \u003ca href=\"https://npmcharts.com/compare/rctl?minimal=true\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/rctl.svg\" alt=\"Downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/rctl\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/rctl.svg\" alt=\"Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/rctl\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/rctl.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# rctl\n\nNow, there are several difficulties for next-generation sequencing (NGS) data analysis projects that needs to be solved:\n\n- Standardized project management, directory structured，recording and checking of raw data and analysis result, standardized logging for input, output and commands\n- Construction and redeployment of computing environment including all required tools, databases and other files.\n- Lack of integration and unify of massive data analysis workflows.\n- Lack of the unified distribution platform for various data analysis workflows (e.g. snakemake, nextflow, Galaxy, etc.). \n- Reuse of workflows language codes (e.g. commands, input and output information) on other programming platform are still complicated.\n- The readability and reusable will also be decreased when massive Python and R codes mixed with the workflows language codes.\n\nThis project is part of [openanno](https://github.com/openanno), and aim to integrate and develop command line tools based on R and JavaScript ecosystem.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg \n      alt=\"Best practice of reproducible NGS data analysis projects\"\n      src=\"https://raw.githubusercontent.com/Miachol/ftp/master/files/images/rctl/reproducible_NGS_data_analysis_projects_best_practice.jpg\"\n  /\u003e\n\u003c/p\u003e\n\nWe proposed that using [node](https://nodejs.org/en/) to distribute the bioinformatics data analysis required workflows (e.g [Common workflow language (CWL) ](https://www.commonwl.org/)) or the command line scripts that created by users. The creation, update and upload of a node package are very simple. Well-tested and high-performance distribution tools of node packages, such as [npm](https://www.npmjs.com/) and [yarn](https://www.yarnpkg.com), are providing the service for more than 1,264,413 packages. \n\n**Command line scripts supported now:**\n\ntool | function\n---|---\nrdeps | Getting all `rctl` required R packages\nrsession | `sessionInfo()` and `sessioninfo::session\\_info()`\nrinstall | Install R packages and [BioInstaller](https://github.com/rctl/BioInstaller) resources using `install.packages()` and R packages `devtools`, `BiocManager` and `BioInstaller`\nrconfig | Parsing and generating json, ini, yaml, and toml format configuration files\nrbashful | run bashful \nrclrs | Generating colors for visulization using a theme key\nrmv | Formating the file names.\nranystr | Generating any counts and any length random strings (e.g. Ies1y7fpgMVjsAyBAtTT)\nrtime_stamp | Generating time stamp (e.g. 2018_11_15_22_43_25_, 2018/11/15/, 2018/11/15/22/).\nrdownload | Parallel download URLs with logs\nrbin | Collecting R packages inst/bin files to a directory, e.g. PATH\n\n### R packages\n\n- optparse\n- configr\n- stringi\n- futile.logger\n- glue\n- ngstk\n- BioInstaller\n- devtools\n- pacman\n- BiocManager\n- sessioninfo\n- future\n\n## Installation\n\n```{bash eval=FALSE}\n# Use conda to manage the env\nconda install go nodejs \\\necho 'export NODE_PATH=\"/path/miniconda2/lib/node_modules/\"\\n' \u003e\u003e ~/.bashrc \\\n\u0026\u0026 npm install -g yarn \\\n\u0026\u0026 echo 'export PATH=$PATH:~/.yarn/bin/\\n' \u003e\u003e ~/.bashrc\n\n# Other see https://nodejs.org/en/download/package-manager/\n# For: Ubuntu\napt update\napt install -y npm\n\n# For MacOS\nbrew install node\n```\n\n```{bash eval=FALSE}\nnpm install -g rctl\n# or\nyarn global add rctl\n\n# If you not to globaly install rctl \n# You need to set the PATH\necho \"export rctl_ROOT=/path/node_modules/nodejs\" \u003e\u003e ~/.bashrc\necho \"export PATH=$PATH:${rctl_ROOT}/bin\" \u003e\u003e ~/.bashrc\n\n# Current dir is /path\nnpm install rctl\n# or\nyarn add rctl\n```\n\n## Usage\n\nBefore try your `rctl` command line tools, you need run the `rdeps`  getting all the extra R packages required by `rctl`.\n\n```{bash eval=FALSE}\n# install the extra R packages used in `rctl` scripts\nrdeps\n```\n\nThen you can use the `rctl` to run all sub-commands.\n\n```{bash}\nrctl -h\n```\n\n### rbashful\n\n[bashful](https://github.com/wagoodman/bashful) is a GO program and used by `rbashful`, so you need to install it before use the `rbashful`.\n\n**Ubuntu/Debian**\n\n```{bash eval=FALSE}\nwget https://github.com/wagoodman/bashful/releases/download/v0.0.10/bashful_0.0.10_linux_amd64.deb\nsudo apt install ./bashful_0.0.10_linux_amd64.deb\n```\n\n**RHEL/Centos**\n\n```{bash eval=FALSE}\nwget https://github.com/wagoodman/bashful/releases/download/v0.0.10/bashful_0.0.10_linux_amd64.rpm\nrpm -i bashful_0.0.10_linux_amd64.rpm\n```\n\n**Mac**\n\n```{bash eval=FALSE}\nbrew tap wagoodman/bashful\nbrew install bashful\n```\n\nor download a Darwin build from the releases page.\n\n**Go tools**\n\n```{bash eval=FALSE}\ngo get github.com/wagoodman/bashful\n```\n\n![](https://raw.githubusercontent.com/wagoodman/bashful/master/doc/demo.gif)\n\nView a `rbashful` demo [here](https://github.com/openanno/rctl/test/rbashful/rnaseq_splicing).\n\n```{r}\nsource_dir \u003c- \"/Users/apple/Documents/repositories/rctl/examples/rbashful/rnaseq_splicing/02_leafcutter_majiq\"\n\n# View the cli.yaml\ncat(paste0(readLines(sprintf(\"%s/cli.yaml\", source_dir)), \n           collapse = \"\\n\"), sep = \"\\n\")\n\n# View the env.toml\ncat(paste0(readLines(sprintf(\"%s/env.toml\", source_dir)), \n           collapse = \"\\n\"), sep = \"\\n\")\n\n# View the submit.sh\ncat(paste0(readLines(sprintf(\"%s/submit\", source_dir)), \n           collapse = \"\\n\"), sep = \"\\n\")\n```\n\n```{bash}\nrbashful -h\n```\n\n### rsession\n\n```{bash eval=FALSE}\n# Print commandline help of rsession\nrsession -h\n\n# Print rsession R document (Just like ?sessionInfo in R client)\nrsession -d\n\n# Print R sessionInfo()\n# The followed three lines are equivalent.\nrsession\nrsession -f 1\nrsession -f sessionInfo\n\n# The followed two lines are equivalent.\nrsession -f 2 -e 'include_base=TRUE'\nrsession -f sessioninfo::session_info -e 'include_base=TRUE'\n```\n```{bash}\nrsession -f 2 -e 'include_base=TRUE'\n\nrsession -h\n```\n\n### rinstall\n\n```{bash eval=FALSE}\n# Print commandline help of rinstall\nrinstall -h\n\n# Print rinstall R document (Just like ?sessionInfo in R client)\nrinstall -d\n\n# Install CRAN R package yaml (install.package)\nrinstall yaml\nrinstall -f 1 yaml\n\n# Install R package ngstk from GitHub rctl/ngstk (devtools::install_github)\nrinstall -f 2 rctl/ngstk\n\n# Install R package ngstk from GitHub rctl/ngstk (install.package)\n# devtools::install_github with force = TRUE, ref = 'develop'\nrinstall -f 2 -e \"force = TRUE, ref = 'develop'\" rctl/ngstk\n\n# Install Bioconductor package ggtree (BiocManager)\n# BiocManager::install('ggtree')\nrinstall -f 3 ggtree\n\n# Install R packages (pacman)\n# pacman::p_load(ggtree)\nrinstall -f 4 ggtree\n\n# Install and download BioInstaller resources\n\n# Show all BioInstaller default resources name\nrinstall -f BioInstaller::install.bioinfo -e \"show.all.names=T\"\nrinstall -f 5 -e \"show.all.names=T\"\n\n# Show ANNOVAR refgene and avsnp versions\nrinstall -f BioInstaller::install.bioinfo -e \"show.all.versions=T\" db_annovar_refgene\nrinstall -f 5 -e \"show.all.versions=T\" db_annovar_avsnp\n\n# Show ANNOVAR hg19 refgene and avsnp\nrinstall -f 5 -e \"download.dir='/tmp/refgene', extra.list=list(buildver='hg19')\" db_annovar_refgene\nrinstall -f 5 -e \"download.dir='/tmp/avsnp', extra.list=list(buildver='hg19')\" db_annovar_avsnp\n```\n```{bash}\nrinstall -h\n```\n\n### rdownload\n\n```{bash eval = FALSE}\nrdownload \"https://img.shields.io/npm/dm/rctl.svg,https://img.shields.io/npm/v/rctl.svg,https://img.shields.io/npm/l/rctl.svg\"\n\nrdownload \"https://img.shields.io/npm/dm/rctl.svg,https://img.shields.io/npm/v/rctl.svg,https://img.shields.io/npm/l/rctl.svg\" --destfiles \"/tmp/rctl1.svg,rctl2.svg,rctl3.svg\"\n\nrdownload --urls \"https://img.shields.io/npm/dm/rctl.svg , https://img.shields.io/npm/v/rctl.svg,https://img.shields.io/npm/l/rctl.svg\" \\\n          --destfiles \"rctl1.svg,rctl2.svg,rctl3.svg\" --max-cores 1\n```\n```{bash}\nrdownload -h\n```\n\n### rconfig\n\n```{r eval = FALSE}\n# Use configr::read.config parsing json format file\n# Reture the list object output\nrconfig package.json\nrconfig -c package.json\n\n# Use configr::read.config parsing json format file with the custom R function\nrconfig -c test.json -r 'function(x){x[[\"a\"]] + x[[\"b\"]]}'\nrconfig -c test.json -r 'function(x){x[[\"a\"]]}'\nrconfig -c test.json -r 'function(x){x[[\"b\"]]}'\nrconfig -c test.json -r 'x[[\"b\"]]'\n\n# Use configr::write.config parsing json format file\nrconfig -f \"configr::write.config\" test.json -e \"config.dat=list(a=1, b=2), write.type='json'\"\nrconfig -f 2 test.json -e \"config.dat=list(a=1, b=2), write.type='json'\"\n```\n```{bash}\nrconfig -f \"configr::fetch.config\" \"https://raw.githubusercontent.com/Miachol/configr/master/inst/extdata/config.global.toml\"\n\nrconfig -h\n```\n\n### rclrs\n\n```{bash eval = TRUE}\n# Show default and red/blue theme colors\nrclrs default\nrclrs -t default\nrclrs -t red_blue\n\n# Show default theme colors (extract the first element)\nrclrs -t default -r 'x[1]'\n\n# Show all supported theme\nrclrs --show-all-themes\n```\n```{bash}\nrclrs -h\n```\n\n### rmv\n\n```{bash eval = FALSE}\n# do.rename is used to preview the new filenames\n# \nrmv \"`ls`\" -e \"do.rename = F, prefix = 'prefix', suffix = 'suffix'\"\nrmv \"`ls`\" -e \"do.rename = F, replace = list(old =c('-', '__'), new = c('_', '_'))\"\nrmv \"`ls`\" -e \"do.rename = F, toupper = TRUE\"\nrmv \"`ls`\" -e \"do.rename = F, tolower = TRUE\"\n\nrmv \"`ls`\" -e \"do.rename=T, replace=list(old='new', new='old')\"\n```\n```{bash}\nrmv -h\n```\n\n### rtime_stamp\n\n```{bash}\nrtime_stamp\n\nrtime_stamp -r 'x[[1]]'\n\nrtime_stamp -r 'x[[1]][1]'\n\nrtime_stamp -t '%Y_%d'\n\nrtime_stamp -e \"extra_flag=c('*')\"\n\nrtime_stamp -h\n```\n\n### ranystr\n\n```{bash}\n./bin/ranystr\n\n./bin/ranystr -l 30\n\n./bin/ranystr -l 20 -n 3\n```\n```{bash}\nranystr -h\n```\n\n```{bash}\n# Collect system.files(\"extdata\", \"bin\", package = \"ngstk\")\n# multiple packages (i.e. ngstk,configr) \nrbin ngstk\n\nrbin --destdir /tmp/path ngstk\n\nrbin -h\n```\n\n## How to contribute?\n\nPlease fork the [GitHub rctl repository](https://github.com/openanno/rctl), modify it, and submit a pull request to us. \n\n## Maintainer\n\n[Jianfeng Li](https://github.com/Miachol)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclindet%2Frctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclindet%2Frctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclindet%2Frctl/lists"}