Skip to content

Commit

Permalink
Add initial draft for "getting started"
Browse files Browse the repository at this point in the history
  • Loading branch information
nx10 committed Aug 31, 2024
1 parent 844a32b commit 018e5be
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 2 deletions.
3 changes: 3 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ authors = []
language = "en"
multilingual = false
src = "src"
title = "Styx Book"

[preprocessor.alerts]
41 changes: 41 additions & 0 deletions src/2_getting_started.md
Original file line number Diff line number Diff line change
@@ -1 +1,42 @@
# Getting started

> [!NOTE]
> This book uses Styx wrappers from the NiWrap package, but any Styx wrapper will work the same way.
To get started install the [NiWrap](https://github.com/childmindresearch/niwrap/tree/main) Python package:

```sh
pip install -e "git+https://github.com/childmindresearch/niwrap.git/#egg=niwrap&subdirectory=python"
```

From there on running commands will be as easy as:

```Python
from niwrap import fsl

bet_output = fsl.bet(
infile="my_file.nii.gz",
binary_mask=True,
)
```

This runs the command

```sh
bet my_file.nii.gz -m
```

and stores all the output files for easy access in `bet_output`.

These can then be used as an input to another Styx wrapper or with any other Python package like nilearn:

```Python
from nilearn.plotting import plot_anat

plot_anat(bet_output.outfile)
```

> [!TIP]
> Styx includes detailed documentation about every command, argument, and output file. You should be able to just hover over any of them in your editor to view its documentation.
The next chapter will explain how to use _Runners_ to control how the commands get executed and intermediate files get stored.
1 change: 0 additions & 1 deletion src/2a_installation.md

This file was deleted.

1 change: 0 additions & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

- [The Styx Book](./1_welcome.md)
- [Getting started](./2_getting_started.md)
- [Installation](./2a_installation.md)
- [Runners](./2b_runners.md)
- [Tips & best practices](./2c_tips_best_practices.md)
- [Contributing to NiWrap](./2d_contributing_to_niwrap.md)
Expand Down

0 comments on commit 018e5be

Please sign in to comment.