|
2 | 2 |
|
3 | 3 | [](https://zenodo.org/badge/latestdoi/391155862) |
4 | 4 |
|
5 | | -As part of the ME-ICA pipeline, `Rica` (Reports for ICA) provides a reporting tool for ICA decompositions performed with [tedana](https://github.com/ME-ICA/tedana) and [aroma](https://github.com/ME-ICA/aroma). |
| 5 | +**Rica** (Reports for ICA) is an interactive visualization tool for reviewing and classifying ICA components from [tedana](https://github.com/ME-ICA/tedana) multi-echo fMRI analysis. |
6 | 6 |
|
7 | | -**Pronunciation:** [ˈrika]. For an audio recording on how to pronounce Rica [see here](https://easypronunciation.com/en/spanish/word/rica). |
| 7 | +**Pronunciation:** [ˈrika]. [Hear it here](https://easypronunciation.com/en/spanish/word/rica). |
8 | 8 |
|
9 | | -## About |
| 9 | +## Features |
10 | 10 |
|
11 | | -`Rica` originally came out as an alternative to the reports provided by [tedana](https://github.com/ME-ICA/tedana), with the aim of making manual classification of ICA components possible. At the same time, the tool aspires to be of value for ICA decompositions made with tools other than `tedana`. `Rica` assumes you're working with files that mimic the outputs of `tedana`. |
| 11 | +### ICA Component Analysis |
| 12 | +- **Interactive scatter plots** - Kappa vs Rho, Kappa/Rho Rank plots with elbow threshold lines, zoom/pan |
| 13 | +- **Pie chart** - Component variance distribution, click to select |
| 14 | +- **3D brain viewer** - Interactive stat-z maps using Niivue with mosaic view (7 slices per orientation) |
| 15 | +- **Time series & FFT** - Component time courses and power spectra |
| 16 | +- **Component table** - Full metrics with sorting and selection sync |
| 17 | +- **External regressor heatmap** - Interactive correlation visualization (requires tedana 24.1+) |
12 | 18 |
|
13 | | -## How to use Rica |
| 19 | +### Quality Control (QC) Tab |
| 20 | +- **Brain maps** - T2\*, S0, and RMSE maps with Niivue mosaic viewer |
| 21 | +- **Histograms** - Distribution plots for QC metrics |
| 22 | +- **Carpet plots** - Time series visualization in dedicated Carpets tab |
14 | 23 |
|
15 | | -Even if Rica is designed to be simple to use, you might want to see how you can use the app by watching this [tutorial video](https://www.loom.com/share/ad37cf6f3c2d41e48721f62168a8284e). |
| 24 | +### User Experience |
| 25 | +- **Classification toggle** - Accept/reject components with A/R keyboard shortcuts |
| 26 | +- **Arrow navigation** - Previous/next component with wrap-around |
| 27 | +- **Light/dark theme** - Toggle with the sun/moon button |
| 28 | +- **Export** - Save modified classifications as TSV |
16 | 29 |
|
17 | | -Rica also supports keyboard shortcuts on the ICA components page. You can use the following shortcuts: |
| 30 | +## How to Use |
18 | 31 |
|
19 | | -- `a`: Accept component. |
20 | | -- `r`: Reject component. |
21 | | -- `i`: Ignore component. |
22 | | -- `left arrow`: Go to previous component. |
23 | | -- `right arrow`: Go to next component. |
| 32 | +For a video tutorial, see [this walkthrough](https://www.loom.com/share/ad37cf6f3c2d41e48721f62168a8284e). |
24 | 33 |
|
25 | | -## Using Rica online |
| 34 | +### Keyboard Shortcuts |
26 | 35 |
|
27 | | -Just head over to https://rica-fmri.netlify.app and have fun! |
| 36 | +| Key | Action | |
| 37 | +|-----|--------| |
| 38 | +| `A` | Accept component | |
| 39 | +| `R` | Reject component | |
| 40 | +| `←` | Previous component | |
| 41 | +| `→` | Next component | |
28 | 42 |
|
29 | | -## Using Rica locally |
| 43 | +## Using Rica |
30 | 44 |
|
31 | | -### Installation |
| 45 | +### Option 1: Online (Easiest) |
32 | 46 |
|
33 | | -`Rica` can be installed by cloning this repository and executing the following command in the cloned repository: |
| 47 | +Visit **https://rica-fmri.netlify.app** and select your tedana output folder. |
34 | 48 |
|
35 | | -```npm install``` |
| 49 | +### Option 2: Local Server (Recommended for Local Use) |
36 | 50 |
|
37 | | -In order to run the tool locally, two options exist: |
| 51 | +Run Rica directly from your tedana output folder with automatic data loading: |
38 | 52 |
|
39 | | -#### 1. Using a localhost |
| 53 | +1. Download the latest release files: |
| 54 | + - `index.html` (self-contained single-file app with embedded logo) |
| 55 | + - `rica_server.py` |
40 | 56 |
|
41 | | -By executing the `npm start` command in the cloned repository, `Rica` will open in a new browser tab at [http://localhost:3000](http://localhost:3000) and you will be able to use the tool. |
| 57 | +2. Copy these files to your tedana output folder: |
| 58 | + ```bash |
| 59 | + cp index.html rica_server.py /path/to/tedana/output/ |
| 60 | + ``` |
42 | 61 |
|
43 | | -#### 2. Compiling the tool |
| 62 | +3. Run the server: |
| 63 | + ```bash |
| 64 | + cd /path/to/tedana/output/ |
| 65 | + python rica_server.py |
| 66 | + ``` |
44 | 67 |
|
45 | | -You could also compile the project so that you can use the tool just by opening an HTML file. For that, it is necessary to execute the following commands in the cloned repository. |
| 68 | +4. Your browser opens automatically and data loads instantly! |
| 69 | + |
| 70 | +> **Note:** The "New" button is hidden in local server mode since data is loaded automatically. |
| 71 | +
|
| 72 | +### Option 3: Development Server |
| 73 | + |
| 74 | +For development or if you want to load different folders: |
| 75 | + |
| 76 | +```bash |
| 77 | +# Clone and install |
| 78 | +git clone https://github.com/ME-ICA/rica.git |
| 79 | +cd rica |
| 80 | +npm install |
| 81 | + |
| 82 | +# Start development server |
| 83 | +npm start |
| 84 | +``` |
| 85 | + |
| 86 | +Then open http://localhost:3000 and select your tedana output folder. |
| 87 | + |
| 88 | +### Option 4: Build from Source |
| 89 | + |
| 90 | +Build a single-file HTML distribution: |
46 | 91 |
|
47 | 92 | ```bash |
| 93 | +# Install dependencies |
| 94 | +npm install |
| 95 | + |
| 96 | +# Build with inlined assets |
48 | 97 | npm run build |
49 | 98 | npx gulp |
50 | | -mv build/index.html build/rica.html |
51 | | -open build/rica.html |
| 99 | + |
| 100 | +# Output files in build/ |
| 101 | +# - index.html (self-contained single-file app) |
| 102 | +# - rica_server.py (local server) |
52 | 103 | ``` |
53 | 104 |
|
54 | | -> Pro tip: when you open rica.html for the first time, BOOKMARK IT 😉 |
| 105 | +## Required Files |
| 106 | + |
| 107 | +Rica expects these files from tedana output: |
| 108 | + |
| 109 | +| File Pattern | Description | |
| 110 | +|--------------|-------------| |
| 111 | +| `*_metrics.tsv` | Component metrics table (required) | |
| 112 | +| `*_mixing.tsv` | ICA mixing matrix (time series) | |
| 113 | +| `*stat-z_components.nii.gz` | 4D component stat maps | |
| 114 | +| `*_desc-ICACrossComponent_metrics.json` | Elbow thresholds for reference lines | |
| 115 | +| `figures/comp_*.png` | Component figures | |
| 116 | +| `*.svg` | Carpet plots and diagnostic figures | |
| 117 | +| `report.txt` | Tedana report | |
| 118 | +| `T2starmap.nii*`, `S0map.nii*`, `rmse_statmap.nii*` | QC brain maps | |
| 119 | + |
| 120 | +## Versioning |
| 121 | + |
| 122 | +Rica version is displayed in the About popup and managed centrally: |
| 123 | +- Version is defined in `package.json` |
| 124 | +- UI automatically displays the current version |
| 125 | +- GitHub releases should be tagged as `v<version>` (e.g., `v2.0.0`) |
| 126 | + |
| 127 | +To bump the version: |
| 128 | +```bash |
| 129 | +npm version patch # 2.0.0 -> 2.0.1 |
| 130 | +npm version minor # 2.0.0 -> 2.1.0 |
| 131 | +npm version major # 2.0.0 -> 3.0.0 |
| 132 | +``` |
55 | 133 |
|
56 | | -## Getting involved |
| 134 | +## Contributing |
57 | 135 |
|
58 | | -Want to learn more about our plans for developing `Rica`? Have a question, comment, or suggestion? Open or comment on one of our issues! |
| 136 | +Questions, suggestions, or contributions? Open an issue on [GitHub](https://github.com/ME-ICA/rica/issues)! |
0 commit comments