Entering edit mode
3.5 years ago
francois
▴
80
For example, the first alignment in my SAM file currently looks like
08b20551-b31c-4170-a04c-40a34ee8b71f 0 chr20 4699371 60 272H123M637H * 0 0 CCTCAGGGCGGTGGTGGCTGGGGGCAGCCTCATGGTGGTGGCTGGGGGCAGCCTCATGGTGGTGGCTGGGGGCAGCCCCATGGTGGTGGCTGGGGACAGCCTCATGGTGGTGGCTGGGGTCAA &'$'()+2220/,+.203:=?65<?BDDCF:B@>69;AF?FLA=?CB>=83/0-@@?=>@A52.;AA@CGA45=DFHG@?A?;<9A:A>=:=8<=@=B56B:@@BCHFHG?4@<::=98=:79 ms:i:1920 AS:i:1920 nn:i:0 tp:A:P cm:i:158 s1:i:929 s2:i:0 de:f:0.0148 rl:i:0 HP:i:2 PC:i:30 PS:i:4688888
I would like to delete the MAPQ (aka qual) component. Expected:
08b20551-b31c-4170-a04c-40a34ee8b71f 0 chr20 4699371 60 272H123M637H * 0 0 CCTCAGGGCGGTGGTGGCTGGGGGCAGCCTCATGGTGGTGGCTGGGGGCAGCCTCATGGTGGTGGCTGGGGGCAGCCCCATGGTGGTGGCTGGGGACAGCCTCATGGTGGTGGCTGGGGTCAA ms:i:1920 AS:i:1920 nn:i:0 tp:A:P cm:i:158 s1:i:929 s2:i:0 de:f:0.0148 rl:i:0 HP:i:2 PC:i:30 PS:i:4688888
How may I do this?
You will break SAM format if you do that. Why not ignore it if you are not interested in it? Or did you mean to replace the current value?
Ah, I see. A batch of my samples has
*
for the MAPQ field, but this file has the full MAPQ info. I need to have the formats to match for downstream analysis.So yes, replacing with
*
would work. Even better, actually.How can I do that?
You have
60
in your example above for MAPQ field number 5.*
is forRNEXT
field.See SAM format spec.