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

Overload #6

Merged
merged 18 commits into from
Feb 3, 2022
Merged

Overload #6

merged 18 commits into from
Feb 3, 2022

Conversation

nickhsmith
Copy link

No description provided.

Copy link

@c-mertes c-mertes left a comment

Choose a reason for hiding this comment

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

It looks good. And it is definitely better now with the overloading.

Just one question on top: there is a lot of casting happening. Do we really want this? I would assume, if you pass a GRange object you want this back and if you pass on a data.table you want the same object back.

Comment on lines 69 to 78
#' @examples
#' \dontrun{
#' BiocManager::install("MafDb.gnomAD.r2.1.hs37d5")
#' file <- system.file("extdata", "allelic_counts_HG00187.csv", package = "tMAE", mustWork = TRUE)
#' maeCounts <- fread(file)
#' maeRes <- DESeq4MAE(maeCounts)
#' genome_assembly <- 'hg19'
#' res <- add_gnomAD_AF(maeRes, genome_assembly = genome_assembly, pop="AF")
#' }
#'
Copy link

Choose a reason for hiding this comment

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

I would keep the documentation all together when setting the genetic function. In addition, you rather use the exome data and run the example. This way we make sure the examples work.

gr <- GRanges(seqnames = object$contig,
ranges = IRanges(start=object$position, width=1),
strand = '*')
# score the gr
Copy link

Choose a reason for hiding this comment

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

rather call here add_gnomad_AF with your GRange object. This way you have the same logic for all input data and don't duplicate code.

@nickhsmith nickhsmith merged commit be312c5 into master Feb 3, 2022
@nickhsmith nickhsmith deleted the overload branch February 3, 2022 12:09
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