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

Check properly the return code of system calls for sub-scripts #91

Closed
5 tasks done
loic-couderc opened this issue Sep 19, 2019 · 2 comments
Closed
5 tasks done
Assignees
Labels
Milestone

Comments

@loic-couderc
Copy link
Member

loic-couderc commented Sep 19, 2019

Describe the bug
The script sga_assemble.py uses subprocess.call without checking the return code.
By consequence, MATAM will continue its execution until an another error occur.

  • sga_assemble.py

To Reproduce
Run matam with default parameter and use a Phred+64 fastq file.

Expected behavior
Stop MATAM as soon as possible when a system call return a non zero code.

The following scripts may be impacted by a similar problem:

  • index_default_ssu_rrna_db.py (the rc is not set at the end of the script)
  • scripts/evaluate_assembly.py
  • scripts/index_ref_db.py (the rc is not set at the end of the script)
  • scripts/matam_assembly.py
@loic-couderc
Copy link
Member Author

loic-couderc commented Sep 19, 2019

Changing subprocess.call by subprocess.check_call in sga_assemble.py has for consequence to end MATAM prematurely.

# the following command fails because merged_output.fa is empty (6/131 components)
CMD: /home/lcouderc/anaconda3/envs/matam/bin/sga index -d 1000000 -t 1 merged_output.fa

@loic-couderc
Copy link
Member Author

We have to distinguish 2 cases:

  • During the filtering step of SGA, no reads are left, we have exit with 0 code. (A WARNING will be logged).
  • If any SGA command fails, kill the pool and stop MATAM.

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

1 participant