Closed jsgounot closed 5 months ago
Hi JS,
You are correct that the output is not a bam file. Currently Mora just outputs a very generic txt file that says which reference each read is assigned to. This output file path is specified via the -o tag. We don't have a method that outputs a BAM/SAM file, but it can be done since we would simply use the input BAM/SAM file and only keep the lines that correspond to our final assignments while changing their flags. Since Mora's output only says which unique reference it assigns the read to or if it cannot be assigned, the only part of the flags that changes is that all reads that were assigned are primary alignments while the rest are unmapped. I am not sure if this would be what you want.
I am currently occupied by another project, so I probably won't be able to add this feature in the near future, but I think it shouldn't be too hard to write a script in any language that can read/write BAM/SAM files that does what I explained in the previous paragraph.
Hi Andrew,
yes, it's not that hard but I was hoping you already have that in your toolbelt. There is one small thing though, it's that reads can be multi mapped within the same genome, so not everything has to be primary.
Thanks anyway and good luck for your next project, JS
Hi Andrew and Jim,
congrat on your paper. I wanted to try out Mora for one of my projects, I'm using directly the rust exec. I was wondering if by any chance you could implement an option
--new_bam
that would produce a new bam file, but with updated sam flags reflecting the reassignment. That would be great, so I can simply run a variant caller on top of it without having to edit the bamfile myself. Otherwise, if you have a script somewhere that would do it, I'd be happy to use it.I'm a bit confused because, in the log file, it says it's producing a mapping output file (that has the same path as my input file, this is a bit scary), but I don't think it's actually outputting a bamfile.
Have a nice day guys, JS