-
Notifications
You must be signed in to change notification settings - Fork 5
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 and extend input functionality #48
Conversation
directlfq/utils.py
Outdated
lfq_results_df = lfq_results_df[[x is not None for x in lfq_results_df[config.PROTEIN_ID]]] | ||
if len(all_columns) == 1: #if there are no columns to add, return the original dataframe |
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.
I see some discrepancy between the comment and the logic above:
columns_to_add + [protein_column_input_table] + standard_columns_for_input_type
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.
so both the columns to add (columns specified by the user) and the standard columns (columns added by default) can be empty lists. I now made the if statement more explicit.
if (len(columns_to_add) == 0) and (len(standard_columns_for_input_type)==0) : #if there are no columns to add and no additional standard columns defined return the original dataframe return lfq_results_df
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.
sounds good, I think you could even drop the comment then as the code reads almost as good as plain text ;-)
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.
yess
directlfq/dashboard_parts.py
Outdated
@@ -327,6 +327,8 @@ def run_pipeline(self, *args): | |||
file_of_proteins_for_normalization = None if self.protein_subset_for_normalization_file.value == '' else self.protein_subset_for_normalization_file.value | |||
num_cores = None if self.num_cores_vals.value == -1 else self.num_cores_vals.value | |||
yaml_filt_dict_path = None if self.yaml_filt_dict_path.value == '' else self.yaml_filt_dict_path.value | |||
if type(additional_headers) == str: #the user will enter a string with semicolon separated values |
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.
can this be any other type?
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.
any user input will be converted to a string. If there is no user input, there will be None
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.
so this could be if additional_headers is not None:
?
thx! |
Bug fix: Resolved issue with additional columns
Extended input functionality: