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

Simplify output_name #476

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Simplify output_name #476

wants to merge 1 commit into from

Conversation

Qrouger
Copy link
Contributor

@Qrouger Qrouger commented Jan 8, 2025

Input File :
P09783,3;P0A3W6,3;P0A3W4

Old name output :
P09783_and_P09783_and_P09783_and_P0A3W6_and_P0A3W6_and_P0A3W6_and_P0A3W4

New name output :
P09783_homo_3er_and_P0A3W6_homo_3er_and_P0A3W4

@jkosinski
Copy link
Collaborator

Thanks again! A shorter naming convention would be useful. Did you check whether the analysis pipeline still works with these names? Also, are you using the script mode or snakemake pipeline?

@Qrouger
Copy link
Contributor Author

Qrouger commented Jan 8, 2025

I use it only on script mode, the singularity image seems to work.
predictions_with_good_interpae.csv

@@ -479,11 +480,23 @@ def build_description_monomer_mapping(self):

def create_output_name(self):
"""a method to create output name"""
list_oligo = self.input[0].split("+")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would this work if is the delimiter is other than '+'?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Between differents proteins, delimiter is always "+", if there is no "+" in self.input[0] so list_oligo will look like [P13979] (monomer) or [P13979:2] (dimere)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I mean we can choose a delimiter when run structure predictions. The '+' symbol is the default one, but it can be set to any other character:
https://github.com/KosinskiLab/AlphaPulldown/blob/main/alphapulldown/scripts/run_structure_prediction.py#L153
Therefore we have to pass the delimiter flag as well, otherwise it will not work for any custom delimiters other than '+'.
Then the code would look like:
list_oligo = self.input[0].split(self.delimiter)
and we need to pass this delimiter beforehand e.g.
object_to_model = MultimericObject( interactors=interactors, delimiter=delimiter, ...
On the other hand, maybe it makes more sense to move all this logic from objects.py to modelling_setup.py and keep MultimericObject logic as simple as possible (given it's already far from being simple)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, sorry I don't know delimiter flag exist. Yes that make more sense to add this at modelling_setup.py.

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.

3 participants