foldseek icon indicating copy to clipboard operation
foldseek copied to clipboard

Guidance for masking query protein structures

Open fteufel opened this issue 2 years ago • 2 comments

Hi,

I'm interested in finding matches for a local substructure. To prevent aligning to other domains and partial overlaps, I tried removing everything from the query structure that I'm not interested in, introducing chain breaks. Essentially reducing the protein to its core only.

I observe that I stop getting any hits if I use a structure that was trimmed down too aggressively - also missing hits that have great overlap with the region to which I trimmed down, which I recover well when using the full structure.

Are there general guidelines for doing this - should trimming structures be avoided altogether, or does a minimum number of residues need to be maintained to avoid alignment from failing?

Thanks!

fteufel avatar Sep 25 '22 18:09 fteufel

Removing unconserved parts of the structure should be no problem as long as these parts do not break the chain up, in other words, as long as the deletions are not sequence-wise within substructures you are interested in.Removing loops or inserted domains within your structure of interest can reduce sensitivity to target structures that also have loops or inserted domains of similar size at the corresponding positions, because in the alignment to such targets Fooldseek would have to align these loops/domains with gaps, which is costly. So, the rule I suggest is:

  • Removing parts of the structure that do not introduce chain breaks is unproblematic.
  • Remove parts of the structure within (sequence-wise) your substructure of interest only if you expect the resulting gap costs in the alignment to the targets to be lower than the cost for mismatches when aligning the removed parts.

soeding avatar Sep 26 '22 04:09 soeding

Also, it is often better to mask the 3Di sequence instead of trimming the structure by replacing all residues to be masked with X's (X is a state that matches itself with a score of 0). Here the advantage is that you do not alter the structural neighborhood when embedding it into 3Di.

martin-steinegger avatar Sep 26 '22 06:09 martin-steinegger

Hi!

Thanks for the great tool! I have a related question on masking.

How should the above mentioned masking be implemented in practice? Should one first foldseek createdb queryDB and then edit the queryDB_ss file by replacing the irrelevant residues with 'X's? I've tried that, but the results remain the same. I must be missing something. Maybe I should edit the queryDB file containing the amino acid sequences as well by introducing a similar mask?

Yegor13 avatar Feb 08 '23 22:02 Yegor13

We don't have a straightforward method to achieve this, so your suggestion, @Yegor13, is accurate. You can simply mask the queryDB and queryDB_ss by substituting the desired letter with an 'X'. Alternatively, you can also convert them to lowercase letters using the --mask-lower-case option.

martin-steinegger avatar Apr 26 '23 16:04 martin-steinegger