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

test freesurfer bids app with BABS #208

Open
yibeichan opened this issue Mar 19, 2025 · 3 comments
Open

test freesurfer bids app with BABS #208

yibeichan opened this issue Mar 19, 2025 · 3 comments

Comments

@yibeichan
Copy link
Collaborator

create a freesurfer bids app and test it with BABS

@yibeichan
Copy link
Collaborator Author

error with babs-init

create(ok): /orcd/scratch/bcs/001/yibei/fs_bidsapp_babs/fs_bidsapp/analysis (dataset)
action summary:
  create (ok: 1)
  run (ok: 1)
add(ok): .gitignore (file)
save(ok): . (dataset)
action summary:
  add (ok: 1)
  save (ok: 1)
Save BABS project configurations in a YAML file ...
Path to this yaml file will be: 'analysis/code/babs_proj_config.yaml'
add(ok): code/babs_proj_config.yaml (file)
save(ok): . (dataset)
action summary:
  add (ok: 1)
  save (ok: 1)

Creating output and input RIA...
[INFO] Creating a new RIA store at /orcd/scratch/bcs/001/yibei/fs_bidsapp_babs/fs_bidsapp/output_ria 
[INFO] create siblings 'output' and 'output-storage' ... 
[INFO] Fetching updates for Dataset(/orcd/scratch/bcs/001/yibei/fs_bidsapp_babs/fs_bidsapp/analysis) 
update(ok): . (dataset)
update(ok): . (dataset)
[INFO] Configure additional publication dependency on "output-storage" 
configure-sibling(ok): . (sibling)
create-sibling-ria(ok): /orcd/scratch/bcs/001/yibei/fs_bidsapp_babs/fs_bidsapp/analysis (dataset)
action summary:
  configure-sibling (ok: 1)
  create-sibling-ria (ok: 1)
  update (ok: 1)
[INFO] Creating a new RIA store at /orcd/scratch/bcs/001/yibei/fs_bidsapp_babs/fs_bidsapp/input_ria 
[INFO] create sibling 'input' ... 
[INFO] Fetching updates for Dataset(/orcd/scratch/bcs/001/yibei/fs_bidsapp_babs/fs_bidsapp/analysis) 
update(ok): . (dataset)
update(ok): . (dataset)
configure-sibling(ok): . (sibling)
create-sibling-ria(ok): /orcd/scratch/bcs/001/yibei/fs_bidsapp_babs/fs_bidsapp/analysis (dataset)
action summary:
  configure-sibling (ok: 1)
  create-sibling-ria (ok: 1)
  update (ok: 1)

Registering the input dataset(s)...
Cloning input dataset #1: 'BIDS'
[INFO] Attempting a clone into /orcd/scratch/bcs/001/yibei/fs_bidsapp_babs/fs_bidsapp/analysis/inputs/data/BIDS 
[INFO] Attempting to clone from /orcd/scratch/bcs/001/yibei/fs_bidsapp_babs/Brown to /orcd/scratch/bcs/001/yibei/fs_bidsapp_babs/fs_bidsapp/analysis/inputs/data/BIDS 
[INFO] Completed clone attempts for Dataset(/orcd/scratch/bcs/001/yibei/fs_bidsapp_babs/fs_bidsapp/analysis/inputs/data/BIDS) 
install(ok): inputs/data/BIDS (dataset)
add(ok): inputs/data/BIDS (dataset)
add(ok): .gitmodules (file)
save(ok): . (dataset)
add(ok): .gitmodules (file)
save(ok): . (dataset)
action summary:
  add (ok: 3)
  install (ok: 1)
  save (ok: 2)
/nfs/home2/yibei/micromamba/envs/simple2/lib/python3.9/site-packages/babs/babs.py:1981: FutureWarning: ChainedAssignmentError: behaviour will change in pandas 3.0!
You are setting values through chained assignment. Currently this works in certain cases, but when using Copy-on-Write (which will become the default behaviour in pandas 3.0) this will never work to update the original DataFrame or Series, because the intermediate object on which we are setting values will behave as a copy.
A typical example is when you are setting values in a column of a DataFrame, like:

df["col"][row_indexer] = value

Use `df.loc[row_indexer, "col"] = values` instead, to perform the assignment in a single step and ensure this keeps updating the original `df`.

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy

  self.df["path_now_abs"][i] = op.join(analysis_path,

Checking whether each input dataset is a zipped or unzipped dataset...
/nfs/home2/yibei/micromamba/envs/simple2/lib/python3.9/site-packages/babs/babs.py:2008: FutureWarning: ChainedAssignmentError: behaviour will change in pandas 3.0!
You are setting values through chained assignment. Currently this works in certain cases, but when using Copy-on-Write (which will become the default behaviour in pandas 3.0) this will never work to update the original DataFrame or Series, because the intermediate object on which we are setting values will behave as a copy.
A typical example is when you are setting values in a column of a DataFrame, like:

df["col"][row_indexer] = value

Use `df.loc[row_indexer, "col"] = values` instead, to perform the assignment in a single step and ensure this keeps updating the original `df`.

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy

  self.df["is_zipped"][i_ds] = False
input dataset 'BIDS' is considered as an unzipped dataset.
/nfs/home2/yibei/micromamba/envs/simple2/lib/python3.9/site-packages/babs/babs.py:2026: FutureWarning: ChainedAssignmentError: behaviour will change in pandas 3.0!
You are setting values through chained assignment. Currently this works in certain cases, but when using Copy-on-Write (which will become the default behaviour in pandas 3.0) this will never work to update the original DataFrame or Series, because the intermediate object on which we are setting values will behave as a copy.
A typical example is when you are setting values in a column of a DataFrame, like:

df["col"][row_indexer] = value

Use `df.loc[row_indexer, "col"] = values` instead, to perform the assignment in a single step and ensure this keeps updating the original `df`.

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy

  self.df["path_data_rel"][i_ds] = self.df["path_now_rel"][i_ds]
Performing sanity check for any unzipped input dataset...
add(ok): code/babs_proj_config.yaml (file)
save(ok): . (dataset)
action summary:
  add (ok: 1)
  save (ok: 1)

Adding the container as a sub-dataset of `analysis` dataset...
[INFO] Attempting a clone into /orcd/scratch/bcs/001/yibei/fs_bidsapp_babs/fs_bidsapp/analysis/containers 
[INFO] Attempting to clone from /orcd/scratch/bcs/001/yibei/fs_bidsapp_babs/fs_bidsapp-container to /orcd/scratch/bcs/001/yibei/fs_bidsapp_babs/fs_bidsapp/analysis/containers 
[INFO] Completed clone attempts for Dataset(/orcd/scratch/bcs/001/yibei/fs_bidsapp_babs/fs_bidsapp/analysis/containers) 
install(ok): containers (dataset)
add(ok): containers (dataset)
add(ok): .gitmodules (file)
save(ok): . (dataset)
add(ok): .gitmodules (file)
save(ok): . (dataset)
action summary:
  add (ok: 3)
  install (ok: 1)
  save (ok: 2)

`babs-init` failed! Below is the error message:
Traceback (most recent call last):
  File "/nfs/home2/yibei/micromamba/envs/simple2/lib/python3.9/site-packages/babs/cli.py", line 234, in babs_init_main
    babs_proj.babs_bootstrap(input_ds,
  File "/nfs/home2/yibei/micromamba/envs/simple2/lib/python3.9/site-packages/babs/babs.py", line 437, in babs_bootstrap
    container = Container(container_ds, container_name, container_config_yaml_file)
  File "/nfs/home2/yibei/micromamba/envs/simple2/lib/python3.9/site-packages/babs/babs.py", line 2207, in __init__
    self.read_container_config_yaml()
  File "/nfs/home2/yibei/micromamba/envs/simple2/lib/python3.9/site-packages/babs/babs.py", line 2244, in read_container_config_yaml
    self.config = yaml.load(f, Loader=yaml.FullLoader)
  File "/nfs/home2/yibei/micromamba/envs/simple2/lib/python3.9/site-packages/yaml/__init__.py", line 81, in load
    return loader.get_single_data()
  File "/nfs/home2/yibei/micromamba/envs/simple2/lib/python3.9/site-packages/yaml/constructor.py", line 49, in get_single_data
    node = self.get_single_node()
  File "/nfs/home2/yibei/micromamba/envs/simple2/lib/python3.9/site-packages/yaml/composer.py", line 36, in get_single_node
    document = self.compose_document()
  File "/nfs/home2/yibei/micromamba/envs/simple2/lib/python3.9/site-packages/yaml/composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
  File "/nfs/home2/yibei/micromamba/envs/simple2/lib/python3.9/site-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/nfs/home2/yibei/micromamba/envs/simple2/lib/python3.9/site-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/nfs/home2/yibei/micromamba/envs/simple2/lib/python3.9/site-packages/yaml/composer.py", line 64, in compose_node
    if self.check_event(AliasEvent):
  File "/nfs/home2/yibei/micromamba/envs/simple2/lib/python3.9/site-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "/nfs/home2/yibei/micromamba/envs/simple2/lib/python3.9/site-packages/yaml/parser.py", line 449, in parse_block_mapping_value
    if not self.check_token(KeyToken, ValueToken, BlockEndToken):
  File "/nfs/home2/yibei/micromamba/envs/simple2/lib/python3.9/site-packages/yaml/scanner.py", line 116, in check_token
    self.fetch_more_tokens()
  File "/nfs/home2/yibei/micromamba/envs/simple2/lib/python3.9/site-packages/yaml/scanner.py", line 258, in fetch_more_tokens
    raise ScannerError("while scanning for the next token", None,
yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
  in "/orcd/scratch/bcs/001/yibei/fs_bidsapp_babs/config_fs.yaml", line 12, column 3

Cleaning up created BABS project...
Removing input dataset(s) if cloned...
uninstall(ok): inputs/data/BIDS (dataset)
remove(ok): inputs/data/BIDS (dataset)
add(ok): .gitmodules (file)
save(ok): . (dataset)
action summary:
  add (ok: 1)
  remove (ok: 1)
  save (ok: 1)
  uninstall (ok: 1)

Running `git annex dead here`...

Updating input and output RIA if created...
[INFO] Determine push target 
[INFO] Push refspecs 
[INFO] Transfer data 
[INFO] Update availability information 
[INFO] Start enumerating objects 
[INFO] Start counting objects 
[INFO] Start compressing objects 
[INFO] Start writing objects 
publish(ok): . (dataset) [refs/heads/master->input:refs/heads/master [new branch]]
publish(ok): . (dataset) [refs/heads/git-annex->input:refs/heads/git-annex [new branch]]
[INFO] Finished push of Dataset(/orcd/scratch/bcs/001/yibei/fs_bidsapp_babs/fs_bidsapp/analysis) 
action summary:
  publish (ok: 2)
[INFO] Determine push target 
[INFO] Push refspecs 
[INFO] Determine push target 
[INFO] Push refspecs 
[INFO] Transfer data 
[INFO] Transfer data 
[INFO] Update availability information 
[INFO] Start enumerating objects 
[INFO] Start counting objects 
[INFO] Start compressing objects 
[INFO] Start writing objects 
publish(ok): . (dataset) [refs/heads/master->output:refs/heads/master [new branch]]
publish(ok): . (dataset) [refs/heads/git-annex->output:refs/heads/git-annex [new branch]]
[INFO] Finished push of Dataset(/orcd/scratch/bcs/001/yibei/fs_bidsapp_babs/fs_bidsapp/analysis) 
[INFO] Finished push of Dataset(/orcd/scratch/bcs/001/yibei/fs_bidsapp_babs/fs_bidsapp/analysis) 
action summary:
  publish (ok: 2)

Deleting created BABS project folder...

Created BABS project has been cleaned up.
Please check the error messages above! Then fix the problem, and rerun `babs-init`.

related script here

@smeisler
Copy link
Contributor

smeisler commented Mar 19, 2025

use spaces instead of tab for config_fs.yaml, line 12, column 3

@yibeichan
Copy link
Collaborator Author

thanks!! fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants