Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix residues #82

Closed
wants to merge 8 commits into from
Closed

Fix residues #82

wants to merge 8 commits into from

Conversation

sunal1996
Copy link
Collaborator

At the moment, TIMED predicts all the residues for a given protein. However, it appears that there is a demand for being able to fix some residues on a given protein, such as here:

#78

This PR enables the user to:

a) Fix residues on specified chains, on multiple structures to the WT aminoacids. When this is done, everything except the specified residues on specified chains will be PREDICTED BY TIMED.

b) Predict residues on specified chains. When this is used, everything except the specified residues on specified chains will be KEPT THE SAME AS WT.

There is a need for improvement though. For example, we can customize the fixing of residues even further by feeding some sort of a csv file, first column being the pdb name and second column being the residue numbers. As it is, the feature assumes that we always want to fix the same residues in all proteins in a given folder. However, this is rarely the case.Still, the path for achieving this seems clear to me, and can be implemented easily.

@universvm
Copy link
Member

As mentioned in private chat, we should use:

def get_residue_ids(protein_structure: ampal.Polypeptide) -> t.List[str]:
    """Returns a list of residue IDs from an AMPAL structure."""
    return [residue.id for residue in protein_structure.get_monomers()]

and then used as:

residue_ids = get_residue_ids(selected_structure)
# Check where the start and end positions are in the residue ids
start_position = residue_ids.index(start_position)

NB: This should be run on each chain but the function is for a polypeptide.

@sunal1996 sunal1996 closed this May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants