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

Feature request: Option for unsorted BAM output by dorado aligner #1211

Open
cihanerkut opened this issue Jan 8, 2025 · 2 comments
Open

Comments

@cihanerkut
Copy link

cihanerkut commented Jan 8, 2025

Dorado aligner output is sorted by default (#642) but some tools may require alignments to be at random order, i.e. unsorted. As far as I could see, this is the case when the output is directed to stdout rather than an output folder:

const bool sort_bam = (file_info.output_mode == utils::HtsFile::OutputMode::BAM &&
file_info.output != "-");

However, the alignment_summary.txt file also has valuable information but it won't be created unless the output is directed to a folder. To break this mutual exclusivity, one can perhaps add a command line argument to disable sorting alignments, basically overriding the code above.

My current workaround is using samtools collate to "shuffle" the alignments but it means unnecessary compute.

@susie-ont
Copy link
Collaborator

Hi @cihanerkut, thanks for your post. To help us better understand your request, could you please specify which tools you’re using that require shuffled alignments?

@cihanerkut
Copy link
Author

Hi @susie-ont,

Thanks for your quick response. I would like to use Salmon, for example. Please check the note "Read / alignment order" in the manual:

https://salmon.readthedocs.io/en/latest/salmon.html#using-salmon

An alternative solution could be to allow dorado aligner to write alignment_summary.txt in an arbitrary path provided as a command line argument and BAM output sent to stdout, unsorted.

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