Skip to content

Conversation

pontushojer
Copy link

fix #5790, #7080

Hi!

The exit codes from picard tools are written to stdout which messes up pipelines. In my case, I want to be able to pipe MarkDuplicates to output using -O /dev/stdout but the stream gets messed up by this message. Now instead, the message is directed to stderr.

@lbergelson
Copy link
Contributor

@cmnbroad Do you remember why we never changed this? Was there a reason or did it just get lost? It makes sense to me...

@cmnbroad
Copy link
Collaborator

@lbergelson I'm not sure - the change seems fine - although it will affect more than just Picard tool paths. It seems wrong as is though.

@lbergelson
Copy link
Contributor

Oh, right.. That was the reason. Some GATK tools return their results this way so changing it to stdout globally would cause issues there. I think there was a reason we also didn't change it to just use the return code from picard tools specifically as the return code of the process. Maybe because it violated the defined return codes GATK tools promise to honor? It does seem pretty wrong though.

@lbergelson
Copy link
Contributor

Maybe we should output to STDERR but only for picard tools.

@pontushojer
Copy link
Author

Thanks for the context and input! This was my naive PR as someone not at all familiar with the codebase :)

Maybe we should output to STDERR but only for picard tools.

That would be fine by me. My main intention was to enable piping with picard tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Output PICARD tool's output to /dev/stderr, not stdout

3 participants