Skip to content

HaojiaWu/qPCR-processing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

qPCR-processing

A script to process the Cq file generated by the qPCR machine in our lab

How to use:

1. In R

install.packages(c('dplyr','ggplot2','reshape2','ggbeeswarm','optparse'))

2. In Terminal

A. Clone the repo
git clone https://github.com/HaojiaWu/qPCR-processing.git
cd qPCR-processing
B. Run the Rscript plot_qPCR.R

Example code:

Rscript --vanilla plot_qPCR.R -q Cqfile.csv -m metadata.csv -g ref_gene_ID -s ref_sample_ID -n output_name

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"):

Sample Group
A1 Ctrl
A2 Ctrl
A3 Ctrl
A4 Disease
A5 Disease
A6 Disease
A7 Treatment

3. Output files

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.

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

Example of the txt file output:

$Gene3 ~ Group
Tukey multiple comparisons of means
95% family-wise confidence level

Fit: aov(formula = x, data = new.data2)

$Group

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

Example of the tiff output:

alt text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages