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

Get pseudobulk api #137

Merged
merged 25 commits into from
May 20, 2024
Merged

Conversation

myushen
Copy link
Contributor

@myushen myushen commented Apr 16, 2024

solve issue #136
get_pseudobulk API takes pre-calculated summarized experiment assays for selected sample IDs, combines them and returns a merged summarized experiment. The pre-calculated summarized experiment assays will be stored in a cloud container in the future.

Copy link
Collaborator

@multimeric multimeric left a comment

Choose a reason for hiding this comment

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

Note also that SingleCellExperiment is a subclass of SummarisedExperiment, so if it's possible to write code that works on a SummarisedExperiment, then it will automatically work on both. This can help you simplify code and also documentation.

R/counts.R Outdated Show resolved Hide resolved
R/counts.R Outdated Show resolved Hide resolved
R/counts.R Outdated Show resolved Hide resolved
@stemangiola
Copy link
Owner

I did not export fibrosis pseudobulk yet, @myushen did you test with fibrosis?

@myushen
Copy link
Contributor Author

myushen commented Apr 28, 2024

I did not export fibrosis pseudobulk yet, @myushen did you test with fibrosis?

No, it is only based on cellxgene.

@multimeric
Copy link
Collaborator

I'm still concerned that group_to_sme is a near-exact copy of group_to_sce and the same for get_pseudobulk and get_single_cell_experiment. I see little reason why you can't consolidate these pairs of functions into one function, considering that you are working with a SummarizedExperiment in both cases.

@myushen
Copy link
Contributor Author

myushen commented Apr 29, 2024

I'm still concerned that group_to_sme is a near-exact copy of group_to_sce and the same for get_pseudobulk and get_single_cell_experiment. I see little reason why you can't consolidate these pairs of functions into one function, considering that you are working with a SummarizedExperiment in both cases.

I'll wrap up into one function, but do we want to separate function names for get_sce and get_pseudobulk? @stemangiola

@stemangiola
Copy link
Owner

stemangiola commented Apr 30, 2024

I'm still concerned that group_to_sme is a near-exact copy of group_to_sce and the same for get_pseudobulk and get_single_cell_experiment. I see little reason why you can't consolidate these pairs of functions into one function, considering that you are working with a SummarizedExperiment in both cases.

I'll wrap up into one function, but do we want to separate function names for get_sce and get_pseudobulk? @stemangiola

Are we asking here if

get_single_cell_experiment and get_pseudobulk should be the same function.

If this is the question I think that is beneficial keeping them separate, from the user perspective. What happens in the backend is another story. In my code I have a lot of utility backend function, that are called in different flavours in the front end, and the user will never know that two different methods, come from a generic function underneath.

myushen and others added 10 commits May 1, 2024 10:40
commit 7000b1f
Merge: 9be13af d1e3d81
Author: Stefano Mangiola <[email protected]>
Date:   Wed May 1 09:55:55 2024 +0930

    Merge pull request stemangiola#139 from myushen/master

    update testthat

commit d1e3d81
Merge: 969198f 02a985e
Author: Mengyuan Shen <[email protected]>
Date:   Mon Apr 29 15:03:33 2024 +1000

    Merge branch 'master' of https://github.com/myushen/CuratedAtlasQueryR

commit 969198f
Author: Mengyuan Shen <[email protected]>
Date:   Mon Apr 29 15:03:02 2024 +1000

    a test query for import API

commit 02a985e
Merge: 9f5cc9b 9be13af
Author: Mengyuan Shen <[email protected]>
Date:   Mon Apr 29 11:12:16 2024 +1000

    Merge branch 'stemangiola:master' into master

commit 9f5cc9b
Author: Mengyuan Shen <[email protected]>
Date:   Mon Apr 29 11:11:24 2024 +1000

    update testthat for consistency reason

commit 9be13af
Merge: fe980d6 05065f2
Author: Stefano Mangiola <[email protected]>
Date:   Fri Apr 26 11:28:21 2024 +0930

    Merge pull request stemangiola#138 from myushen/master

    fix parquet pattern

commit 05065f2
Merge: 9b7f47d fe980d6
Author: Mengyuan Shen <[email protected]>
Date:   Wed Apr 24 15:10:33 2024 +1000

    Merge branch 'master' of https://github.com/myushen/CuratedAtlasQueryR

commit 9b7f47d
Author: Mengyuan Shen <[email protected]>
Date:   Wed Apr 24 15:05:01 2024 +1000

    fix parquet pattern issue

commit fe980d6
Author: stemangiola <[email protected]>
Date:   Tue Apr 23 10:10:33 2024 +1000

    add make_pseudobulk

commit 9dace73
Merge: 27580bc 5484756
Author: stemangiola <[email protected]>
Date:   Tue Apr 23 10:06:51 2024 +1000

    fic conflicts pull

    Merge branch 'master' of github.com:stemangiola/HCAquery

    Conflicts:
    	DESCRIPTION

commit 27580bc
Author: stemangiola <[email protected]>
Date:   Tue Apr 23 10:04:40 2024 +1000

    add pseudobulk calculation and update scripts

commit 5484756
Merge: 2e9d487 f672472
Author: Mangiola Laboratory <[email protected]>
Date:   Tue Mar 26 16:49:41 2024 +1100

    Merge pull request stemangiola#135 from myushen/export-cache-functions

    import api

commit 2e9d487
Merge: b80627b b6ee0b2
Author: Mangiola Laboratory <[email protected]>
Date:   Tue Mar 26 13:56:35 2024 +1100

    Merge pull request stemangiola#134 from myushen/export-cache-functions

    import api

commit cc6ebd8
Merge: 83022ab 1ddec5e
Author: Mengyuan Shen <[email protected]>
Date:   Wed Mar 20 10:19:53 2024 +1100

    Merge branch 'import-api'

commit 83022ab
Author: Mengyuan Shen <[email protected]>
Date:   Mon Feb 26 14:59:36 2024 +1100

    fix vignettes

commit 34f4d37
Author: Mengyuan Shen <[email protected]>
Date:   Mon Feb 26 14:58:14 2024 +1100

    generate metadata from local cache
commit 84e6f94
Author: Mengyuan Shen <[email protected]>
Date:   Mon May 6 14:52:09 2024 +1000

    allow selected gene names in pseudobulk

commit 8c0b8dc
Author: Mengyuan Shen <[email protected]>
Date:   Fri May 3 16:15:08 2024 +1000

    adapt metadata sample-level columns to pseudobulk
@myushen myushen requested a review from multimeric May 7, 2024 00:44
Copy link
Collaborator

@multimeric multimeric left a comment

Choose a reason for hiding this comment

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

Needs a test for the get_pseudobulk workflow.

Also this isn't a blocker, but I'd like to see some of the assay-specific logic (if (type == "sce")) moved into the calling function like get_single_cell_experiment, so that get_summarized_experiment remains decoupled from the subclass we're dealing with.

R/counts.R Outdated Show resolved Hide resolved
R/counts.R Outdated Show resolved Hide resolved
R/counts.R Outdated Show resolved Hide resolved
R/counts.R Outdated Show resolved Hide resolved
@stemangiola
Copy link
Owner

stemangiola commented May 16, 2024

Needs a test for the get_pseudobulk workflow.

Also this isn't a blocker, but I'd like to see some of the assay-specific logic (if (type == "sce")) moved into the calling function like get_single_cell_experiment, so that get_summarized_experiment remains decoupled from the subclass we're dealing with.

Thanks. Maybe @myushen do the tests, and we tackle the second point from @multimeric in the future (we can convert it to github issue for now). We need to proceed, with other tasks.

@stemangiola stemangiola merged commit 73c274a into stemangiola:master May 20, 2024
3 of 4 checks passed
@stemangiola
Copy link
Owner

Great team work fellas!

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