2
$\begingroup$

When parsing NCBI BLAST+ segmasker output, I realized the program modifies almost every header containing these strings: ( or ) for no (known to me) reason.

In the majority of the strings mentioned above, the whitespace is removed:

  • input file:
    >tr|Q9UXV4|Q9UXV4_PYRAB Pyruvate formate-lyase activating enzyme ( act-1) OS=Pyrococcus abyssi (strain GE5 / Orsay) OX=272844 GN=act-1 PE=4 SV=1,
    output file:
    >tr|Q9UXV4|Q9UXV4_PYRAB Pyruvate formate-lyase activating enzyme (act-1) OS=Pyrococcus abyssi (strain GE5 / Orsay) OX=272844 GN=act-1 PE=4 SV=1,
  • input file:
    >tr|A0A5K1JWI6|A0A5K1JWI6_9APHY Cysteine protease ATG4 ) OS=Ganoderma boninense OX=34458 GN=Q523C3 PE=4 SV=1,
    output file:
    >tr|A0A5K1JWI6|A0A5K1JWI6_9APHY Cysteine protease ATG4) OS=Ganoderma boninense OX=34458 GN=Q523C3 PE=4 SV=1.

It isn't a significant change, but it complicates searching for headers in the output file.

However, the program is not consistent - if there is a comma (,) before the ) string, the whitespace is not removed:

  • input file:
    >tr|A0A3M9YA12|A0A3M9YA12_9PEZI Myeloid lymphoid or mixed-lineage leukemia 5 (Trithorax, ) OS=Verticillium nonalfalfae OX=1051616 GN=MLL5 PE=4 SV=1,
    output file:
    >tr|A0A3M9YA12|A0A3M9YA12_9PEZI Myeloid lymphoid or mixed-lineage leukemia 5 (Trithorax, ) OS=Verticillium nonalfalfae OX=1051616 GN=MLL5 PE=4 SV=1.

What's the reason for such a behaviour?
Is there any option to prevent it and keep headers unchanged?


edit.
The whitespace is also removed for:

  • ,
  • ,,.

Moreover, it removes a semicolon when it is at the end of a header:
>ABCD/1-4 ABCD;ABCD;>ABCD/1-4 ABCD;ABCD.

$\endgroup$
1
  • 1
    $\begingroup$ Weird... You could always run your input through something like sed 's/ *)/)/g; s/( */(/g' to remove the spaces yourself before using segmasker, but obviously that isn't ideal. $\endgroup$
    – terdon
    Nov 24, 2022 at 16:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.