Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CLI docs #1029

Merged
merged 5 commits into from
Feb 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/cli/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ You can also reference a `<version>` in the run command. For example:

docker run -it --rm neuroscout/neuroscout-cli:version-0.5.1 run Mv3ev /out

!!! note
`master` is a special tag name which refers to the most recent _unstable_ commit to GitHub.
!!! Note
`master` is a special tag name which refers to the most recent _unstable_ commit to GitHub.

## Saving outputs to disk

Expand All @@ -52,9 +52,9 @@ Here we mount the local `/home/user/out` directory to `/out` on the container.:

docker run -it --rm -v /home/user/out:/out neuroscout/neuroscout-cli run 5xH93 /out

!!! note
After the `run` command, we are telling _neuroscout-cli_ to save the outputs to the `/out` directory on `Docker`,
which is mapped to `/home/user/out` on our local system.
!!! Note
After the `run` command, we are telling _neuroscout-cli_ to save the outputs to the `/out` directory on `Docker`,
which is mapped to `/home/user/out` on our local system.

### Output derivative structure
Neuroscout creates a unique output directory `neuroscout-{analysis_id}` for each analysis.
Expand Down Expand Up @@ -99,7 +99,7 @@ The resulting cached data directory will look something like this, if you've run
The next time you run a model with a previously downloaded dataset, it will not need to re-download the fMRI data. </br>

!!! important
Docker expects **absolute paths** for mounted directories
Docker expects **absolute paths** for mounted directories


## Other command line arguments
Expand Down
9 changes: 2 additions & 7 deletions docs/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,8 @@ First, check with your HPC administrator that _Singularity_ is available for use
### Manually prepared environment

!!! Danger
Manually installing _neuroscout-cli_ is not currently recommended. Proceed only if you really need to do this.
Manually installing _neuroscout-cli_ can be difficult due to complex dependencies. Proceed only if you really need to do this.

Use pip to install _neuroscout-cli_ directly from the GitHub repo:

pip install git+https://www.github.com/neuroscout/neuroscout-cli


## General usage and reference

Continue [here](usage.md) for a general guide to neuroscout-cli
pip install git+https://www.github.com/neuroscout/neuroscout-cli
2 changes: 1 addition & 1 deletion docs/cli/singularity.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ This command will download the corresponding preprocessed images, event files an
The results will be automatically uploaded to NeuroVault, and the analysis page will link to this upload: https://neuroscout.org/builder/Mv3ev.

!!! important
`neuroscout-cli-<version>.simg` refers to a specific downloaded image on your system.
`neuroscout-cli-<version>.simg` refers to a specific downloaded image on your system.


## Saving data to disk
Expand Down
10 changes: 5 additions & 5 deletions docs/cli/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,17 @@ Options:
--help Show this message and exit.
```

The `get` command prepares your system for analysis execution by:
The `get` command prepares your system for analysis execution by 1) preparing the output directory, 2) downloading the analysis bundle (containing the BIDS StatsModel specification, event files, and more), and 3) downloading the preprocessed fMRI data.

1) preparing the output directory
1) downloading the analysis bundle (containing the BIDS StatsModel specification, event files, and more configuration)
2) downloading the preprocessed fMRI data. Note that only the specific files for that analysis will be download (i.e. only those runs/subjects)
Note that only the specific files for that analysis will be download (i.e. only those runs/subjects)

By default, the input fMRI data is downloaded to the output directory under `sourcedata`, forming a fully re-executable output.
However, if you run many analyses with the same dataset, it can be useful to download the data to a common folder that can be re-used in other
analyses using `--download-dir`

For example:

```neuroscout get --download-dir=/home/user/data a54oo /home/user/outputs```
neuroscout get --download-dir /home/user/data a54oo /home/user/outputs

In this case, the fMRI dataset will be downloaded to `/home/user/data` and the output folder will be `/home/user/outputs/neuroscout-a54oo`,
with the bundle contents saved in the output folder.
Expand All @@ -108,6 +106,7 @@ with the bundle contents saved in the output folder.

### Upload

```
Usage: neuroscout upload [OPTIONS] ANALYSIS_ID OUT_DIR

Upload results.
Expand All @@ -121,6 +120,7 @@ Options:
--no-upload Don't upload results to NeuroVault
--upload-first-level Upload first-level results, in addition to group
--help Show this message and exit.
```

The `upload` command may be useful in case the `run` command experienced an error uploading results,
particularly if there was a connection error, and you wish to try again.
Expand Down
4 changes: 3 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ nav:
- Clone: browse/clone.md
- Running analyses:
- Introduction: cli/index.md
- Usage: cli/usage.md
- Docker: cli/docker.md
- Singularity: cli/singularity.md
- General Usage: cli/usage.md
- FAQ: faq.md

theme: readthedocs
Expand Down
2 changes: 1 addition & 1 deletion neuroscout/frontend/src/analysis_builder/Status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export class StatusTab extends React.Component<submitProps, statusTabState> {
<code>
docker run --rm -it -v /local/outputdirectory:/out
{` neuroscout/neuroscout-cli${this.state.imageVersion}`} run
/out {this.props.analysisId}
{this.props.analysisId} /out
</code>
</pre>
<Card
Expand Down