I am running in Docker on Windows and I’m fairly new to Nextstrain, but I have run through the Zika tutorial and a flu example build successfully. Now I’m trying to tweak and modify the example flu build and I’m running into an issue that I can’t seem to diagnose.
This is the error I see:
Error in rule join_metadata:
jobid: 15
input: data/h3n2/metadata_ha.tsv, data/h3n2/metadata_na.tsv
output: data/h3n2/metadata_joined.tsv
log: logs/join_metadata_h3n2.txt (check log file(s) for error details)
conda-env: /nextstrain/build/.snakemake/conda/dae81987b7ec4d339b11532c7759e4d4_
shell:
python3 scripts/join_metadata.py --metadata data/h3n2/metadata_ha.tsv data/h3n2/metadata_na.tsv --segments ha na --segment-columns accession --how outer --output data/h3n2/metadata_joined.tsv 2>&1 | tee logs/join_metadata_h3n2.txt
(one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)
And this is the corresponding log:
Traceback (most recent call last):
File "/nextstrain/augur/augur/io/metadata.py", line 469, in _get_delimiter
return csv.Sniffer().sniff(file.readline(), "".join(valid_delimiters)).delimiter
File "/usr/local/lib/python3.10/csv.py", line 187, in sniff
raise Error("Could not determine delimiter")
_csv.Error: Could not determine delimiter
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/nextstrain/build/scripts/join_metadata.py", line 28, in <module>
segment_metadata = read_metadata(segment_metadata_file)
File "/nextstrain/augur/augur/io/metadata.py", line 79, in read_metadata
"sep": _get_delimiter(metadata_file, delimiters),
File "/nextstrain/augur/augur/io/metadata.py", line 473, in _get_delimiter
raise InvalidDelimiter from error
augur.io.metadata.InvalidDelimiter
I ran into a very similar problem once in the past, and it turned out to be related to this issue. At that time, it was easy to fix by manually changing the file extensions to .tsv instead of .txt. Now, my file extensions are already .tsv files. I tried reading all my metadata files into R as tsv files and that worked fine. I’m not sure what the issue is now. Any help would be appreciated! Thank you.