-
Notifications
You must be signed in to change notification settings - Fork 0
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
add R scripts for clone density plot and histogram #143
base: main
Are you sure you want to change the base?
Conversation
…olutionVisualization into selinawu-add-clone-densityplot-R-script
…olutionVisualization into selinawu-add-clone-densityplot-R-script
if (scale) { | ||
density.df$y <- nrow(x) / sum(density.df$y) * density.df$y; | ||
} | ||
return(density.df) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semicolon after the return statement.
if (nrow(x) <= 1) { | ||
return(NULL); | ||
} | ||
density <- density(x = x[[value]], bw = 'nrd', na.rm = TRUE, ...); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the reusable wrapper function around the built-in here.
clone.colours <- get.colours(x$clone.id, return.names = TRUE); | ||
} | ||
|
||
# calculate mean CCF and nsnv per cluster ----------------------------------------------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably don't need these comments.
); | ||
|
||
combn.plt <- hist + scatter; | ||
return(BoutrosLab.plotting.general::write.plot( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just double-checking. Are we returning the results of write.plot
in the rest of the package, or just returning the BPG object (so here, returning scatter
).
Description
Pushed the scripts I used for plotting clone density plots and clustered SNVs histograms
If we decide to use these, they need to be standardized (e.g. column names from SRC tool's results data table) and integrated.
Checklist
This PR does NOT contain Protected Health Information (PHI). A repo may need to be deleted if such data is uploaded.
Disclosing PHI is a major problem1 - Even a small leak can be costly2.
This PR does NOT contain germline genetic data3, RNA-Seq, DNA methylation, microbiome or other molecular data4.
.png
, .jpeg
),.pdf
,.RData
,.xlsx
,.doc
,.ppt
, or other output files.To automatically exclude such files using a .gitignore file, see here for example.
I have read the code review guidelines and the code review best practice on GitHub check-list.
I have set up or verified the
main
branch protection rule following the github standards before opening this pull request.The name of the branch is meaningful and well formatted following the standards, using [AD_username (or 5 letters of AD if AD is too long)]-[brief_description_of_branch].
I have added the major changes included in this pull request to the
CHANGELOG.md
under the next release version or unreleased, and updated the date.Footnotes
UCLA Health reaches $7.5m settlement over 2015 breach of 4.5m patient records ↩
The average healthcare data breach costs $2.2 million, despite the majority of breaches releasing fewer than 500 records. ↩
Genetic information is considered PHI.
Forensic assays can identify patients with as few as 21 SNPs ↩
RNA-Seq, DNA methylation, microbiome, or other molecular data can be used to predict genotypes (PHI) and reveal a patient's identity. ↩