avierstr / amplicon_sorter

Sorts amplicons from Nanopore sequencing data based on similarity
32 stars 8 forks source link

FileNotFoundError: [Errno 2] No such file or directory: #17

Closed JWDebler closed 6 months ago

JWDebler commented 6 months ago

Hi,

I keep getting this error. I still end up with files in the output, but it looks like the script is trying to generate a strange output directory path.

The output set for this run was 'amplicon_barcode01'

python3 amplicon_sorter/amplicon_sorter.py -i barcode01.fastq -o amplicon_barcode01

output files generated are: image

...making consensuses file_0.todo
Writing sequences with high similarity in separate files
Traceback (most recent call last):
  File "/home/nanopore/amplicon_sorter/amplicon_sorter.py", line 2076, in <module>
sort_groups()
  File "/home/nanopore/amplicon_sorter/amplicon_sorter.py", line 2011, in sort_groups 
sort(name)
  File "/home/nanopore/amplicon_sorter/amplicon_sorter.py", line 2039, in sort
filter_seq(group_filename, grouplist, indexes)
 File "/home/nanopore/amplicon_sorter/amplicon_sorter.py", line 1497, in filter_seq
with open(consensusfile, 'a') as outputf:
FileNotFoundError: [Errno 2] No such file or directory: '/home/nanopore/amplicon_amplicon_barcode01_consensussequences.fasta/barcode01_0_0/barcode01_0_0_consensussequences.fasta'

Any idea what's happening here? Cheers Johannes

JWDebler commented 6 months ago

It appears that the problem was an additional '.fastq' in the output directory name coming our of a bash loop. Removing that fixed this error.