diff --git a/.Rbuildignore b/.Rbuildignore new file mode 100644 index 0000000..91114bf --- /dev/null +++ b/.Rbuildignore @@ -0,0 +1,2 @@ +^.*\.Rproj$ +^\.Rproj\.user$ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b6a065 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.Rproj.user +.Rhistory +.RData +.Ruserdata diff --git a/Images/Counts_removed.png b/Images/Counts_removed.png new file mode 100644 index 0000000..bd46bbd Binary files /dev/null and b/Images/Counts_removed.png differ diff --git a/Images/DE_affect_chance.png b/Images/DE_affect_chance.png new file mode 100644 index 0000000..d220770 Binary files /dev/null and b/Images/DE_affect_chance.png differ diff --git a/README.md b/README.md index 12b8bc6..ad6a281 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,9 @@ First load the library and dependencies. library(Matrix) library(Seurat) library(qlcMatrix) -library(FastCAR) +library(pheatmap) +library(ggplot2) +library(gridExtra) ``` Specify the locations of the expression matrices @@ -47,6 +49,31 @@ plot.ambient.profile(ambProfile) ![picture](Images/Example_profile.png) +The actual effect on the chances of genes affecting your DE analyses can be determined and visualized with the following function + +``` + + correctionEffectProfile = describe.correction.effect(allExpression, cellExpression, 50, 500, 10, 0.05) + + plot.correction.effect.chance(correctionEffectProfile) + +``` + +![picture](Images/DE_affect_chance.png) + + + + +How many reads will be removed of these genes can be visualized from the same profile +``` + + plot.correction.effect.removal(correctionEffectProfile) + +``` + +![picture](Images/Counts_removed.png) + + Set the empty droplet cutoff and the contamination chance cutoff The empty droplet cutoff is the number of UMIs a droplet can contain at the most to be considered empty. @@ -69,8 +96,8 @@ emptyDropletCutoff = recommend.empty.cutoff(ambProfile) ``` -emptyDropletCutoff = 100 -contaminationChanceCutoff = 0.05 +emptyDropletCutoff = 150 +contaminationChanceCutoff = 0.005 ``` Determine the ambient RNA profile and remove the ambient RNA from each cell @@ -103,3 +130,11 @@ First fully working version of the R package Fixed function to write the corrected matrix to file. Added readout of which genes will be corrected for and how many reads will be removed per cell Added some input checks to functions + +### v0.2 +Fixed a bug that caused FastCAR to be incompatible with biobase libraries +Added better profiling to determine the effect of different settings on the corrections +Swapped base R plots for ggplot2 plots + + +