Skip to content

LCBC-UiO/wbcmd

Repository files navigation

wbcmd

Lifecycle: experimental R-CMD-check Codecov test coverage

wbcmd provides R wrapper functions for the Connectome Workbench command-line tool (wb_command).

Installation

You can install the development version of wbcmd from GitHub with:

# install.packages("pak")
pak::pak("lcbc-uio/wbcmd")

You also need Connectome Workbench installed on your system.

Setup

wbcmd looks for wb_command in the following order:

  1. The R option wbcmd.path
  2. The environment variable WB_PATH
  3. Platform-specific default installation paths
  4. The system PATH

Check your setup with:

library(wbcmd)
wb_sitrep()

If wb_command is not found automatically, set the path explicitly:

set_wb_path("/path/to/wb_command")

Usage

All commands flow through the central wb_cmd() dispatcher:

wb_cmd("-version")
wb_cmd("-cifti-info", c("data.dscalar.nii"))

Convenience wrappers provide a more ergonomic interface:

wb_cifti_separate(
  "data.dscalar.nii",
  direction = "COLUMN",
  metric = list(
    CORTEX_LEFT = "left.func.gii",
    CORTEX_RIGHT = "right.func.gii"
  )
)

wb_cifti_smoothing(
  "data.dtseries.nii",
  surface_sigma = 4,
  volume_sigma = 4,
  direction = "COLUMN",
  cifti_out = "smoothed.dtseries.nii",
  left_surface = "left.midthickness.surf.gii",
  right_surface = "right.midthickness.surf.gii"
)

Get help for any subcommand:

wb_help("-cifti-separate")

About

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages