Commit d9288128 authored by HaojiaWu's avatar HaojiaWu
Browse files

initial commit

parent d2c14137
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -170,7 +170,8 @@ plot_circlize <- function(
  pt.size = 0.5,
  kde2d.n = 1000,
  contour.nlevels = 100,
  bg.color='#F9F2E4'
  bg.color='#F9F2E4',
  col.use=NULL
  ) {
  data_plot %>%
    dplyr::group_by(Cluster) %>%
@@ -178,6 +179,9 @@ plot_circlize <- function(
  z <- MASS::kde2d(data_plot$x, data_plot$y, n=kde2d.n)
  celltypes<-names(table(data_plot$Cluster))
  cell_colors <- scales::hue_pal()(length(celltypes))
  if(!is.null(col.use)){
    cell_colors=col.use
  }
  circos.clear()
  par(bg = bg.color)
  circos.par(cell.padding=c(0,0,0,0), track.margin=c(0.01,0),"track.height" = 0.01, gap.degree =c(rep(2, (length(celltypes)-1)),12))
+2 −1
Original line number Diff line number Diff line
@@ -11,7 +11,8 @@ plot_circlize(
  pt.size = 0.5,
  kde2d.n = 1000,
  contour.nlevels = 100,
  bg.color = "#F9F2E4"
  bg.color = "#F9F2E4",
  col.use = NULL
)
}
\arguments{

vignettes/plot_qPCR.Rmd

deleted100644 → 0
+0 −94
Original line number Diff line number Diff line
---
title: "plot_qPCR"
output: rmarkdown::github_document
vignette: >
  %\VignetteIndexEntry{plot_qPCR}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

# qPCR-processing
## A script to process the Cq file generated by the qPCR machine in our lab
### How to use:
#### 1. In R <br />
```{r, include = FALSE}
library(plot1cell)
plot_qpcr(qPCR_file="cq.csv", metadata_file="metadata.csv", ref_gene="GAPDH", ref_sample="A1", file_name="qPCR_plot")
```

Usage: plot_qpcr.R [options]


Options:

	-q, --cqfile
		The Cq file from qPCR machine. Must be in csv format.

	-m, --metadata
		A metadata file to assign your samples into groups. Must be in csv format.

	-g, --refgene
		The gene used for normalization. e.g. GAPDH.

	-s, --refsample
		The sample used as reference sample. e.g. sample from the control group.

	-n, --name
		The output file name

	-h, --help
		Show this help message and exit

Here is an example for the metadata file (please keep the column names exactly as "Sample" and "Group"):<br />
 Sample |  Group
---  | ---
A1 |  Ctrl
A2 | Ctrl
A3 | Ctrl
A4 | Disease 
A5 | Disease  
A6 | Disease  
A7 | Treatment 

<br />

#### 2. Output files  <br />
There are three output files produced from this script. The csv file contains the average quantitative value (2^-ΔΔCt) for each sample (and each gene) after normalized by the reference gene (e.g. GAPDH) and the reference sample (e.g. sample from the control group). This file can be input into Graphpad Prism. The txt file includes all statistics from comparisons of any two given groups. If the run has two groups only, Welch's t test will be performed. Otherwise, one-way ANOVA with post-hoc Tukey's test will be performed. Finally, the tiff file is a boxplot graph to visualize the gene expression across groups. <br />

Example of the csv file output:

 Sample | Gene1 |  Gene2 | Group
--- | --- | --- | ---
A1 | 1.00 | 1.00 | Ctrl
A2 | 0.85 | 1.12 |Ctrl
A3 | 0.89 | 1.10 |Ctrl
A4 | 0.93 | 1.04 |Disease 
A5 | 1.08 | 0.86 |Disease  
A6 | 0.99 | 1.16 |Disease  
A7 | 0.98 | 0.87 |Treatment 

<br />

Example of the txt file output: <br />

$`Gene3 ~ Group` <br />
  Tukey multiple comparisons of means <br />
    95% family-wise confidence level <br />
<br />
Fit: aov(formula = x, data = new.data2) <br />

$Group <br />

Comparison  |    diff   |     lwr    |   upr  |   p adj 
 --- | --- | --- | --- | ---
Disease-Ctrl  |   0.3255648 | -0.1188723 | 0.7700018 | 0.1408691 
Treatment-Ctrl   |    0.1660909 | 0.2216539 | 1.1105280 | 0.8805601 
Treatment-Disease | 0.3405262 | -0.1039109 | 0.7849633 | 0.1234654 

<br />

Example of the tiff output:<br />
<br />
![alt text](https://github.com/HaojiaWu/qPCR-processing/blob/main/plate11.png)