russbainer / gcrisprtools Goto Github PK
View Code? Open in Web Editor NEWAn R/Bioconductor package for the integrated analysis of pooled high-throughput CRISPR/Cas9 or shRNA screening experiments.
An R/Bioconductor package for the integrated analysis of pooled high-throughput CRISPR/Cas9 or shRNA screening experiments.
Hi,
I know you would prefer me using the dev package, but... would be nice to be able to do directly from here.
library(githubinstall)
R.3.4.4.>githubinstall("gCrisprTools")
Suggestion:
currently sample keys are checked against objects via ct.checkInput()
, which returns a logical. Update to a better-named function that invisibly returns the compliant object, similar to ct.prepareAnnotation()
.
Hi,
Nice code, very useful. Now here is my bug:
In my case
resultsDF <-
ct.generateResults(
fit,
annotation = ann,
RRAalphaCutoff = 0.1,
permutations = 1000,
scoring = "combined"
)
produces data which fails ct.resultCheck
Error in ct.resultCheck(resultsDF) :
Some of the columns in the supplied result object seem to be of the wrong type. Please supply a summaryDF object generated from ct.generateResults() in the gCrisprTools package.
This fixes the problem - but should it be done within ct.generateResults?
resultsDF$geneID <- as.character(resultsDF$geneID)
Alt / useful:
ct.resultCheck could be more verbose in what column fails the check, rather than needing to look it up in the code here.
Thanks
/Alistair
ct.UpSet does not properly assign labels to the combination sets. Requires code rework.
Hi,
In the below example, I am making a small dataset, and showing the median normalization in the ct.normalizeMedians() code versus the ~correct formula (from limma's https://rdrr.io/bioc/limma/src/R/norm.R ). In the corrected formula, the summary shows that the medians for the three groups are the same post-normalization, whereas the medians after ct.normalizeMedians() are different. Do you think this is correct?
g1 <- data.frame(sample.id="g1",guide.id=1:1000,counts=rnorm(1000,mean=9,sd=1))
g2 <- data.frame(sample.id="g2",guide.id=1:1000,counts=rnorm(1000,mean=10,sd=1))
g3 <- data.frame(sample.id="g3",guide.id=1:1000,counts=rnorm(1000,mean=11,sd=2))
df <- rbind(g1,g2,g3)
counts <- pivot_wider(df,names_from=sample.id,values_from=counts)
counts <- counts[,-1]
lib.size <- colSums(counts)
y <- t(log2(t(counts + 0.5)/(lib.size + 1) * 1e+06))
cmed <- apply(y, 2, median, na.rm = TRUE)
cmed <- cmed - mean(cmed)
correctedCounts <- 2^t(t(y) - cmed)
correctedCounts1 <- (t(t(correctedCounts) * ((lib.size + 1) / 1e+06)) - 0.5)
normalizeMedianValues <- function(x)
{
narrays <- NCOL(x)
if(narrays==1) return(x)
cmed <- log(apply(x, 2, median, na.rm=TRUE))
cmed <- exp(cmed - mean(cmed))
t(t(x)/cmed)
}
gs.counts <- normalizeMedianValues(counts)
## compare
summary(counts)
summary(gs.counts)
summary(correctedCounts1)
Thanks,
Rumen
Code for best practise generation of the aln object would be helpful, commenting on what script/tool usually generates the source matrix.
may => must (in documentation)
2.5 Alignment Statistics Users may provide a matrix of alignment statistics to enhance some applications, including QC reporting. These should be provided as a numeric matrix in which rows correspond to targets (reads containing a target cassette), nomatch (reads containing a cassette sequence but not a known target sequence), rejections (reads not containg a cassette sequence), and double_match (reads derived from multiple cassettes). The column names should exactly match the colnames() of the ExpressionSet object. Simple charting functionality is also provided to inspect the alignment rates of each sample.
ct.makeQCReport(es,
trim = 1000,
log2.ratio = 0.05,
sampleKey = sk,
annotation = ann,
# aln = aln,
identifier = 'Crispr_QC_Report',
lib.size = NULL,
outdir = file_path_report
)
Error in ct.makeQCReport(es, trim = 1000, log2.ratio = 0.05, sampleKey = sk, :
argument "aln" is missing, with no default
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.