diamond icon indicating copy to clipboard operation
diamond copied to clipboard

Query length in SAM output

Open vkkodali opened this issue 1 year ago • 4 comments

I would like to reconstruct the alignment directly from the SAM output produced by diamond blastp. To determine the length of the unaligned region on the C-terminus of the query, I need the length of the query sequence. Can this be included in the SAM output as a tag? Currently, the ZL:i: tag is used to provide the length of the reference sequence. Perhaps, in a similar tag, the length of the query can also be provided?

vkkodali avatar Jun 09 '23 12:06 vkkodali

Sure, I will include this in the next release.

bbuchfink avatar Jun 17 '23 13:06 bbuchfink

Thank you very much!

vkkodali avatar Jun 20 '23 16:06 vkkodali

@bbuchfink -- I just noticed the new option --sam-query-len in the latest version of diamond. Thank you! The use of ZQ:<query_len> however does not conform to the SAM spec of using TAG:TYPE:VALUE for tags. I think it should be changed to ZQ:i:<query_len>

vkkodali avatar Jun 26 '23 11:06 vkkodali

You're right sorry, will fix in the next release.

bbuchfink avatar Jul 12 '23 13:07 bbuchfink