WGLab/NanoCaller

AttributeError: tuple object has no attribute ndims

Opened this issue · 1 comments

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

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.