henrikbengtsson / aroma.cn Goto Github PK
View Code? Open in Web Editor NEW๐ฌ R package: aroma.cn
Home Page: https://cran.r-project.org/package=aroma.cn
๐ฌ R package: aroma.cn
Home Page: https://cran.r-project.org/package=aroma.cn
From Writing R Extensions:
The mandatory 'Title' field should give a short description of the package. Some package listings may truncate the title to 65 characters. It should use title case (that is, use capitals for the principal words), not use any markup, not have any continuation lines, and not end in a period.
Replace nbrOfFiles()
calls with length()
calls for:
Drop README[.]md
from .Rbuildignore
such that the content of README.md is incorporated on the package page on METACRAN.
$ for pkg in $pkgs; do echo "$pkg:"; (cd "$pkg"; grep -E "^[ \t]*[^#].*[cr]bind" -- */*.R | grep -vF stringsAsFactors;); echo; read -r -p "Press ENTER to continue ..."; done
aroma.cn:
R/AromaUnitPscnBinarySet.doSegmentByPairedPSCBS.R: dataII <- cbind(dfT[,1:2], dfN[,1:2])
R/AromaUnitPscnBinarySet.doSegmentByPairedPSCBS.R: data <- cbind(dataA, dataII)
R/C1C2.R: rbind(c1c2, NA)
R/C1C2.R: c1c2 <- Reduce(rbind, c1c2TList)
R/C1C2.R: c1c2 <- cbind(c1c2, w=w)
R/NaiveFracBGenotyping.R: cs[isDiploid] <- rowMins(abs(cbind(beta[isDiploid]-a, beta[isDiploid]-b)))
R/PairedPSCBS.CALL2.R: df <- rbind(df, dfKK)
R/PairedPSCBS.CALL2.R: df <- rbind(df, dfKK)
R/PairedPSCBS.CALL2.R: segs <- cbind(segs, df)
R/PairedPSCBS.fitC1C2Peaks.R: dd <- cbind(pList$C1$density[idxs[,1]], pList$C2$density[idxs[,2]])
R/PairedPSCBS.fitC1C2Peaks.R: verbose && print(verbose, cbind(c1=c1, c2=c2, weights=w))
R/PairedPSCBS.NORM.R: res <- as.matrix(cbind(l=l, b=b, w=w, k=k))
R/PeaksAndValleys.EXTS.R: fitC <- cbind(fit, callId=NA_integer_, call=NA_real_)
R/PrincipalCurve.XTRAS.R: xy <- cbind(y, yN)
R/PruneCNA.PLOT.R: x <- cbind(x, length=x[,2]-x[,1])
R/segmentByPruneCBS.R: regions <- rbind(regions3, regions4)
R/segmentByPruneCBS.R: regions <- rbind(regions3, regions4)
Since package requires R (>= 3.x), we can now use anyNA()
instead of matrixStats::anyMissing()
.
In matrixStats (>= 0.50.0), which is now on CRAN, we introduced support for subsetted calculations that are optimized both for speed and memory usage. There are now new arguments idxs
, rows
and cols
for most functions which allows you to very easily make use of this.
For your package, I believe following functions could gain from this:
$aroma.cn$C1C2toAB
dxy <- colDiffs(xy[, 1:2])
by updating to something like:
$aroma.cn$C1C2toAB
dxy <- colDiffs(xy, cols=1:2)
and adding matrixStats (>= 0.50.0)
to your DESCRIPTION
file.
In order to full deprecate dsApplyInPairs()
and dsApply()
in R.filesets, we need to remove usage of dsApplyInPairs()
in aroma.cn.
The most likely way forward with this is to replace dsApplyInPairs()
with a futurized mapply()
function, i.e. a future.apply::future_mapply()
. Now, the latter does not exist yet, but is on the road map.
Make sure all regular expressions used for searching / setting up file sets have trailing $
. For instance, instead of:
pattern <- sprintf("%s.asb", typeTags);
res <- AromaUnitFracBCnBinarySet$byPath(outPath, pattern=pattern);
use
pattern <- sprintf("%s[.]asb$", typeTags);
res <- AromaUnitFracBCnBinarySet$byPath(outPath, pattern=pattern);
$ for pkg in $pkgs; do echo "$pkg:"; (cd "$pkg"; grep -E "^[ \t]*[^#].*data[.]frame" -- */*.R | grep -vF stringsAsFactors;); echo; read -r -p "Press ENTER to continue ..."; done
aroma.cn:
R/AromaUnitPscnBinarySet.doSegmentByPairedPSCBS.R: dataA <- Arguments$getInstanceOf(dataA, "data.frame")
R/calculatePairedPSCNByGenotype.R:setMethodS3("calculatePairedPSCNByGenotype", "data.frame", function(data, ...) {
R/CBS.findAtomicAberrations.R: res <- data.frame(
R/CopyNumberRegions.findAtomicAberrations.R: res <- data.frame(
R/fitLoessKD.matrix.R:setMethodS3("fitLoessKD", "data.frame", function(X, ...) {
R/fitLoessKD.matrix.R:setMethodS3("normalizeLoessKD", "data.frame", function(X, ...) {
R/fitLoessKD.matrix.R: XN <- as.data.frame(XN)
R/MultiSourceCopyNumberNormalization.R: Y <- as.data.frame(Y)
R/PairedPSCBS.CALL2.R: segs <- as.data.frame(fit)
R/PairedPSCBS.CALL2.R: data=list(betaTN=betaTN, muN=muN, segments=as.data.frame(fit)),
R/PairedPSCBS.CALL2.R: dfKK <- data.frame(
R/PairedPSCBS.CALL2.R: dfKK <- data.frame(
R/PairedPSCBS.findAtomicAberrations.R: res <- data.frame(
R/PairedPscbsModel.R: data <- data.frame(chromosome=cp$chromosome, x=cp$position,
R/PairedPSCBS.NORM.R: data=as.data.frame(fit),
R/RawAlleleBFractions.XTRAS.R: data <- data.frame(total=2, fracB=beta)
R/segmentByPruneCBS.R: regions <- as.data.frame(cnr)[,c("start","stop")]
R/segmentByPruneCBS.R: data <- as.data.frame(cnrT)
R/segmentByPruneCBS.R: data <- as.data.frame(cnr)
R/segmentByPruneCBS.R: regions <- as.data.frame(cnr)[,c("start","stop")]
R/segmentByPruneCBS.R: data <- as.data.frame(cnrT)
R/segmentByPruneCBS.R: data <- as.data.frame(cnr)
When calling a function via do.call()
, specify the function by itself and not by its name, e.g.
## GOOD
y <- do.call(backgroundCorrect, args=args)
## BAD
y <- do.call("backgroundCorrect", args=args)
The former will cause backgroundCorrect()
to be identified as a global object by the globals such that it is properly exported when evaluated by a future.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.