WrightonLabCSU / DRAM

Distilled and Refined Annotation of Metabolism: A tool for the annotation and curation of function for microbial and viral genomes
GNU General Public License v3.0
249 stars 52 forks source link

Fix `DRAM-setup.py` v1.5.0 for missing `)` #339

Open npavlovikj opened 6 months ago

npavlovikj commented 6 months ago

Hi,

In the script DRAM-setup.py for v1.5.0, one line has a missing ) before the next line starts: https://github.com/WrightonLabCSU/DRAM/blob/7735a04e58c300d53f9d3611a583b48e507bb843/scripts/DRAM-setup.py#L123. This breaks the update of the conda recipe (https://github.com/bioconda/bioconda-recipes/pull/45045) which fails with:

16:14:36 BIOCONDA INFO (OUT) + DRAM-setup.py --help
16:14:36 BIOCONDA INFO (OUT)   File "/opt/conda/conda-bld/dram_1706198871410/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/bin/DRAM-setup.py", line 124
16:14:36 BIOCONDA INFO (OUT)     set_db_locs_parser.add_argument('--camper_tar_gz_loc', default=None,
16:14:36 BIOCONDA INFO (OUT)     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16:14:36 BIOCONDA INFO (OUT) SyntaxError: invalid syntax. Perhaps you forgot a comma?

I believe that:

    set_db_locs_parser.add_argument('--viral_loc', default=None,
    set_db_locs_parser.add_argument('--camper_tar_gz_loc', default=None,
                                    help='The source for the CAMPER database files, this is a tar.gz file downloaded'
                                    ' from the release page https://github.com/WrightonLabCSU/CAMPER/releases')
                                    help='mmseqs2 database file from ref seq viral gene collection')

should be

    set_db_locs_parser.add_argument('--viral_loc', default=None,
                                    help='mmseqs2 database file from ref seq viral gene collection')
    set_db_locs_parser.add_argument('--camper_tar_gz_loc', default=None,
                                    help='The source for the CAMPER database files, this is a tar.gz file downloaded'
                                    ' from the release page https://github.com/WrightonLabCSU/CAMPER/releases')

instead.

I see that the DRAM-setup.py script is updated in the master branch of the repo as per https://github.com/WrightonLabCSU/DRAM/issues/330, but not in the PyPI v1.5.0 version for DRAM, so can you please update this release with the correct script so we can successfully update the conda package without patching the script?

Thank you, Natasha

anbadilla commented 6 months ago

I am also struggling to run DRAM due to this issue. Any solution so far?

Thanks!

npavlovikj commented 6 months ago

@anbadilla , I updated the bioconda DRAM 1.5.0 recipe to include patched and corrected DRAM-setup.py file (https://github.com/bioconda/bioconda-recipes/tree/master/recipes/dram), so if you install DRAM 1.5.0 via conda (https://anaconda.org/bioconda/dram), this issue is fixed.

However, it is definitely better for the DRAM-setup.py file to be fixed in the 1.5.0 release instead of using patches. Looks like the file is updated for this repo's master branch, but not for the tagged release.

marinemicrobe commented 5 months ago

I just installed DRAM 1.5.0 via conda and had the same issue. I simply deleted those two lines to avoid the error message, as those lines don't affect my applications.

npavlovikj commented 5 months ago

@marinemicrobe , the bioconda DRAM 1.5.0 package is fixed and doesn't give the error mentioned above, so please make sure you have the 1.5.0 version installed from bioconda and not PyPI.

Nayeli-Luis commented 1 month ago

@marinemicrobe , the bioconda DRAM 1.5.0 package is fixed and doesn't give the error mentioned above, so please make sure you have the 1.5.0 version installed from bioconda and not PyPI.

I have installed through Bioconda and I got same error, but this one was easy to fix.