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

Reference gene names not used in calibration_factors #2

Open
iimog opened this issue Dec 3, 2024 · 1 comment
Open

Reference gene names not used in calibration_factors #2

iimog opened this issue Dec 3, 2024 · 1 comment

Comments

@iimog
Copy link

iimog commented Dec 3, 2024

Thanks for keeping easyqpcr alive. I recently stumbled over the issue, that even though I was passing the names of reference_genes to calibration_factors, other genes were actually used as reference. I tracked it down to the internal call to normalize_data where there is the hard-coded assumption, that the first columns contain the reference genes:

# Set the column position(s) of the reference gene(s),
# assuming they are the first genes in the data frame
, Refposcol = 1:length(reference_genes)

This assumption is not communicated in the documentation

#' @param reference_genes
#' Character vector with the name(s) of the reference gene(s)

The problem is, that this implementation does not produce errors, but rather works in an unexpected way.

I added this line to calibration_factors to actually get the reference genes positions and pass them to normalize_data:

# positions are shifted by -1 because the first column is dropped later
reference_genes_pos <- which(colnames(tmp_df) %in% reference_genes)-1
@dsrodriguezl
Copy link
Owner

Thanks for flagging this up, I probably just overlooked that when adapting the code of the original easyqpcr package into the new function. I will take a look at your suggestion and adapt it if I do not see any problem.

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

2 participants