bbfrederick / rapidtide

rapidtide - a suite of programs for doing time lag correlation analysis on fMRI data
Apache License 2.0
75 stars 14 forks source link

happy motion regression broken in 2.0a10 but not 1.9.x #54

Closed robbwh closed 3 years ago

robbwh commented 3 years ago

Describe the bug When running happy using rapidtide 1.9.1 specifying a motion file seems to work and happy completes.

However, When running rapidtide 2.0a10 specifying a motion file results in an error message:

AttributeError: 'Namespace' object has no attribute 'motfilt_pos'

Here is the full output when running happy:

setting backend to Agg
falling back to standard tensorflow keras
using tensorflow v2x

'WARNING:tensorflow:From /home/robbwh/miniconda3/envs/rt/lib/python3.8/site-packages/tensorflow/python/compat/v2_compat.py:96: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
Instructions for updating:
non-resource variables are not supported in the long term
tensorflow version: >>>2.3.0<<<
dlfilter exists
processing command line arguments
running version v2.0alpha10 on host badger.vampire
tr is 2.0000014 seconds, mrsamplerate is 0.500
Traceback (most recent call last):
  File "/home/robbwh/miniconda3/envs/rt/bin/happy", line 4, in <module>
    __import__('pkg_resources').run_script('rapidtide==2.0a10', 'happy')
  File "/home/robbwh/miniconda3/envs/rt/lib/python3.8/site-packages/pkg_resources/__init__.py", line 650, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/robbwh/miniconda3/envs/rt/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1446, in run_script
    exec(code, namespace, namespace)
  File "/gpfs52/home/robbwh/miniconda3/envs/rt/lib/python3.8/site-packages/rapidtide-2.0a10-py3.8.egg/EGG-INFO/scripts/happy", line 32, in <module>
    happy_workflow.happy_main(happy_parser.process_args)
  File "/home/robbwh/miniconda3/envs/rt/lib/python3.8/site-packages/rapidtide-2.0a10-py3.8.egg/rapidtide/workflows/happy.py", line 1047, in happy_main
    position=args.motfilt_pos,
AttributeError: 'Namespace' object has no attribute 'motfilt_pos'

Is this a known bug? A quick search led me to this commit: https://github.com/bbfrederick/rapidtide/commit/34bdcde3185ba3404f1383fb1f078a33b57135ad

bbfrederick commented 3 years ago

Arg. I clearly didn't do extensive enough testing when I rewrote the command parser. I'll give it a look when I get back to work on Monday.

bbfrederick commented 3 years ago

Fixed in 2.0alpha11, along with a couple other bugs that the testing exposed :-)

robbwh commented 3 years ago

Excellent thanks! The outputs from happy look quite nice--especially viewed in 3D like in your 2019 paper.

May have more explicit questions later down the line...process seems to be working with a TR=2 and 41 slices. Only has agreement with hand recorded scanner pulse rate for about 1/2 of scans (other half it estimates too low of a pulse) but haven't done any QCing yet.

Anyway will likely post a question on neurostars at some point!