Description Usage Arguments Details Value Author(s) Examples
Given a list of fastq files, return an array of read counts.
1 | count_reads(inFiles, verbose = TRUE)
|
inFiles |
Character - List of fastqs |
verbose |
Logical - whether to print progress / results |
If you use (unzipped!) fastqs, this function will call wc -l through the command line to get the number of reads in the file, and then divide by 4 to get the read count (fastqs include 4 lines for each read). TIME: About 1.5s / GB, if you look at the fastq file sizes. That's on Smintheus. Roughly 30s per GB, on yasuimac.
Numeric vector? - Read count for each input file
Emma Myers
1 2 3 4 5 | fastqFiles = list.files("NucSeq/trimmed", pattern=".fastq")
readCounts = count_reads(paste("NucSeq/trimmed/", fastqFiles, sep=""))
pdf("NucSeq_reads_per_sample_trimmed.pdf")
barplot(readCounts/1000000, las=2, main="Nuc-seq reads per sample (trimmed files)", cex.names = 0.5, names.arg=gsub("_trimmed_m20_q20.fastq", "", fastqFiles), ylab="Millions")
dev.off()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.