MGXlab / CAT_pack

CAT/BAT/RAT: tools for taxonomic classification of contigs and metagenome-assembled genomes (MAGs) and for taxonomic profiling of metagenomes
MIT License
191 stars 30 forks source link

CAT prepare example doesn't work #77

Open snayfach opened 2 years ago

snayfach commented 2 years ago

I'm running CAT v5.2.3 (10 February, 2021) and am trying to create a custom database for CAT. I have all the needed input files, and I'm running:

CAT prepare \
--db_fasta path/to/fasta \
--names path/to/names.dmp \
--nodes path/to/nodes.dmp \
--acc2tax path/to/acc2taxid.txt.gz \
--db_dir path/to/output_dir

However I'm getting the error too much arguments supplied: and taking a look at the help text for CAT prepare that makes sense bc none of the options above are listed:

usage: CAT prepare (--fresh | --existing) [options] [-h / --help]

Download and construct CAT/BAT database files.

Required choice: --fresh Start with a fresh database. --existing Start with an existing database. CAT will search the supplied database and taxonomy folders and only construct files that do not exist yet.

Optional arguments: -d , --database_folder Name of folder to which database files will be written (default: CAT_database.{date}) -t , --taxonomy_folder Name of folder to which taxonomy files will be downloaded (default: CAT_taxonomy.{date}) --path_to_diamond Path to DIAMOND binaries. Supply if CAT/BAT cannot find DIAMOND. -q, --quiet Suppress verbosity. --verbose Increase verbosity. --no_log Suppress log file. -h, --help Show this help message and exit.

DIAMOND specific optional arguments: -n , --nproc Number of cores to deploy by DIAMOND (default: maximum).

Could you update your documentation accordingly to provide instructions for building a custom database?

divprasad commented 2 years ago

Hi @snayfach, I was running into the same issue.

For me, it was the conda installation. I deleted the conda from conda install -c bioconda cat. Instead, I create a new environment and installed both the dependencies with conda install -c bioconda diamond prodigal. Maybe you could try this?

snayfach commented 2 years ago

Yes that did the trick, thanks @divprasad!