Skip to content
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

error in function carpools.hit.overview() #12

Open
yeroslaviz opened this issue Mar 16, 2018 · 0 comments
Open

error in function carpools.hit.overview() #12

yeroslaviz opened this issue Mar 16, 2018 · 0 comments

Comments

@yeroslaviz
Copy link

When running the function carpools.hit.overview() from the template script in line 895 I get an error.

carpools.hit.overview(wilcox=data.wilcox, deseq=data.deseq, mageck=data.mageck, cutoff.deseq = sig.pval.deseq, cutoff.wilcox = sig.pval.wilcox, cutoff.mageck = sig.pval.mageck, cutoff.override=cutoff.override, cutoff.hits=NULL, plot.genes="overlapping")

Error in `$<-.data.frame`(`*tmp*`, "wilcox", value = numeric(0)) : 
  replacement has 0 rows, data has 409

I could backtrack the error to the step where the wilcoxon test is done. In line 695 the function stat.wilcox is used to run the wilcoxon test on the list of sgRNAs.

The problem is, that it returns a table of p-values with no gene names - they are being discarded when the rbind.data.frame call is done on the dataset.combined object (line 68 in the stat.wilcox function).
Therefore the overlap function doesn't work.

I have created a workaround for that by adding the following line before returning the pvals object.

row.names(pvals) <- unique(dataset.combined$genes)

I think this is not an optimal solution, but it works for now, as long as the order of the aggregated means (per gene) is identical to the order of the unique gene names extracted from the dataset.combined object.

Assa

P.S.
It owuld be great if you can check whether or not this solution is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant