Hi,
When I run the following command to do the PCA. I installed qiime using conda.
qiime protein-pca plot-loadings --i-pca-loadings PCA-pca-loadings.qza --i-positions-mapping PCA-mapped.qza --o-visualization PCA-pca-loadings.qzv
I got the following error:
Plugin error from protein-pca:
Object of type int64 is not JSON serializable
Debug info has been saved to /var/folders/5z/jxpr82fd79b82r12wbc5jf200000gn/T/qiime2-q2cli-err-2koftfe9.log
Then when I read it:
/Users/vramirezc/opt/miniconda3/envs/protein-pca/lib/python3.8/site-packages/q2_protein_pca/_plot.py:136: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
plot_values['euclid_dist'] = plot_values.apply(
/Users/vramirezc/opt/miniconda3/envs/protein-pca/lib/python3.8/site-packages/q2_protein_pca/_plot.py:138: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
plot_values['max_distance'] = plot_values['euclid_dist'].max()
Traceback (most recent call last):
File "/Users/vramirezc/opt/miniconda3/envs/protein-pca/lib/python3.8/site-packages/q2cli/commands.py", line 339, in __call__
results = action(**arguments)
File "<decorator-gen-50>", line 2, in plot_loadings
File "/Users/vramirezc/opt/miniconda3/envs/protein-pca/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
outputs = self._callable_executor_(scope, callable_args,
File "/Users/vramirezc/opt/miniconda3/envs/protein-pca/lib/python3.8/site-packages/qiime2/sdk/action.py", line 453, in _callable_executor_
ret_val = self._callable(output_dir=temp_dir, **view_args)
File "/Users/vramirezc/opt/miniconda3/envs/protein-pca/lib/python3.8/site-packages/q2_protein_pca/_plot.py", line 172, in plot_loadings
_plot_loadings(
File "/Users/vramirezc/opt/miniconda3/envs/protein-pca/lib/python3.8/site-packages/q2_protein_pca/_plot.py", line 152, in _plot_loadings
context['vega_spec'] = json.dumps(spec)
File "/Users/vramirezc/opt/miniconda3/envs/protein-pca/lib/python3.8/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/Users/vramirezc/opt/miniconda3/envs/protein-pca/lib/python3.8/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
I have tried to solve this error by checking thousand times my input file but I do not see the error. I ran the examples file and they worked but not my files. I do not understand what is wrong with them.
Please let me know if you have any suggestions.
Thanks,
vramirezc