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

Catch MACS error #35

Closed
orzechoj opened this issue Aug 8, 2018 · 8 comments
Closed

Catch MACS error #35

orzechoj opened this issue Aug 8, 2018 · 8 comments
Labels
improve-behaviour Optimise code without adding functionality
Milestone

Comments

@orzechoj
Copy link

orzechoj commented Aug 8, 2018

Sometimes MACS fails because the data are so bad that it can make a model of the peaks. The error message Too few paired peaks (0) so I can not build the model! is given. This causes the entire pipeline to crash, even if there is only one bad data set.

A better solution would perhaps be to report this error, but then continue?

@orzechoj
Copy link
Author

A quick and ugly fix is to add errorStrategy = 'ignore' to the macsjob in base.config. But then we don't see which macs jobs have failed (and we ignore other errors in the macs jobs too).

@ewels ewels added the feature-request Request to add new functionality label Aug 10, 2018
@apeltzer
Copy link
Member

Is there a special error code that MACS generates in such a case? That would be interesting to catch and issue a warning for that sample.

@ewels
Copy link
Member

ewels commented Aug 14, 2018

You mean an exit code? Not sure. I was saying to @orzechoj that we could implement a similar strategy to the one that we have in the rnaseq pipeline though, where we check the log files:

https://github.com/nf-core/rnaseq/blob/d64b7f536b09b400c8d46533b150c4f05843b556/main.nf#L591-L595

https://github.com/nf-core/rnaseq/blob/d64b7f536b09b400c8d46533b150c4f05843b556/main.nf#L530-L549

@apeltzer
Copy link
Member

Yeah, exit code was in my mind actually. I thought the failing MACS process issues an exit code != 0, therefore causing the pipeline to fail. If it just pushes something on stderr, we can implement it the way you proposed - nice 👍

@ewels
Copy link
Member

ewels commented Aug 14, 2018

The problem with the exit code is that it probably doesn’t differentiate for why it fails - we only want to catch these specific failures. I could be wrong though!

@apeltzer
Copy link
Member

I fear so, too! If I find some time I'll have a look.

@orzechoj
Copy link
Author

orzechoj commented Aug 14, 2018

The exit code is 1, which isn't so informative. But stderr has this error message

Too few paired peaks (0) so I can not build the model! Broader your MFOLD range parameter
may  erase this error. If it still can't build the model, we suggest to use --nomodel and 
--extsize 147 or other fixed number instead.

@ewels ewels added improve-behaviour Optimise code without adding functionality and removed feature-request Request to add new functionality labels Aug 15, 2018
@ewels ewels added this to the Version 1.1 milestone Aug 15, 2018
@drpatelh
Copy link
Member

drpatelh commented Jun 2, 2020

Closing in favour of #128

@drpatelh drpatelh closed this as completed Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improve-behaviour Optimise code without adding functionality
Projects
None yet
Development

No branches or pull requests

4 participants