GithubHelp home page GithubHelp logo

spidey's Introduction

spidey

This is an R package for generating spider plots (radar charts) for individual patient tract Z-scores.

Installation

spidey can be installed in R by typing the following commands:

library(devtools)
install_github("remikamito/spidey")

Required R packages

There are a number of R packages that are required for spidey. These include: devtools, fmsb, RNOmni, dplyr, tidyr.

In addition, the neuroCombat R package should be installed if you wish to perform ComBat on tract data:

library(devtools)
install_github("jfortin1/neuroCombatData")
install_github("jfortin1/neuroCombat_Rpackage")

Usage

This package can generate Z-scores from tract data for individual patients/participants, and plot these Z-scores on spider plots (also known as radar charts). The two main functions in this package are: RUNTRACTZ and SPIDERZ. This section details the main steps that should be taken.

1. Input data

The expected input data is a dataframe containing individual participants as rows, and tract-specific values as columns. In addition, columns corresponding to a participant ID and the participant group (e.g., healthy control or patient) should be included. If tract data have been extracted from a cohort scanned on different scanners or at different sites, columns corresponding to scanner ID and participant age should also be included.

Sample data (tractdata) is available within this package.

2. Compute tract Z-scores

Tract Z-scores can be computed using the RUNTRACTZ function. This function will output a dataframe with Z-scores for a given participant. As an example, we can run RUNTRACTZ on our included sample data:

library(spidey)
Zscores <- RUNTRACTZ(tractdata, 8:36, "P01", combat=TRUE)

This will output a dataframe (Zscores), which contains Z-scores for each tract included within the tract range (here, columns 8 through to 36) for a given patient (ID = P01). As we have included the option to perform ComBat, the tract data will first be harmonised across the scanners/sites.

3. Generate spider plots

Once a dataframe of Z-scores for tract data has been generated using the RUNTRACTZ function, the SPIDERZ function can be used to plot tract Z-scores on a spider chart.

SPIDERZ(Zscores)

spidey's People

Contributors

remikamito avatar

Stargazers

Choki Navajas avatar  avatar Heath Pardoe avatar

Watchers

Heath Pardoe avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.