Closed pig-raffles closed 2 years ago
Hi @pig-raffles it would be helpful if you included the exact installation instructions you used.
For instance, did you pip install tensorflow=1.15.2
?
Regarding example data files, its all on the repo : https://github.com/biocore/songbird/tree/master/data It should be documented in the README, but feel free to follow up if it isn't already clear
Thanks for getting back to me so quickly
Sorry was being dumb about the example files. Was looking on my computer rather than GitHub. Found it very easily.
For the standalone installation, the error message I showed above was from exactly following the README.ml instructions:
conda create -n songbird_env songbird "pandas>=0.18.0,<1" -c conda-forge source activate songbird_env
When I additionally use "pip install "tensorflow<2"", the installation is apparently successful but I get the following error message:
"ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. songbird 1.0.3 requires nose>=1.3.7, which is not installed"
I tried running songbird on the example data without installing "nose". Despite the above error message this seems to work and produces a "differential.tsv" file
When I try running the same default run command with my own files.
songbird multinomial \ --input-biom KO_SaltvsFresh_Ant.biom \ --metadata-file Metadata_SaltvsFresh_Ant.txt \ --formula "Treatment" \ --epochs 10000 \ --differential-prior 0.5 \ --training-column Testing \ --summary-interval 1 \ --summary-dir results
I get the following error message:
"Traceback (most recent call last): File "/Users/alan02/miniconda3/envs/songbird_env/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 2897, in get_loc return self._engine.get_loc(key) File "pandas/_libs/index.pyx", line 107, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/index.pyx", line 131, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/hashtable_class_helper.pxi", line 1607, in pandas._libs.hashtable.PyObjectHashTable.get_item File "pandas/_libs/hashtable_class_helper.pxi", line 1614, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: 'Testing'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/alan02/miniconda3/envs/songbird_env/bin/songbird", line 225, in
Is there a problem with my file formatting?
The biom format (Hierarchical Data Format (version 5) data) seems to be the same for both the example feature-table.biom and my biom file.
Is there anything else that could be problematic with my data files?
The error message you are getting here is due to your sample metadata -- you didn't specify a Testing
column.
You have 2 options -- either add an additional column with train/test labels for each sample, or just drop it and automatically have Songbird fill that out for you.
Thanks again,
I am now getting the error message: ValueError: initial_value must have a shape specified: Tensor("random_normal:0", shape=(2, ?), dtype=float32)
In another issue you state that this is caused by an empty datase, with potential issues being:
I have checked all these and can't find an issue, the min number of counts per sample is > 1000, and the min number of samples a feature needs to be observed in is not an issue. The names appear to be identical in the biom file and the metadata.
Could there be another issue causing this? biom format? too few samples?
Thanks,
Alan
I'd try the following to double check
--min-sample-count 0
--min-feature-count 0
import biom
import pandas as pd
table = biom.Table('<your_file.biom>')
md = pd.read_table('<your metadata file>', index_col=0)
print(len(set(md.index) & set(table.ids()))
If you are still getting errors and your sample ids are indeed matching, it'll help if you attach your files to this issue to help with debugging.
Hi,
When I ran "table = biom.Table('
"Traceback (most recent call last):
File "
This suggests to me that my original OTU file was in the wrong format or the conversion script is not compatible. To create the biom file. I used the following commands:
"biom convert -i KO_pred_ancom_SaltvsFresh_Ant.txt -o KO_SaltvsFresh_Ant.biom --to-hdf5"
I have attached the original tab-delimited text file that I converted into biom format KO_pred_ancom_SaltvsFresh_Ant.txt
There did not seem to be any errors associated with the metadata file
hmm. I won't be able to reproduce your exact error without the exact commands.
But with the text file that you have, you can still run the following
import biom
import pandas as pd
table = pd.read_table('KO_pred_ancom_SaltvsFresh_Ant.txt', index_col=0
md = pd.read_table('<your metadata file>', index_col=0)
print(len(set(md.index) & set(table.columns))
P.S. I'm going to close this issue, since this is much more appropriate for the qiime2 forums.
Hi,
I am having problems installing Songbird. Whilst the installation process seems to be successful, with no error messages, when I try to run Songbird I get errors. I have tried both the standalone version and the qiime plugin, neither seem to work
When I install the standalone version and try to use songbird, I get the following error message:
"Traceback (most recent call last): File "/Users/alan02/miniconda3/envs/songbird_env/bin/songbird", line 8, in
from songbird.multinomial import MultRegression
File "/Users/alan02/miniconda3/envs/songbird_env/lib/python3.7/site-packages/songbird/multinomial.py", line 3, in
from tensorflow.contrib.distributions import Multinomial, Normal
File "/Users/alan02/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow/init.py", line 50, in getattr
module = self._load()
File "/Users/alan02/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow/init.py", line 44, in _load
module = _importlib.import_module(self.name)
File "/Users/alan02/miniconda3/envs/songbird_env/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/Users/alan02/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow_core/contrib/init.py", line 39, in
from tensorflow.contrib import compiler
File "/Users/alan02/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow_core/contrib/compiler/init.py", line 21, in
from tensorflow.contrib.compiler import jit
File "/Users/alan02/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow_core/contrib/compiler/init.py", line 22, in
from tensorflow.contrib.compiler import xla
File "/Users/alan02/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow_core/contrib/compiler/xla.py", line 22, in
from tensorflow.python.estimator import model_fn as model_fn_lib
File "/Users/alan02/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow_core/python/estimator/model_fn.py", line 26, in
from tensorflow_estimator.python.estimator import model_fn
File "/Users/alan02/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow_estimator/init.py", line 10, in
from tensorflow_estimator._api.v1 import estimator
File "/Users/alan02/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow_estimator/_api/v1/estimator/init.py", line 10, in
from tensorflow_estimator._api.v1.estimator import experimental
File "/Users/alan02/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow_estimator/_api/v1/estimator/experimental/init.py", line 10, in
from tensorflow_estimator.python.estimator.canned.dnn import dnn_logit_fn_builder
File "/Users/alan02/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/canned/dnn.py", line 27, in
from tensorflow_estimator.python.estimator import estimator
File "/Users/alan02/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 36, in
from tensorflow.python.profiler import trace
ImportError: cannot import name 'trace' from 'tensorflow.python.profiler' (/Users/alan02/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow_core/python/profiler/init.py)"
With the qiime plugin, I get the following error message: "QIIME is caching your current deployment for improved performance. This may take a few moments and should only happen once per deployment. Illegal instruction: 4"
Finally, how do I access the example data files from songbird? Whilst I have my own files I would like to make sure songbird is running correctly. I have tried looking for them on my computer but cant locate them.
Thanks in advance for any advice you can give on getting songbird to run properly