FastqQC

From AMOS WIKI
Revision as of 18:56, 30 November 2009 by Mcschatz (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Quality check a fastq for position dependent sequencing or quality biases

Example

 fastqqc.pl -tsv file.fq > file.fq.qc


Fastqqc.png


FastqQC Plot

## R script for generating quality plot
## Shows the per position sequence composition (A=red, T=orange, G=green, C=cyan, N=black)
## And the per position average quality value (dashed-purple line)
prefix="s_7"
dir="./"

pdf(paste(paste(dir,prefix,sep=""),".qc.pdf",sep=""))
par(mfrow=c(2,1))

qc1pre = paste(prefix,"_1", sep="")
qc1name=paste(dir, qc1pre,"_sequence.txt.qc", sep="")
qc1 <- read.table(qc1name, header=TRUE)
qc2pre = paste(prefix,"_2", sep="")
qc2name=paste(dir, qc2pre,"_sequence.txt.qc", sep="")
qc2 <- read.table(qc2name, header=TRUE)

plot(qc1$pos, qc1$X.A, type="l", col="red", ylim=c(0,40), xlab="", ylab="", main=qc1pre, axes=FALSE, frame.plot=TRUE)
lines(qc1$pos, qc1$X.C, col="cyan")
lines(qc1$pos, qc1$X.G, col="green")
lines(qc1$pos, qc1$X.T, col="orange")
lines(qc1$pos, qc1$X.N, col="black")
lines(qc1$pos, qc1$Q, col="purple", lty=2)
abline(v=seq(0,80,10), col="grey", lty=3)
abline(h=seq(0,80,10), col="grey", lty=3)
axis(side=1, at=seq(0,80,by=10))
axis(side=2, at=seq(0,80,by=10))

plot(qc2$pos, qc2$X.A, type="l", col="red", ylim=c(0,40), xlab="", ylab="", main=qc2pre, frame.plot=TRUE)
lines(qc2$pos, qc2$X.C, col="cyan")
lines(qc2$pos, qc2$X.G, col="green")
lines(qc2$pos, qc2$X.T, col="orange")
lines(qc2$pos, qc2$X.N, col="black")
lines(qc2$pos, qc2$Q, col="purple", lty=2)
abline(v=seq(0,80,10), col="grey", lty=3)
abline(h=seq(0,80,10), col="grey", lty=3)
axis(side=1, at=seq(0,80,by=10))
axis(side=2, at=seq(0,80,by=10))

dev.off()