Open AlexWeinreb opened 2 years ago
Hi @AlexWeinreb, thanks for the feedback (and for using Megadepth).
You are correct in both points.
I went back and looked at what I'm doing and it's reasonable to think I could read the XS tag if present, for --all-junctions
.
I would then set the current strand column in the tsv output of process_jx_output.sh
to be what the XS tag reports translated to STAR's format for strand, as I want to avoid adding another column in the output to keep compatibility with STAR's junction format.
If that's acceptable, I'll see about when I can get this done and post back.
Chris
Yes, it makes perfect sense.
For the additional column, I meant in the tsv output of --all-junctions
, the file that can then be fed to process_jx_output.sh
. IIRC it's only the output of that last script, the .sjout
file, that has to follow STAR's format. My reasoning was that if someone is already relying on the content of column 5 of the intermediary file, that wouldn't break. But in practice I have no idea if this "mapping strand" is useful to anyone.
In any case, that would be great!
Hi @AlexWeinreb I've created a minor pre-release which should now support the XS:A tag in BAM files if present. Please give it a try out and let me know if it works (or not) for you: https://github.com/ChristopherWilks/megadepth/releases/tag/1.1.2
Thanks, Chris
@AlexWeinreb I just made a minor adjustment to the 1.1.2 prerelease with support for the XS:A tag, it's now: https://github.com/ChristopherWilks/megadepth/releases/tag/1.1.2a
From the code,
process_jx_output.sh
always outputs only0
in the strand column. I imagine it's because themegadepth --all-junctions
column 5 only gives the mapping strand, which would be incorrect in some cases. But in many cases, the BAMs have an XS tag that indicates the correct strand.So, could it make sense for
megadepth --all-junctions
to add a column with the XS strand in the tsv, andprocess_jx_output.sh
to report that column in the sjout file?