MBHallgren / MINTyper

6 stars 0 forks source link

Error "Less than 3 input files were given" #3

Closed taavirit closed 1 year ago

taavirit commented 1 year ago

I am trying to use MINTyper locally to analyse nanopore data from bacteria, but no matter how I try to specify the input files path I get "Less than 3 input files were given". The path seems correct and there are more than three files. Trying to run on testrun data gives the same error.

The command was as follows: python3 /home/user/mintyper/mintyper_local.py -i_nanopore ./nanopore/ -ref ./ref/ref.fasta -exe_path /home/user/mintyper/ -o output

MBHallgren commented 1 year ago

Hi,

Input files should be given as individual files, or an asterisk (*) should be used. In the above example it should be:

python3 /home/user/mintyper/mintyper_local.py -i_nanopore ./nanopore/* -ref ./ref/ref.fasta -exe_path /home/user/mintyper/ -o output

taavirit commented 1 year ago

Hi,

I have tried both wildcard and writing out individual filenames.

Result when specifying input folder:

python3 /home/kasutaja/mintyper/mintyper_local.py -i_nanopore ./test/ -ref /home/kasutaja/scripts/refs/klebsiella_pneumoniae_ref.fasta -exe_path /home/kasutaja/mintyper/ -o output Less than 3 input files were given.

Result when using wildcard:

python3 /home/kasutaja/mintyper/mintyper_local.py -i_nanopore ./test/* -ref /home/kasutaja/scripts/refs/klebsiella_pneumoniae_ref.fasta -exe_path /home/kasutaja/mintyper/ -o output Traceback (most recent call last): File "/home/kasutaja/mintyper/mintyper_local.py", line 83, in main() File "/home/kasutaja/mintyper/mintyper_local.py", line 16, in main mintyper(args) File "/home/kasutaja/mintyper/mintyper/mintyper_functions.py", line 20, in mintyper mintyper_input = MintyperHandler(args) File "/home/kasutaja/mintyper/mintyper/mintyper_functions.py", line 83, in init self.target_dir, self.logfile = self._handle_output() File "/home/kasutaja/mintyper/mintyper/mintyper_functions.py", line 129, in _handle_output mintyper_input.target_dir = current_path + "/" + self.output_name + "/" NameError: name 'mintyper_input' is not defined

The input files fastq files xx.fastq.

taavirit commented 1 year ago

The problem was surprisingly caused by undefined output folder. Adding a full path solved the issue.