Commit 93b4c0c9 authored by Holger Brandl's avatar Holger Brandl

dlac_v9 debuggig

parent d59b1a3f
......@@ -19,6 +19,32 @@ mmFastqc(){
export -f mmFastqc
## count reads in all fastq and fastq.gz files in the current directory
mmCountFastGzReads(){
# filePattern=$1
filePattern=".fastq.gz"
for fastqFile in *$filePattern ; do
echo processing $fastqFile
# echo "countGzipReads $fastqFile | sed -e s/^/${fastqFile%%$filePattern},/g >> readCounts.txt"
bsub -J countReads "countGzipReads $fastqFile | sed -e s/^/${fastqFile%%.fastq.gz},/g >> readCounts.txt" | joblist .countreads_jobs
# countGzipReads $fastqFile | sed -e s/^/${fastqFile%%.fastq.gz},/g >> readCounts.txt
done
wait4jobs .countreads_jobs
## create a plot
echo '
devtools::source_url("http://dl.dropbox.com/u/113630701/rlibs/base-commons.R")
readCounts <- subset(read.csv("readCounts.txt", h=F), select=-2)
names(readCounts) <- c("file", "num_reads")
gg <- ggplot(readCounts, aes(file, num_reads)) + geom_bar(stat="identity") + ggtitle(paste("read counts in\n", getwd())) + coord_flip() + scale_y_continuous(labels=comma)
ggsave("read_counts.png", gg, width=8)
' | R -q --vanilla
}
export -f mmCountFastGzReads
### Create a cuffdb on a network of lustre file-systen
MakeCuffdb() {
if [ $# -ne 2 ]; then echo "Usage: MakeCuffdb <gtffile> <genomebuild>"; return; fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment