Skip to content

Commit

Permalink
final touches
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewPoppe committed Dec 4, 2016
1 parent 3e0daae commit 812abb5
Show file tree
Hide file tree
Showing 64 changed files with 22,457 additions and 30 deletions.
13 changes: 9 additions & 4 deletions DESCRIPTION
@@ -1,10 +1,15 @@
Package: melviewr
Type: Package
Title: View and Classify MELODIC Output for ICA+FIX
Version: 0.0.0.9000
Authors@R: person("Andrew", "Poppe", email = "Poppe076 at gmail.com", role = c("aut", "cre"))
Description: More about what it does (maybe more than one line)
Use four spaces when indenting paragraphs within the Description.
Version: 0.0.1
Authors@R: person("Andrew", "Poppe", email = "Poppe076@gmail.com", role = c("aut", "cre"))
Description: The melviewr package provides a graphical interface that allows the
user to easily view and classify MELODIC output for the purposes of later
running ICA+FIX. The user categorizes a component as signal or noise based on
its spatial characteristics as well as its temporal profile. melviewr can then
save a text file of these classifications in the format required by ICA+FIX.
URL: https://github.com/AndrewPoppe/melviewr
BugReports: https://github.com/AndrewPoppe/melviewr/issues
License: GPL-3
Encoding: UTF-8
LazyData: true
Expand Down
36 changes: 15 additions & 21 deletions R/melviewr.R
Expand Up @@ -677,9 +677,13 @@ createViewrObject <- function() {

#==============================================================================#
# Main function the user will see.
#' melviewr
#' melviewr: View and Classify Components from a Melodic Analysis
#'
#' View and Classify Components from a Melodic Analysis
#' The melviewr GUI allows for convenient viewing and classification of the
#' results of a single-subject MELODIC analysis. Classification can then be
#' saved to a text file for use by ICA+FIX to train its classifier. Various
#' graphics options are available in the GUI, and these settings can be saved
#' via a button in the GUI.
#' @param melodic_dir string Path to MELODIC output directory. This directory
#' must include a melodic_IC.nii or melodic_IC.nii.gz file.
#' @param standard_file string Optional path to a 3-dimensional Nifti standard file
Expand All @@ -692,14 +696,21 @@ createViewrObject <- function() {
#' @import gWidgetsRGtk2
#' @importFrom methods new
#' @return Invisibly returns a reference class object of class "Viewr"
#' @details The directory specified in \code{melodic_dir} must contain a nifti
#' file called either "melodic_IC.nii.gz" or "melodic_IC.nii" for the GUI to run.
#' It must have a directory called "report" with text files inside in order to
#' display timecourse and powerspectrum plots. Normally, this directory is
#' created automatically with the \code{-report} flag in MELODIC.
#'
#' When saving graphical settings, a JSON file is saved in the user's HOME
#' directory with the name: \code{.melviewR.config}
#' @examples \dontrun{
#' melodic_dir <- system.file("extdata", "example.ica", package = "melviewr")
#' standard_file <- system.file("extdata", "MNI152_T1_2mm_brain.nii.gz", package = "melviewr")
#' motion_file <- system.file("extdata", "Movement_RelativeRMS.txt", package = "melviewr")
#' melviewr(melodic_dir)
#' melviewr(melodic_dir, standard_file)
#' melviewr(melodic_dir, standard_file, motion_file)
#' }
#' melviewr(melodic_dir, standard_file, motion_file)}
melviewr <- function(melodic_dir, standard_file = NULL, motion_file = NULL) {
# Keep environment tidy
old <- options(stringsAsFactors = FALSE)
Expand Down Expand Up @@ -757,20 +768,3 @@ melviewr <- function(melodic_dir, standard_file = NULL, motion_file = NULL) {
#==============================================================================#



#==============================================================================#
# Documentation for the package
#' melviewr: A viewer for MELODIC output and ICA+FIX classification.
#'
#' The melviewr package allows the user to easily view and classify
#' MELODIC output for the purposes of later running ICA+FIX. The user
#' categorizes a component as signal or noise based on its spatial
#' characteristics as well as its temporal profile. melviewr can then save
#' a text file of these classifications in the format required by ICA+FIX.
#'
#' @section melviewr functions:
#' melviewr
#'
#' @docType package
#' @name melviewr-package
NULL
17 changes: 17 additions & 0 deletions R/package_documentation.R
@@ -0,0 +1,17 @@

#==============================================================================#
# Documentation for the package
#' melviewr: A viewer for MELODIC output and ICA+FIX classification.
#'
#' The melviewr package allows the user to easily view and classify
#' MELODIC output for the purposes of later running ICA+FIX. The user
#' categorizes a component as signal or noise based on its spatial
#' characteristics as well as its temporal profile. melviewr can then save
#' a text file of these classifications in the format required by ICA+FIX.
#'
#' @section melviewr functions:
#' melviewr
#'
#' @docType package
#' @name melviewr-package
NULL
2 changes: 1 addition & 1 deletion man/melviewr-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 17 additions & 4 deletions man/melviewr.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions melviewr.Rcheck/00_pkg_src/melviewr/DESCRIPTION
@@ -0,0 +1,23 @@
Package: melviewr
Type: Package
Title: View and Classify MELODIC Output for ICA+FIX
Version: 0.0.0.9000
Authors@R: person("Andrew", "Poppe", email = "Poppe076@gmail.com", role = c("aut", "cre"))
Description: The melviewr package provides a graphical interface that allows the
user to easily view and classify MELODIC output for the purposes of later
running ICA+FIX. The user categorizes a component as signal or noise based on
its spatial characteristics as well as its temporal profile. melviewr can then
save a text file of these classifications in the format required by ICA+FIX.
URL: https://github.com/AndrewPoppe/melviewr
BugReports: https://github.com/AndrewPoppe/melviewr/issues
License: GPL-3
Encoding: UTF-8
LazyData: true
Imports: gtools, RColorBrewer, RNifti, grDevices, RGtk2, cairoDevice,
methods, jsonlite
Depends: gWidgetsRGtk2, gWidgets
RoxygenNote: 5.0.1
NeedsCompilation: no
Packaged: 2016-12-04 17:42:32 UTC; poppe076
Author: Andrew Poppe [aut, cre]
Maintainer: Andrew Poppe <Poppe076@gmail.com>
6 changes: 6 additions & 0 deletions melviewr.Rcheck/00_pkg_src/melviewr/NAMESPACE
@@ -0,0 +1,6 @@
# Generated by roxygen2: do not edit by hand

export(melviewr)
import(gWidgets)
import(gWidgetsRGtk2)
importFrom(methods,new)

0 comments on commit 812abb5

Please sign in to comment.