widdowquinn / pyani

Application and Python module for average nucleotide identity analyses of microbes.
http://widdowquinn.github.io/pyani/
MIT License
196 stars 55 forks source link

The `--version` flag does not work (as expected) #262

Closed baileythegreen closed 3 years ago

baileythegreen commented 3 years ago

Summary:

The --version flag, common to almost every software program, throws an error in the development version fo pyani. (I do not know about v2.)

Additionally, I think that one should be able to run pyani --citation, with no subcommand, and get the pyani citation info back.

Current Output:

$ pyani --version
usage: pyani.py [-h] {download,index,createdb,anim,anib,aniblastall,report,plot,classify,listdeps} ...
pyani.py: error: unrecognized arguments: --version

Expected Output:

$ pyani --version
pyani 0.3.0-alpha

(or whichever version it is)

pyani Version:

dev

baileythegreen commented 3 years ago

The version in branch fixes_262 currently has the following behaviour. The only thing (I have thought of that) it can not do is pyani --version --citation or the reversepyani --citation --version, which only prints out the version information. This is an artefact of the specific checks done in pyani_script.run_main.

Global information

$ pyani --version
pyani.py 0.3.0-alpha

$ pyani --citation
pyani version: 0.3.0-alpha

CITATION INFO:

If you use pyani in your work, please cite the following publication:
    Pritchard, L., Glover, R. H., Humphris, S., Elphinstone, J. G.,
    & Toth, I.K. (2016) 'Genomics and taxonomy in diagnostics for
    food security: soft-rotting enterobacterial plant pathogens.'
    Analytical Methods, 8(1), 12–24. http://doi.org/10.1039/C5AY02550H

Subcommand-specific information

$ pyani aniblastall --version
pyani 0.3.0-alpha
BLAST+ 2.2.26, located at /Users/baileythegreen/Software/miniconda3/bin/blastall
$ pyani aniblastall --citation 
pyani 0.3.0-alpha
BLAST+ 2.2.26, citation:
The authors of pyani gratefully acknowledge its dependence on
the following bioinformatics software:
    MUMmer3: S. Kurtz, A. Phillippy, A.L. Delcher, M. Smoot, M. Shumway,
    C. Antonescu, and S.L. Salzberg (2004), 'Versatile and open software
    for comparing large genomes' Genome Biology 5:R12
    BLAST+: Camacho C., Coulouris G., Avagyan V., Ma N., Papadopoulos J.,
    Bealer K., & Madden T.L. (2008) 'BLAST+: architecture and applications.'
    BMC Bioinformatics 10:421.
    BLAST: Altschul, S.F., Madden, T.L., Schäffer, A.A., Zhang, J.,
    Zhang, Z., Miller, W. & Lipman, D.J. (1997) 'Gapped BLAST and PSI-BLAST:
    a new generation of protein database search programs.' Nucleic Acids Res.
    25:3389-3402
    Biopython: Cock PA, Antao T, Chang JT, Chapman BA, Cox CJ, Dalke A,
    Friedberg I, Hamelryck T, Kauff F, Wilczynski B and de Hoon MJL
    (2009) Biopython: freely available Python tools for computational
    molecular biology and bioinformatics. Bioinformatics, 25, 1422-1423
$ pyani aniblastall --citation --version
pyani 0.3.0-alpha
BLAST+ 2.2.26, located at /Users/baileythegreen/Software/miniconda3/bin/blastall

BLAST+ 2.2.26, citation:
The authors of pyani gratefully acknowledge its dependence on
the following bioinformatics software:
    MUMmer3: S. Kurtz, A. Phillippy, A.L. Delcher, M. Smoot, M. Shumway,
    C. Antonescu, and S.L. Salzberg (2004), 'Versatile and open software
    for comparing large genomes' Genome Biology 5:R12
    BLAST+: Camacho C., Coulouris G., Avagyan V., Ma N., Papadopoulos J.,
    Bealer K., & Madden T.L. (2008) 'BLAST+: architecture and applications.'
    BMC Bioinformatics 10:421.
    BLAST: Altschul, S.F., Madden, T.L., Schäffer, A.A., Zhang, J.,
    Zhang, Z., Miller, W. & Lipman, D.J. (1997) 'Gapped BLAST and PSI-BLAST:
    a new generation of protein database search programs.' Nucleic Acids Res.
    25:3389-3402
    Biopython: Cock PA, Antao T, Chang JT, Chapman BA, Cox CJ, Dalke A,
    Friedberg I, Hamelryck T, Kauff F, Wilczynski B and de Hoon MJL
    (2009) Biopython: freely available Python tools for computational
    molecular biology and bioinformatics. Bioinformatics, 25, 1422-1423