MAGeCK / Wiki / visualization (original) (raw)

Visualization Functions in MAGeCK

We developed a stand-alone visualization tool, VISPR, to visualize CRISPR screening results. See the paper and the VISPR project for more details.

The MAGeCKFlute package provides a convenient approach to visualze MAGeCK and MAGeCK-VISPR results using R programming language.

Visualization functions are also available within the MAGeCK software. Since version 0.5, MAGeCK enables a couple of visualization functions. With these features on, MAGeCK helps users better interpret datasets and results, and generates figures and tables that can be directly used in presentations or papers. The in-house visualization module provides a simple solution for users with limited knowledge in R.

The Visualization function has additional software dependencies, but they are easy to install in many operating systems. See installation for more details.

The R markdown option (since 0.5.9.3)

Since 0.5.9.3, MAGeCK generates an R markdown file (.Rmd) for count and test options. Users can copy this file (along with all other files generated by MAGeCK) to a computer with RStudio installed, and generate a html based report page.

To generate the report page, simply open the corresponding .Rmd file in RStudio, and press the "Run" --> "Run all" button. A html file will be generated correspondingly.

Users can also modify the "Parameters" section in .Rmd file to adjust the parameters used in the report.

An example of the generated html file (from test command) can be downloaded here.

An example of the generated html file (from count command) can be downloaded here.

Users need to install rmarkdown package as the dependency:

install.packages("rmarkdown")

The --pdf-report option (before 0.5.9.3)

--pdf-report option will be gradually depreciated after version 0.5.9.3, due to its complicated dependencies on pdflatex.

MAGeCK will generate PDF files in both count and test command, by simply adding the --pdf-report option. If successful, a .countsummary.pdf (for count command) or _summary.pdf (for test command) will be generated.

You can also try it in the two demos provided. In demo1, note that the command used in the run.sh is:

mageck test -k sample.txt -t HL60.final,KBM7.final -c HL60.initial,KBM7.initial -n demo

Use the following command to generate PDF file:

mageck test -k sample.txt -t HL60.final,KBM7.final -c HL60.initial,KBM7.initial -n demo --pdf-report

You can download the sample PDF file from demo1 here.

In demo2, the command used in the runmageck.sh is:

mageck run --fastq test1.fastq test2.fastq -l library.txt -n demo --sample-label L1,CTRL -t L1 -c CTRL

You can split the run command into count and test command, with --pdf-report option enabled. An alternative way is, note that the Rnw and R files (used for PDF file production) exist after successfully running this demo:

demo.count.median_normalized.csv demo.count.txt demo.R library.txt test2.fastq demo_countsummary.R demo.gene_summary.txt demo.sgrna_summary.txt runmageck.sh demo_countsummary.Rnw demo.log demo_summary.Rnw test1.fastq

Simply execute the two .R files and you can get the PDF files as well:

Rscript demo_countsummary.R Rscript demo.R

You can download the count sample PDF file from demo2 here.

The plot command

After running test, MAGeCK can generate a couple of figures describing the genes you are interested using the plot command. In the demo1 for example, if you are interested in the ACTR8 gene, use the following command to generate the PDF reports describing the sgRNA read count change of ACTR8, and its RRA score relative to all-gene RRA score distribution:

mageck plot -k sample.txt -g demo.gene_summary.txt --genes ACTR8

The PDF file generated using this command is here.

[Home]