-
Notifications
You must be signed in to change notification settings - Fork 48
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
base: main
Are you sure you want to change the base?
Simplify output_name #476
Conversation
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? |
I use it only on script mode, the singularity image seems to work. |
@@ -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("+") |
There was a problem hiding this comment.
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 '+'?
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
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