ccna-biomarkers / ccna_ts_extraction

ccna timeseries extraction
0 stars 2 forks source link

Fix DiFuMo templateflow fetch #7

Open ltetrel opened 2 years ago

ltetrel commented 2 years ago

Seems like the templateflow fetcher does not work with DiFuMo. To double check on another system.

ltetrel commented 2 years ago
Downloading https://templateflow.s3.amazonaws.com/tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-02_atlas-DiFuMo_desc-64dimensions_probseg.nii.gz
100%|█████████████████████████████████████████████████████████████████████████████████████████| 2.25M/2.25M [00:00<00:00, 8.13MB/s]
Traceback (most recent call last):
  File "/home/ltetrel/ccna_ts_extraction/extract_timeseries_tar.py", line 291, in <module>
    download_atlases()
  File "/home/ltetrel/ccna_ts_extraction/extract_timeseries_tar.py", line 241, in download_atlases
    description_keywords=description_keywords)
  File "/home/ltetrel/ccna_ts_extraction/extract_timeseries_tar.py", line 134, in fetch_atlas_path
    label_path = templateflow.api.get(template, raise_empty=True, **label_parameters)
  File "/home/ltetrel/.virtualenvs/ts_extraction/lib/python3.7/site-packages/templateflow/conf/__init__.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "/home/ltetrel/.virtualenvs/ts_extraction/lib/python3.7/site-packages/templateflow/api.py", line 108, in get
    raise Exception("No results found")
Exception: No results found
htwangtw commented 2 years ago

slightly related - I realised why in my mind the atlas was just an option, so I was confused why you even ran the difumo original atlas. I want to add atlas as an option for the command line interface. In this version I don't want to mess up the command line interface you are already using, so I did not implement it. I will open a separate issue.

ltetrel commented 2 years ago

This is not related to the current issue. But just added some comment on https://github.com/ccna-biomarkers/ccna_ts_extraction/issues/9

htwangtw commented 2 years ago

I looked into this issue and the problem is in tempateflow upstream API. Initiate layout and update wraps a few things that can overwrite the remote index of existing templateflow download. I will need to spend more time to break down what is exactly happening. The current work around for me is sending different atlases as different jobs so the directory don't get reindexed, preventing download issues etc