pirovc / ganon

ganon2 classifies genomic sequences against large sets of references efficiently, with integrated download and update of databases (refseq/genbank), taxonomic profiling (ncbi/gtdb), binning and hierarchical classification, customized reporting and more
https://pirovc.github.io/ganon/
MIT License
87 stars 13 forks source link

[Errno 7] Argument list too long v 0.4.0 #167

Closed Lucas-Maciel closed 3 years ago

Lucas-Maciel commented 3 years ago

Hi, I'm trying to use ganon but I got an error when I tried to build the dataset

ganon build --db-prefix ganon_db -t 32 --input-files RefSeqCG_arc_bac/v1/files/*genomic.fna.gz



(_ (_ (_) _ v. 0.4.0

Downloading taxdump

Unpacking taxdump

Parsing taxonomy

Extracting sequence identifiers

Retrieving sequence information from NCBI E-utils

Build: adding 44723 sequences

Calculating best bin length

Building index (ganon-build)

pirovc commented 3 years ago

Hi @Lucas-Maciel

Please check the following parameters:

  --input-directory     Directory containing input files
  --input-extension     Extension of files to use with --input-directory (provide it without * expansion, e.g. ".fna.gz")

the command would be something like: ganon build --db-prefix ganon_db -t 32 --input-directory "RefSeqCG_arc_bac/v1/files/" --input-extension "genomic.fna.gz"

Lucas-Maciel commented 3 years ago

@pirovc thanks for you fast reply, but changing the parameters as you suggested got me the same error

ganon build --db-prefix ganon_db -t 32 --input-directory "RefSeqCG_arc_bac/v1/files/" --input-extension "genomic.fna.gz"

Building index (ganon-build)

[Errno 7] Argument list too long: '/lucmac/miniconda3/bin/ganon-build' Error code: 0 Out: Error:

pirovc commented 3 years ago

Thanks for sharing again, there is indeed a bug causing this issue. I will provide a fix very soon.

In the meantime, please just concatenate your files together cat RefSeqCG_arc_bac/v1/files/*genomic.fna.gz > sequences.fna.gz and use it directly ganon build --db-prefix ganon_db -t 32 --input-files sequences.fna.gz