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

Use column in data table for grouping when column name is passed as string to group_var #31

Open
marcora opened this issue Nov 8, 2021 · 2 comments
Assignees

Comments

@marcora
Copy link

marcora commented Nov 8, 2021

It would be nice if I could specify a column name as grouping variable instead of supplying it as a vector.

For example:

pcr_analyze(ct1,
group_var = 'tissue',
reference_gene = 'GAPDH',
reference_group = 'brain',
method = 'delta_delta_ct')

would use values in the 'tissue' column as grouping variable.

Same approach could be used for specifying covariates for lm, if covariate (or target_gene) column name(s) could be specified rather than implying all columns correspond to genes.

@MahShaaban MahShaaban self-assigned this Nov 8, 2021
@MahShaaban
Copy link
Owner

The problem with this approach is that the user would have to also specify the column names for the genes of interest. I chose early on to make the main input data.frame to be only the Ct values to simplify things.

@marcora
Copy link
Author

marcora commented Nov 19, 2021

The column names for the genes of interest can be automatically generated by subtracting the columns specified in the "reference_gene" and "group_var" parameter (and an additional "covars" parameter listing, as a string or string vector, column name(s) for covariate(s)). No need for the user to list the names of all "genes of interest" columns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants