Thank you for developing this tool, I’ve really enjoyed it so far. I’m encountering an issue with waafle_junctions when I try to use the --sam flag. I have .sam files already generated using bowtie2. Please see the attached image for my command and error.
The function runs perfectly if I use --reads1 and --reads2 with their respective files. Appreciate any input you may have!
Did you generate the SAM files with WAAFLE or independently? *s in SAM files correspond to missing statistics for unaligned reads. When WAAFLE runs bowtie2 internally it doesn’t report unaligned reads, hence we probably didn’t write the code to be robust to that possibility. You can see the command we’re using for bowtie2 here for comparison:
Thank you for your prompt response! I generated the SAM files independently and did not use the --no-mixed or --no-discordant flags, so that explains the error. I’m wondering if I’d be able to tell WAAFLE to use the bowtie2 index I already have so it doesn’t have to generate a new index? I’m trying to minimize repeat files although it’s definitely not a big deal in the grand scheme of things.
It looks like I used a very vanilla index command, so assuming you did the same they should be compatible. If you run the script with --resume and the index matches WAAFLE’s expected naming ($BASENAME.index as the root), the WAAFLE will pick up and use the existing index.
Another option would be to filter just the usable rows from the existing SAMs you made based on their SAM flag. Maybe something like this?
That should select alignment rows where the second bit (i.e. “each segment is properly aligned”) is true. I’m not 100% sure on the syntax there, so I would double check that the output.sam looks right before proceeding.