smithlabcode / methpipe

A pipeline for analyzing DNA methylation data from bisulfite sequencing.
http://smithlabresearch.org/methpipe
67 stars 27 forks source link

Sam pre release #171

Closed SDeans0 closed 3 years ago

SDeans0 commented 3 years ago

Hi Smith lab,

I've been trying out abismal with your downstream analysis tools, and I found that I always wanted to write to stdout so that I could compress output to bam before writing it to disk. This is possible with all of the tools I've tried except duplicate-remover, so I added the option to specify the output file as - to send the output to stdout in a similar manner to the other switches in the other tools. I initially changed the output mechanism in line with the other tools but then realised a more minimal edit was probably more appropirate (hence the reverting commits; I was a bit hasty with it). I thought you might be interested so I thought I'd put in a pull request. I added a relevant note in the help message for duplicate-remover.cpp.

I'd be happy to re-fork the repository and make the edits in a single commit if you wanted to take the edit but keep the commit history a bit cleaner, but I thought I'd open the pull request first so you could see it before doing that, as the code works for my purposes already.

Thanks!

guilhermesena1 commented 3 years ago

Hi,

Thank you for proposing this feature which is indeed useful for BAM compression on output. I will accept the pull request but I will also need to make a few changes. We usually print to stdout when the -o parameter is not specified, so instead of checking for a dash, we have to check outfile.empty() and have the output not be mandatory.