Tried a few more things without success, both leaving out all \ and %%bash with and without \ which gave even more errors.
!redbiom fetch qiita-study --context $ctx --study-id 2136 --remove-blanks --output-basename icc
Usage: redbiom fetch qiita-study [OPTIONS]
Try 'redbiom fetch qiita-study --help' for help.
Error: Missing option '--study-id'.
%%bash
!redbiom fetch qiita-study --context $ctx --study-id 2136 --remove-blanks --output-basename icc
bash: line 1: !redbiom: command not found
CalledProcessError Traceback (most recent call last)
Cell In[36], line 1
----> 1 get_ipython().run_cell_magic('bash', '', '!redbiom fetch qiita-study --context $ctx --study-id 2136 --remove-blanks --output-basename icc\n')
File ~/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/IPython/core/interactiveshell.py:2430, in InteractiveShell.run_cell_magic(self, magic_name, line, cell)
2428 with self.builtin_trap:
2429 args = (magic_arg_s, cell)
-> 2430 result = fn(*args, **kwargs)
2432 # The code below prevents the output from being displayed
2433 # when using magics with decodator @output_can_be_silenced
2434 # when the last Python token in the expression is a ';'.
2435 if getattr(fn, magic.MAGIC_OUTPUT_CAN_BE_SILENCED, False):
File ~/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/IPython/core/magics/script.py:153, in ScriptMagics._make_script_magic..named_script_magic(line, cell)
151 else:
152 line = script
--> 153 return self.shebang(line, cell)
File ~/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/IPython/core/magics/script.py:305, in ScriptMagics.shebang(self, line, cell)
300 if args.raise_error and p.returncode != 0:
301 # If we get here and p.returncode is still None, we must have
302 # killed it but not yet seen its return code. We don't wait for it,
303 # in case it's stuck in uninterruptible sleep. -9 = SIGKILL
304 rc = p.returncode or -9
--> 305 raise CalledProcessError(rc, cell)
CalledProcessError: Command 'b'!redbiom fetch qiita-study --context $ctx --study-id 2136 --remove-blanks --output-basename icc\n'' returned non-zero exit status 127.
And finally
%%bash
!redbiom fetch qiita-study
--context $ctx
--study-id 2136
--remove-blanks
--output-basename icu
bash: line 1: !redbiom: command not found
CalledProcessError Traceback (most recent call last)
Cell In[37], line 1
----> 1 get_ipython().run_cell_magic('bash', '', '!redbiom fetch qiita-study \\n --context $ctx \\n --study-id 2136 \\n --remove-blanks \\n --output-basename icu\n')
File ~/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/IPython/core/interactiveshell.py:2430, in InteractiveShell.run_cell_magic(self, magic_name, line, cell)
2428 with self.builtin_trap:
2429 args = (magic_arg_s, cell)
-> 2430 result = fn(*args, **kwargs)
2432 # The code below prevents the output from being displayed
2433 # when using magics with decodator @output_can_be_silenced
2434 # when the last Python token in the expression is a ';'.
2435 if getattr(fn, magic.MAGIC_OUTPUT_CAN_BE_SILENCED, False):
File ~/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/IPython/core/magics/script.py:153, in ScriptMagics._make_script_magic..named_script_magic(line, cell)
151 else:
152 line = script
--> 153 return self.shebang(line, cell)
File ~/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/IPython/core/magics/script.py:305, in ScriptMagics.shebang(self, line, cell)
300 if args.raise_error and p.returncode != 0:
301 # If we get here and p.returncode is still None, we must have
302 # killed it but not yet seen its return code. We don't wait for it,
303 # in case it's stuck in uninterruptible sleep. -9 = SIGKILL
304 rc = p.returncode or -9
--> 305 raise CalledProcessError(rc, cell)
CalledProcessError: Command 'b'!redbiom fetch qiita-study \\n --context $ctx \\n --study-id 2136 \\n --remove-blanks \\n --output-basename icu\n'' returned non-zero exit status 127.
Nothing has worked