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

Modify consensus module to output results at a sample level #114

Open
allyhawkins opened this issue Jan 16, 2025 · 0 comments
Open

Modify consensus module to output results at a sample level #114

allyhawkins opened this issue Jan 16, 2025 · 0 comments

Comments

@allyhawkins
Copy link
Member

Currently the module for assigning consensus cell types outputs results on a project level so that there is one TSV file per project containing all cells from all samples and associated cell type labels. We should update this module to output on a sample level and have one TSV per sample. To do this, we need to condense the workflow into a single process so that we grab the cell types for each library and assign consensus labels in a single script. Then we will need a second script that works within that process to combine tables when there is more than one library per sample.

One thing to note is that before we do this we might want to save the ontology ids and mapped ontology names for blueprint to a separate reference file so that we avoid having to do ontology name mapping prior to assigning consensus labels for each library. Specifically we should pull out this code and save the results and use the results as input to the script:

blueprint_ref <- celldex::BlueprintEncodeData()
# grab obo file, we need this to map the ontologies from blueprint
cl_ont <- ontologyIndex::get_ontology("http://purl.obolibrary.org/obo/cl/releases/2024-09-26/cl-basic.obo")
# get ontologies and human readable name into data frame for blueprint
# in scpca-nf we don't include the cl name so this lets us add it in
blueprint_df <- data.frame(
blueprint_ontology = blueprint_ref$label.ont,
blueprint_annotation_cl = cl_ont$name[blueprint_ref$label.ont]
) |>
unique() |>
tidyr::drop_na()

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

No branches or pull requests

1 participant