Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when output file already exists #41

Closed
jhayer opened this issue Nov 10, 2017 · 1 comment
Closed

Bug when output file already exists #41

jhayer opened this issue Nov 10, 2017 · 1 comment
Labels

Comments

@jhayer
Copy link

jhayer commented Nov 10, 2017

If the output file exists, the program should not write in the existing one but maybe overwrite. I got this error:

INFO:iss.generator:Cleaning up
Traceback (most recent call last):
File "/usr/local/bin/iss", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/iss/app.py", line 365, in main
args.func(args)
File "/usr/local/lib/python3.6/site-packages/iss/app.py", line 152, in generate_reads
generator.cleanup(temp_file_list)
File "/usr/local/lib/python3.6/site-packages/iss/generator.py", line 197, in cleanup
os.remove(temp_file + '_R1.fastq')
FileNotFoundError: [Errno 2] No such file or directory: '.iss.tmp.NC_010175.1.0_R1.fastq’

@HadrienG HadrienG added the bug label Nov 10, 2017
@HadrienG
Copy link
Owner

The problem was two fold:

  • the --ncbi option was appending to already existing files. In the next release InSilicoSeq will exit if the output faster file exists
  • In case they were duplicated ids in the input fast file, the reads were written to the same temporary file but were two separate entries in the cleanup function. The first remove worked fine but then the function failed when trying to remove the temporary file a second time.

Thanks for finding this bug!

@HadrienG HadrienG mentioned this issue Nov 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants