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

add fix for no specific label #18

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

Conversation

Jon-bioinfo
Copy link

if _select_one_most_specific has no prediction and appends '' in

CellO/cello/cello.py

Lines 738 to 743 in 7d37581

for exp in binary_results_df.index:
if exp in exp_to_select_pred_label:
da.append(exp_to_select_pred_label[exp])
else:
# There was no prediction for this experiment
da.append('')

that seems to break

ms_results_df['most_specific_cell_type'] = [
ou.cell_ontology().id_to_term[x].name
for x in ms_results_df['most_specific_cell_type']
]

so I add this check and give the label unknown.

@mbernste
Copy link
Member

Thank you very much for addressing this issue! My only hesitation with this fix is that theoretically there should be a prediction for every sample... I'm not sure what is breaking that would cause a given cell type to be labelled with an empty string. While this fix may be a quick patch, it does not fundamentally solve the issue. Do you happen to have a dataset on which this error occurs and I can dig into the underlying problem?

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