Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: tuple object has no attribute ndims #23

Open
bbalog87 opened this issue Mar 2, 2022 · 1 comment
Open

AttributeError: tuple object has no attribute ndims #23

bbalog87 opened this issue Mar 2, 2022 · 1 comment

Comments

@bbalog87
Copy link

bbalog87 commented Mar 2, 2022

Hello,

While trying to call SNPs variant, Nanocaller outputs this error. Have you experienced similar errors?

I've used the following command:

python $HOME/anaconda3/envs/nanocaller_env/bin/NanoCaller \
       -bam AB.nanacaller.sort.bam  \
       -ref AB.ref.fa \
       -cpu 94 \
       -keep_bam \
       -prefix scaffold_1.calls.vcf \
       -phase_bam  \
       -enable_whatshap \
       -seq pacbio \
       -mode snps \
       -chrom scaffold_1 \
       -o scaffold_1.out
2022-03-02 17:35:24.799099: Starting NanoCaller.

NanoCaller command and arguments are saved in the following file: scaffold_5.out/args

2022-03-02 17:35:26.704283: SNP calling started.
2022-03-02 17:35:28.001220: Coverage=126.00x.
2022-03-02 17:35:28.070411: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX
2022-03-02 17:35:28.081328: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2400015000 Hz
2022-03-02 17:35:28.086629: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x5649235df020 executing computations on platform Host. Devices:
2022-03-02 17:35:28.086657: I tensorflow/compiler/xla/service/service.cc:158]   StreamExecutor device (0): <undefined>, <undefined>
Traceback (most recent call last):
  File "/home/fb3/nguinkal/anaconda3/envs/nanocaller_env/bin/NanoCaller", line 259, in <module>
    run(args)
  File "/home/fb3/nguinkal/anaconda3/envs/nanocaller_env/bin/NanoCaller", line 77, in run
    snp_vcf=snpCaller.test_model(in_dict, pool)
  File "/home/fb3/nguinkal/anaconda3/envs/nanocaller_env/bin/nanocaller_src/snpCaller.py", line 138, in test_model
    batch_prob_A, batch_prob_G, batch_prob_T, batch_prob_C, batch_prob_GT = snp_model([batch_x, batch_ref[:,0][:,np.newaxis], batch_ref[:,1][:,np.newaxis], batch_ref[:,2][:,np.newaxis], batch_ref[:,3][:,np.newaxis]])
  File "/home/fb3/nguinkal/anaconda3/envs/nanocaller_env/lib/python3.6/site-packages/tensorflow/python/keras/engine/base_layer.py", line 592, in __call__
    outputs = self.call(inputs, *args, **kwargs)
  File "/home/fb3/nguinkal/anaconda3/envs/nanocaller_env/bin/nanocaller_src/model_architect.py", line 38, in call
    C1_1 = self.conv1_1(x)
  File "/home/fb3/nguinkal/anaconda3/envs/nanocaller_env/lib/python3.6/site-packages/tensorflow/python/keras/engine/base_layer.py", line 538, in __call__
    self._maybe_build(inputs)
  File "/home/fb3/nguinkal/anaconda3/envs/nanocaller_env/lib/python3.6/site-packages/tensorflow/python/keras/engine/base_layer.py", line 1591, in _maybe_build
    self.input_spec, inputs, self.name)
  File "/home/fb3/nguinkal/anaconda3/envs/nanocaller_env/lib/python3.6/site-packages/tensorflow/python/keras/engine/input_spec.py", line 109, in assert_input_compatibility
    if x.shape.ndims is None:
AttributeError: 'tuple' object has no attribute 'ndims'

Would appreciate any help.
Thanks

@umahsn
Copy link
Collaborator

umahsn commented Mar 3, 2022

Hi,

There seems to a problem with package compatibility in bioconda recipe. Please install NanoCaller v2.0.0 using this command:

conda install -c bioconda nanocaller=2.0.0 muscle=3.8

I am fixing the compatibility issues for the latest release which could take a couple days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants