Giter Club home page Giter Club logo

gcrisprtools's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jun-lizst

gcrisprtools's Issues

Add DESCRIPTION so install from github works

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:

  • OscarBrock/gCrisprTools An R/Bioconductor package for the integrated analysis of pooled high-throughput CRISPR/Cas9 or shRNA screening experiments.
    Do you want to install the package (Y/n)?
    Installing "gCrisprTools" package from GitHub, but already installed from unknown repository.
    This package is already installed. Are you sure you want to overwrite it (Y/n)? Y
    Downloading GitHub repo OscarBrock/gCrisprTools@master
    from URL https://api.github.com/repos/OscarBrock/gCrisprTools/zipball/master
    Installation failed: Does not appear to be an R package (no DESCRIPTION)

improve sample key checking

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().

ct.resultCheck failure

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.normalizeMedians() functions has a bug

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

alignment statistics ct.makeQCReport

From https://www.bioconductor.org/packages/devel/bioc/vignettes/gCrisprTools/inst/doc/gCrisprTools_Vignette.html

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.