## Load a FASTQ file, with sequence and k-mer hashing on by default.
s.fastq <- readSeqFile(system.file('extdata', 'test.fastq', package='qrqc'))
## plot counts of a subset of k-mers by position
s.kmers <- getKmer(s.fastq)
top.kmers <- s.kmers$kmer[order(s.kmers$count, decreasing=TRUE)[1:40]]
p <- ggplot(subset(s.kmers, kmer %in% top.kmers)) + geom_bar(aes(x=position, y=count,
fill=kmer), stat="identity")
p
Run the code above in your browser using DataLab