diff --git a/ectyper/speciesIdentification.py b/ectyper/speciesIdentification.py index ba4afa9..dd3901b 100644 --- a/ectyper/speciesIdentification.py +++ b/ectyper/speciesIdentification.py @@ -305,7 +305,7 @@ def verify_ecoli_and_inputs(fasta_fastq_files_dict, ofiles, filesnotfound, args) for bf in ofiles: sampleName = getSampleName(bf) - LOG.warning("Non fasta / fastq file.") + LOG.warning(f"{sampleName} is non fasta / fastq file. Species identification aborted") other_files_dict[sampleName] = {"error":"Non fasta / fastq file. ","filepath":bf,"species":"-"} for file in filesnotfound: diff --git a/test/Data/test_dir/GCA_000181775.1_ASM18177v1_genomic.fna.gz b/test/Data/test_dir/GCA_000181775.1_ASM18177v1_genomic.fna.gz new file mode 100644 index 0000000..f4d134b Binary files /dev/null and b/test/Data/test_dir/GCA_000181775.1_ASM18177v1_genomic.fna.gz differ diff --git a/test/test_ectyper_integration.py b/test/test_ectyper_integration.py index 11e83c2..02db518 100644 --- a/test/test_ectyper_integration.py +++ b/test/test_ectyper_integration.py @@ -143,6 +143,7 @@ def test_multiple_directories(caplog): assert any([True if re.match(r".+sample.fasta.+WARNING\s+\(WRONG\s+SPECIES\).+Non fasta / fastq file", line) else False for line in caplog.text.splitlines()]), "Issue with sample.fasta" assert any([True if re.match(r".+sampletar.+WARNING\s+\(WRONG\s+SPECIES\).+Non fasta / fastq file", line) else False for line in caplog.text.splitlines()]), "Issue with sampletar" assert any([True if re.match(r".+test_junk.+WARNING\s+\(WRONG\s+SPECIES\).+Non fasta / fastq file", line) else False for line in caplog.text.splitlines()]), "Issue with test_junk" + assert any([True if re.match(r".+GCA_000181775\.1_ASM18177v1_genomic\s+Escherichia\s+coli\s+O157\s+H7.+REPORTABLE", line) else False for line in caplog.text.splitlines()]), "Issue with GCF_000181775.1_ASM18177v1" def test_mash_sketch_and_assembly_metadata(tmpdir):