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

question about Chapter16.4 Pseudobulk making code #339

Open
dfc-1931475 opened this issue Feb 19, 2025 · 1 comment
Open

question about Chapter16.4 Pseudobulk making code #339

dfc-1931475 opened this issue Feb 19, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@dfc-1931475
Copy link

*Question
Could it be better to exchange the executing order between the following 2?

  1. df_donor = df_donor.groupby(donor_key).agg(agg_dict)
  2. df_donor[donor_key] = donor

These 2 commands are in "aggregate_and_filter" function**(Chapter16.4)** to make the pseudobulk data for certain cell_indentity per sample

I found if the obs_to_keep parameter was set to None. The program will crashed because there isn't a column named donor_key available in the df_donor, so that running df_donor = df_donor.groupby(donor_key).agg(agg_dict) will arise an error.

Since the donor_key will always be the same in each round of the df_donor, why not to run df_donor[donor_key] = donor first? even the obs_to_keep is None, the function will still be smooth.

@dfc-1931475 dfc-1931475 added the question Further information is requested label Feb 19, 2025
@Zethson
Copy link
Member

Zethson commented Feb 19, 2025

Thank you! We'll keep it in mind for our next big iterations in 2025. Please keep the feedback coming.

@Zethson Zethson added bug Something isn't working and removed question Further information is requested labels Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants