Skip to content

initial commit of dreamlet function#19

Open
erflynn wants to merge 5 commits into
sc-dge-functionsfrom
ef/sc-dge-dreamlet
Open

initial commit of dreamlet function#19
erflynn wants to merge 5 commits into
sc-dge-functionsfrom
ef/sc-dge-dreamlet

Conversation

@erflynn

@erflynn erflynn commented Jan 6, 2026

Copy link
Copy Markdown

Initial attempt to set up dreamlet wrapper. Takes as input a pseudobulked count matrix and metadata.
I tried to follow conventions from Dan's examples where possible.
To do items:

  • add info about the default processAssays() behavior (which also filters based on min.cells)
  • add back in the dreamlet run df
  • update function to take ... and/or additional specific params to pass to dreamlet
  • add additional documentation (@dtm2451 I'm not sure what you generate the .txt file with?)
  • add example usage
  • additional testing

@dtm2451

dtm2451 commented Jan 6, 2026

Copy link
Copy Markdown
Collaborator

I make the txt file with document::document(), and the call was: document::document('single_cell/pseudobulk_function.R', output_directory = 'single_cell/', check_package = FALSE).

@erflynn

erflynn commented May 8, 2026

Copy link
Copy Markdown
Author

Added some updates to the input check functions as well as updated dreamlet (apologies, this should probably be two separate PRs but I wanted to do both)

Some notes to discuss:

  • nomenclature:

    • contrast --> contrasts
    • do we want cell_type or celltype?
    • add gene name to the output table (I dont like having as rownames)
  • when to do input checks?

    • for contrasts, this is easier at the model stage, so I did it here but maybe we should do earlier?
    • for within cells -- a lot of this waits until the .input_check function is first called in the cells group, is this ok?
    • I added .input_check_dge_case_ref() since it's needed for within cells and also the general one
  • what should we do about NA values in dge_by (or other) columns?

  • what to do with numeric values as dge_by? currently we get a warning they will be set to factor, but we may not want to do this (unless case_group and reference_group are 0 and 1 or something)

  • do we want to use MIN.COUNT (minimum number of counts required per sample when calculating whether a gene should be retained (default = 5)) more generally? Needed for dreamlet

  • where to put additional small helper functions?

@erflynn erflynn requested review from dtm2451 and ravipatel4 May 8, 2026 14:29
@dtm2451

dtm2451 commented May 8, 2026

Copy link
Copy Markdown
Collaborator
  • nomenclature:

    • contrast --> contrasts

I think I like the plural form better! Because the functionality it offers is for grabbing results from multiple directions -- like if you are only looking at one comparison (one contrast) you might as well just use case_group and ref_group inputs.

  • do we want cell_type or celltype?

Seems like we decided on celltype previously, here

  • add gene name to the output table (I dont like having as rownames)

I definitely agree about this. @ravipatel4? We should add it to the same list this list of column names if so!

@dtm2451

dtm2451 commented May 8, 2026

Copy link
Copy Markdown
Collaborator
  • when to do input checks?

    • for contrasts, this is easier at the model stage, so I did it here but maybe we should do earlier?
    • for within cells -- a lot of this waits until the .input_check function is first called in the cells group, is this ok?
    • I added .input_check_dge_case_ref() since it's needed for within cells and also the general one
  • what should we do about NA values in dge_by (or other) columns?

  • what to do with numeric values as dge_by? currently we get a warning they will be set to factor, but we may not want to do this (unless case_group and reference_group are 0 and 1 or something)

  • do we want to use MIN.COUNT (minimum number of counts required per sample when calculating whether a gene should be retained (default = 5)) more generally? Needed for dreamlet

The rest of these questions I don't feel as comfy just saying my piece and us treating that as the call, so maybe we should, as you suggested live already, try and have another "dge-working-group" meeting soon to decide!

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