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

ValueError: zero-size array to reduction operation minimum which has no identity #371

Open
neelam19051 opened this issue Jan 12, 2022 · 9 comments
Assignees
Labels
bug something isn't working how it should
Milestone

Comments

@neelam19051
Copy link

neelam19051 commented Jan 12, 2022

Summary: Hi, I am trying to run pyani but it gives some error in description.

ValueError: zero-size array to reduction operation minimum which has no identity

Description:

**average_nucleotide_identity.py -i /home/neel@m95/Desktop/AMR/ref/fna -o /home/neel@m95/Desktop/AMR/ref/output -m ANIm -g**
Traceback (most recent call last):
  File "/home/neel@m95/.local/bin/average_nucleotide_identity.py", line 977, in <module>
    draw(methods[args.method][1], gfmt)
  File "/home/neel@m95/.local/bin/average_nucleotide_identity.py", line 800, in draw
    params_mpl(df)[filestem],
  File "/home/neel@m95/.local/lib/python3.6/site-packages/pyani/pyani_config.py", line 109, in params_mpl
    return {'ANIb_alignment_lengths': ('afmhot', df.values.min(),
  File "/home/neel@m95/.local/lib/python3.6/site-packages/numpy/core/_methods.py", line 43, in _amin
    return umr_minimum(a, axis, None, out, keepdims, initial, where)
ValueError: zero-size array to reduction operation minimum which has no identity

pyani Version:

pyani-0.2.11

installed dependencies

If you are running a version of pyani v0.3 or later, then please run the command pyani listdeps at the command line, and enter the output below.
conda install -c bioconda pyani

Python Version: 3.6

Operating System: Ubuntu 18.04 LTS

@widdowquinn widdowquinn added the bug something isn't working how it should label Jan 13, 2022
@widdowquinn widdowquinn self-assigned this Jan 13, 2022
@widdowquinn
Copy link
Owner

widdowquinn commented Jan 13, 2022

Hi @neelam19051

Thank you for your interest in pyani - that's an error I've not seen before. It looks to me as though there has been an issue with the analysis. Would you please be able to attach a minimal input dataset to this issue, so we can investigate?

Many thanks,

L.

@jthomp28
Copy link

I have also run into this exact error and I am curious if any resolution was found. I am using nearly 200 genomes of ~50 kbp each, and if preferred I will open my own question rather than post here.

@widdowquinn
Copy link
Owner

Thanks @jthomp28 - do you have a minimal dataset that would allow us to reproduce this and investigate?

L.

@jthomp28
Copy link

@widdowquinn Thanks for the quick response! I do have one ready, what would be the best method to get this to you? I am new to GitHub apologies.

@widdowquinn
Copy link
Owner

If it's small enough, you can upload it here - makes things nice and neat for reproduction/follow-up.

@jthomp28
Copy link

TheloniousMonk.txt
Thor.txt
Topgun.txt
Traft412.txt
Treddle.txt
Tripl3t.txt
Trouble.txt
Turj99.txt
U2.txt
Violet.txt
Watermelon.txt
Wheeler.txt
Wilkins.txt
Zeeculate.txt
Zephyr.txt
Zeuska.txt
Abbyshoes.txt
Abrogate.txt
Acme.txt
Adahisdi.txt
Aeneas.txt
AFIS.txt
Ajay.txt
Alsfro.txt
Alvin.txt
Anglerfish.txt
Arcanine.txt
Arlo.txt
Atkinbua.txt
BaconJack.txt
Barriga.txt
Beatrix.txt
BeesKnees.txt
Bethlehem.txt
Bexan.txt
Big3.txt
Bigfoot.txt
BigMau.txt
BigPaolini.txt
BillKnuckles.txt
Bircsak.txt
Blue.txt
Bob3.txt
Bones.txt
BPBiebs31.txt
Briton15.txt
Bruns.txt
Burton.txt
Buttons.txt
Bxb1.txt
CactusRose.txt
Carlyle.txt
ConceptII.txt
Corvo.txt
Crispicous1.txt
Cueylyss.txt
DD5.txt
Doom.txt
Dreamboat.txt
DreamCatcher.txt
DrFeelGood.txt
Dulcie.txt
Dussy.txt
Dynamix.txt
Edtherson.txt
Euphoria.txt
Fajezeel.txt
Fascinus.txt
Fenn.txt
Forsytheast.txt
Francis47.txt
Froghopper.txt
Fushigi.txt
GageAP.txt
Gandalf20.txt
Gompeii16.txt
Graduation.txt
Greg.txt
Gyzlar.txt
HanShotFirst.txt
HarryOW.txt
HermioneGrange.txt
Homines.txt
Hope4ever.txt
Ichabod.txt
ILeeKay.txt
JackSparrow.txt
Jasper.txt
JC27.txt
Jerm2.txt
Jorgensen.txt
Kanely.txt
KBG.txt
Kenmech.txt
Killigrew.txt
KSSJEB.txt
Kugel.txt
Kykar.txt
KyMonks1A.txt
Lamina13.txt
Lesedi.txt
Licorice.txt
Lockley.txt
Lopton.txt
Magnar.txt
Magnito.txt
Makemake.txt
Manatee.txt
Marcell.txt
Marge.txt
Maroc7.txt
Marsha.txt
MaryBeth.txt
McGuire.txt
MetalQZJ.txt
Michley.txt
Moose.txt
MPlant7149.txt
MrGordo.txt
Mryolo.txt
Mule.txt
Museum.txt
Naira.txt
NEHalo.txt
Nerujay.txt
Nhonho.txt
Niza.txt
Ohno789.txt
Oogway.txt
PacerPaul.txt
Papez.txt
Paphu.txt
Pari.txt
Parliament.txt
PattyP.txt
Pepe.txt
Perseus.txt
Petp2012.txt
Petruchio.txt
PherrisBueller.txt
PhrostyMug.txt
PinkPlastic.txt
Pinto.txt
Pippin.txt
Pita2.txt
PSullivan.txt
Rajelicia.txt
Rhynn.txt
RidgeCB.txt
Ringer.txt
Rohr.txt
Rubeus.txt
Rufus.txt
Ruotula.txt
Rutherferd.txt
Sagefire.txt
SarFire.txt
Scowl.txt
Seabiscuit.txt
Seanderson.txt
Sibs6.txt
SkiPole.txt
Smairt.txt
Smeagol.txt
Snazzy.txt
Solon.txt
SpikeBT.txt
Squee.txt
STLscum.txt
StrongArm.txt
Sumter.txt
Sunshine924.txt
SwissCheese.txt
Switzer.txt
Target.txt
Tasp14.txt


Above I have attached all the files used in my analysis as they were small enough to include, apologies if it is more than needed. Below is the script I used to run pyANI:

average_nucleotide_identity.py -v -i /home/jthomp28/scratch/mycothesis/All_Sequences/A1Phages -o /home/jthomp28/scratch/mycothesis/All_Sequences/pyANI_results/A1pyANI -m ANIm -g

I am also running this on a cluster and the rest of the script is below if that is relevant.


#!/bin/bash
#SBATCH --account=def-emandevi
#SBATCH --time=6-00:00:00
#SBATCH --nodes=4
#SBATCH --ntasks-per-node=48
#SBATCH --mem=0
#CEDAR

module load python
module load mummer #used by pyani for quick genome alignment

module load StdEnv/2020
module load gcc/9.3.0
module load blast+

virtualenv --no-download $SLURM_TMPDIR/anaconda
source $SLURM_TMPDIR/anaconda/bin/activate

pip install --no-index --upgrade pip
pip install --no-index -r requirements.txt

pip3 install pyani #no 3rd party tools, installed above

Thank you so much for your time, I genuinely appreciate it!

@widdowquinn
Copy link
Owner

It's going to take me ages to click on all those. Can you isolate a minimal handful of files/a command I can run to reproduce the problem, or maybe provide those files you've linked in a .zip file or similar, please?

@jthomp28
Copy link

A1Phages_txt.zip

@widdowquinn Apologies for that, I don't know why I didn't compress them previously. Here are all the text files in a zip file. Again, thank you.

@baileythegreen
Copy link
Contributor

@widdowquinn, this may be useful in future for downloading files attached to issues:

https://gist.github.com/baileythegreen/df61c39b39c5f04772a39af2968a118a

I haven't done much to generalise it (yet), but it at least worked for me to be able to download all of these files.

@baileythegreen baileythegreen added this to the 0.3.0 milestone May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working how it should
Projects
None yet
Development

No branches or pull requests

4 participants