Can't install q2-SCNIC

I am interested in using this plugin. However, when I try to install, I get an error. Here is the full terminal output:

(qiime2-2020.2) jenweinert@x86_64-apple-darwin13 ~ % conda install -c lozuponelab q2-SCNIC
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  • q2-scnic -> python=3.5

Your python: python=3.6.7

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

Based on my reading of the error message, I would say that your plug-in requires a different version of python than I have installed on my computer (Mac). Just wanted to know if there was a good work-around for this or what you would recommend doing. I don't want to do anything that could potentially mess up other things with the computer, so thought I might ask here.

Thanks for any help/suggestions.

Hi @jrw187! q2-SCNIC hasn’t seen any updates in a few years, but I think it was recently revived by @kthurimella, perhaps there is some news or status updates that can be shared here…

I got this to work.

The installation was successful using code from the plugin library page.

From the library page -
This worked: pip install scnic
This failed: conda install -q scnic

And the code from this tutorial still did not work.

But I was able to install and run it using that alternate command for install.

2 Likes

Hey @jrw187. Thanks for using SCNIC. Good to know that the pip install was able to work. Can you provide me with some of the error messages you ran into when running the code from the tutorial?

1 Like

omg, I was fighting with conda all day, and this is magic. Thank you very much!

2 Likes

I have succussfully instaled using the pip option, however, qiime still does not show plugin. Here are some of the messages I got :

successfully built scnic

Installing collected packages: scnic

Successfully installed scnic-0.6.2

(qiime2-2020.8) localhost:subtables able$ qiime SCNIC sparcc-filter

Error: QIIME 2 has no plugin/command named ‘SCNIC’.

(qiime2-2020.8) localhost:subtables able$ qiime scnic-0.6.2 sparcc-filter

Error: QIIME 2 has no plugin/command named ‘scnic-0.6.2’.

(qiime2-2020.8) localhost:subtables able$ qiime scnic sparcc-filter

Error: QIIME 2 has no plugin/command named ‘scnic’.

many thanks for the help.

Hi Tingting,

To use SCNIC once it’s installed the use case is below. There are different modes that you can see by doing SCNIC_analysis.py -h

SCNIC_analysis.py within -i example_table.biom -o within_output/ -m sparcc

Hope this helps!

Hi @kthurimella,

Sorry that I did not reply to your earlier message on this string. I got diverted onto some other data analysis and am just coming back around to this now. If it would still be helpful, I can go back and find some of the coding and error messages from that time from my attempts at installing using the tutorial.

I do have one question for you though. I was able to get SCNIC to run. However, ideally, you would run the correlations with sparcc as the method. This does not work and produces an error. I have included the full code and error message below. However, everything works fine if I set the method to Spearman rather than sparcc. Can you provide a suggestion as to how I could get the sparcc correlation to run? Thanks!

Code and Error Message:

(qiime2-2020.2) jenweinert@x86_64-apple-darwin13 protein % qiime SCNIC calculate-correlations
–i-table scnic-rarefied-table.qza
–p-method sparcc
–o-correlation-table scnic-rarefied-correls.qza
–verbose
Correlating with sparcc
/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/biom/table.py:4068: FutureWarning: SparseDataFrame is deprecated and will be removed in a future version.
Use a regular DataFrame whose columns are SparseArrays instead.

See http://pandas.pydata.org/pandas-docs/stable/user_guide/sparse.html#migrating for more.

return constructor(mat, index=index, columns=columns)
/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/pandas/core/sparse/frame.py:257: FutureWarning: SparseSeries is deprecated and will be removed in a future version.
Use a Series with sparse values instead.

>>> series = pd.Series(pd.SparseArray(...))

See http://pandas.pydata.org/pandas-docs/stable/user_guide/sparse.html#migrating for more.

sparse_index=BlockIndex(N, blocs, blens),
/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/pandas/core/generic.py:4583: FutureWarning: SparseSeries is deprecated and will be removed in a future version.
Use a Series with sparse values instead.

>>> series = pd.Series(pd.SparseArray(...))

See http://pandas.pydata.org/pandas-docs/stable/user_guide/sparse.html#migrating for more.

return self._constructor(new_data).finalize(self)
/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/pandas/core/frame.py:3471: FutureWarning: SparseSeries is deprecated and will be removed in a future version.
Use a Series with sparse values instead.

>>> series = pd.Series(pd.SparseArray(...))

See http://pandas.pydata.org/pandas-docs/stable/user_guide/sparse.html#migrating for more.

return klass(values, index=self.index, name=items, fastpath=True)
Traceback (most recent call last):
File “/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/commands.py”, line 328, in call
results = action(**arguments)
File “</Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/decorator.py:decorator-gen-863>”, line 2, in calculate_correlations
File “/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 245, in bound_callable
output_types, provenance)
File “/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 390, in callable_executor
output_views = self._callable(**view_args)
File “/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_SCNIC/_SCNIC_methods.py”, line 29, in calculate_correlations
correls = ca.fastspar_correlation(table, verbose=True, nprocs=n_procs)
File “/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/SCNIC/correlation_analysis.py”, line 83, in fastspar_correlation
path.join(temp, ‘covar_table.tsv’), stdout, nprocs)
File “/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/SCNIC/correlation_analysis.py”, line 71, in run_fastspar
covar_table_loc, ‘-t’, str(nprocs)], stdout=stdout, check=True)
File “/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/subprocess.py”, line 403, in run
with Popen(*popenargs, **kwargs) as process:
File “/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/subprocess.py”, line 709, in init
restore_signals, start_new_session)
File “/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/subprocess.py”, line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ‘fastspar’: ‘fastspar’

Plugin error from SCNIC:

[Errno 2] No such file or directory: ‘fastspar’: ‘fastspar’

See above for debug info.

Hey @jrw187, thanks so much for that! I think it’s a version issue that was brought up here recently: q2 scnic fails in calculating correlations

Let me know if that doesn’t work.

Kumar

Hi @kthurimella,

I think this is a different issue. The error messages that I am getting aren’t the same as the other user mentioned in that separate post. I tried running the code for sparcc correlation in multiple versions (i.e. 2020.8, 2020.2, 2019.10, 2019.7) and got the same error message regardless of the version that I used. Spearman as the correlation method worked for all these versions.

Thanks in advance for any suggestions!

1 Like