-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* master: (30 commits) increase visualTest threshold pass other r check arg pass r check arg fix link to dendrogram New mrkHClust function to plot a dendrogram of subcellular markers unit test for knntl logging and none private ThetaRegRes nologging function Parametrise logging in knntlOptimisation to reduce object size add plot3D fig remove using animate set visualTest threshold for different hosts fix link to coc code of conduct depend on MangoTheCat/visualTest suggest rmarkdown rmarkdown pack in travis add travis file remove unexported fun's rd fix testing errors fix rd warnings ... From: Laurent <lg390@cam.ac.uk> git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/pRoloc@120773 bc3139a8-67e5-0310-9ffc-ced21a209358
- Loading branch information
Laurent Gatto
committed
Sep 6, 2016
1 parent
b95ac24
commit 3c0892f
Showing
30 changed files
with
1,412 additions
and
889 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ vignettes/figure/ | |
README.md | ||
vignettes/pRoloc-tutorial.pdf | ||
sandbox | ||
.travis.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
language: r | ||
r: bioc-devel | ||
cache: packages | ||
sudo: true | ||
|
||
before_install: | ||
- tlmgr install bera nowidow parnotes marginfix etoolbox titlesec sectsty framed enumitem parskip soul placeins footmisc changepage xstring caption mathtools | ||
|
||
apt_packages: | ||
- libnetcdf-dev | ||
- texlive-full | ||
|
||
r_packages: | ||
- covr | ||
|
||
r_github_packages: | ||
- MangoTheCat/visualTest | ||
|
||
r_check_args: | ||
--no-vignettes | ||
--no-build-vignettes | ||
|
||
after_success: | ||
- Rscript -e 'covr::codecov()' | ||
|
||
# print timings (of examples) and sysinfo | ||
after_script: | ||
- dump_logs_by_extension "timings" | ||
- dump_sysinfo | ||
|
||
notifications: | ||
email: | ||
on_success: lg390@cam.ac.uk | ||
on_failure: lg390@cam.ac.uk | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Contributor Code of Conduct | ||
|
||
As contributors and maintainers of this project, we pledge to respect | ||
all people who contribute through reporting issues, posting feature | ||
requests, updating documentation, submitting pull requests or patches, | ||
and other activities. | ||
|
||
We are committed to making participation in this project a | ||
harassment-free experience for everyone, regardless of level of | ||
experience, gender, gender identity and expression, sexual | ||
orientation, disability, personal appearance, body size, race, | ||
ethnicity, age, or religion. | ||
|
||
Examples of unacceptable behavior by participants include the use of | ||
sexual language or imagery, derogatory comments or personal attacks, | ||
trolling, public or private harassment, insults, or other | ||
unprofessional conduct. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, | ||
or reject comments, commits, code, wiki edits, issues, and other | ||
contributions that are not aligned to this Code of Conduct. Project | ||
maintainers who do not follow the Code of Conduct may be removed from | ||
the project team. | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior | ||
may be reported by opening an issue or contacting one or more of the | ||
project maintainers. | ||
|
||
This Code of Conduct is adapted from the Contributor Covenant, version | ||
1.0.0, available from http://contributor-covenant.org/version/1/0/0/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
##' This functions calculates an average protein profile for each | ||
##' marker class (proteins of unknown localisation are ignored) and | ||
##' then generates a dendrogram representing the relation between | ||
##' marker classes. The colours used for the dendrogram labels are | ||
##' taken from the default colours (see \code{\link{getStockcol}}) so | ||
##' as to match the colours with other spatial proteomics | ||
##' visualisations such as \code{\link{plot2D}}. | ||
##' | ||
##' @title Draw a dendrogram of subcellular clusters | ||
##' @param object An instance of class \code{MSnSet}. | ||
##' @param fcol Feature meta-data label (fData column name) defining | ||
##' the groups to be differentiated using different | ||
##' colours. Default is \code{markers}. | ||
##' @param distargs A \code{list} of arguments to be passed to the | ||
##' \code{\link[stats]{dist}} function. | ||
##' @param hclustargs A \code{list} of arguments to be passed to the | ||
##' \code{\link[stats]{hclust}} function. | ||
##' @param plot A \code{logical} defining whether the dendrogram | ||
##' should be plotted. Default is \code{TRUE}. | ||
##' @param ... Additional parameters passed when plotting the | ||
##' \code{\link[stats]{dendrogram}}. | ||
##' @return Invisibly returns a matrix of average occupancy profiles | ||
##' for all marker classes defined in \code{fcol}. | ||
##' @author Laurent Gatto | ||
##' @examples | ||
##' library("pRolocdata") | ||
##' data(dunkley2006) | ||
##' mrkHClust(dunkley2006) | ||
mrkHClust <- function(object, fcol = "markers", | ||
distargs, hclustargs, | ||
plot = TRUE, | ||
...) { | ||
object <- markerMSnSet(object) | ||
mm <- getMarkers(object, fcol = fcol, verbose = FALSE) | ||
umm <- levels(factor(mm)) | ||
fmat <- matrix(NA, nrow = length(umm), ncol = ncol(object)) | ||
rownames(fmat) <- umm | ||
colnames(fmat) <- sampleNames(object) | ||
for (m in umm) | ||
fmat[m, ] <- colMeans(exprs(object[mm == m, ]), na.rm = TRUE) | ||
## handling additional dist args | ||
if (missing(distargs)) distargs <- list(x = fmat) | ||
else distargs <- c(list(x = fmat), distargs) | ||
d <- do.call(dist, distargs) | ||
## handling additional hclust args | ||
if (missing(hclustargs)) hclustargs <- list(d = d) | ||
else hclustargs <- c(list(d = d), hclustargs) | ||
hc <- do.call(hclust, hclustargs) | ||
hc <- as.dendrogram(hc) | ||
i <- match(labels(hc), umm) | ||
hc <- set(hc, "labels_colors", getStockcol()[i]) | ||
if (plot) plot(hc, ...) | ||
invisible(fmat) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.