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

Support for pipes #26

Open
gcambray opened this issue Jun 2, 2023 · 2 comments
Open

Support for pipes #26

gcambray opened this issue Jun 2, 2023 · 2 comments

Comments

@gcambray
Copy link

gcambray commented Jun 2, 2023

Hi Daniel,

thanks for the tool, just starting to use it instead of UMI-tools and it goes much faster!

At the moment, I'm using it in fastq mode as part of a pipeline in python.
As I just want the tool to run on UMI -not the read sequence- I do create a file where I write a fastq of the UMI parsed in a previous step.
Instead of writing/reading all the data to/from a file, I'd rather pipe the data in UMIcollapse.
Likewise, I'd rather pipe the data out instead of reading from the generated file and deleting it.

Would be great to support e.g. the '-' notation for arg -i and -o to specify reading/writting from stdin/stdout respectively.
Would this be possible to implement?

In the mean time I tried to emulate this by passing /dev/fd/n 'files' (on unix) as arguments to both -i and -o.
This works great until I use the --tag option, in which case I do not receive anything on the output stream.
If I provide a real file as -i, then I get an output in the stream.
I suspect that internally the input is tagged to produce the output and that somehow doesn't work if input is a stream...

With thanks and best regards

@Daniel-Liu-c0deb0t
Copy link
Owner

For tracking clusters with --tag, two passes need to be made over the input. Therefore, this is only possible with an input file. The reason why UMICollapse is designed this way is to avoid having to load all the reads into memory in one pass. I would suggest using a temporary file as input.

@gcambray
Copy link
Author

gcambray commented Jun 7, 2023 via email

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

No branches or pull requests

2 participants