Skip to content
Snippets Groups Projects
Commit e1f1ee07 authored by Holger Brandl's avatar Holger Brandl
Browse files

cont. rna-seq workflow

parent b2966a0b
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env Rscript
#' # FastQC Summary for `r getwd()` #' # FastQC Summary for `r getwd()`
##+ echo=FALSE, message=FALSE ##+ echo=FALSE, message=FALSE
...@@ -23,7 +24,7 @@ baseDir=argv[1] ...@@ -23,7 +24,7 @@ baseDir=argv[1]
if(is.na(file.info(baseDir)$isdir)){ if(is.na(file.info(baseDir)$isdir)){
stop(paste("movie directory does not exist")) stop(paste("directory '", baseDir,"'does not exist"))
} }
#baseDir="fastqc" #baseDir="fastqc"
......
...@@ -48,7 +48,6 @@ mailme "fastqc done for $outputDir"dge_tophat_se ...@@ -48,7 +48,6 @@ mailme "fastqc done for $outputDir"dge_tophat_se
ziprm fastqc_logs fastqc__* ziprm fastqc_logs fastqc__*
# todo create some summary report here
spin.R $DGE_HOME/fastqc_summary.R $outputDir spin.R $DGE_HOME/fastqc_summary.R $outputDir
} }
...@@ -65,10 +64,13 @@ for fastqFile in $* ; do ...@@ -65,10 +64,13 @@ for fastqFile in $* ; do
echo "cutadapting $caFastq into $caFastq" echo "cutadapting $caFastq into $caFastq"
#todo use a more specific trimming model (trim just correct part on each side without using reverse complements #todo use a more specific trimming model (trim just correct part on each side without using reverse complements
mysub "$project__ca__$caFastq" "cutadapt -b file:$Ill_ADAPTERS -m 20 -q 25 -o $caFastq $fastqFile > $caFastq.ca.log" -q long | joblist .cajobs mysub "$project__ca__$(basename $fastqFile .fastq.gz)" "cutadapt -b file:$Ill_ADAPTERS -m 20 -q 25 -o $caFastq $fastqFile" -q long | joblist .cajobs
done done
wait4jobs .cajobs wait4jobs .cajobs
ziprm cutadapt_logs $project__ca__*
## todo do a small report here about what has been trimmed away and why
} }
export -f dge_cutadapt export -f dge_cutadapt
...@@ -91,8 +93,6 @@ shift $(($OPTIND - 1)) ...@@ -91,8 +93,6 @@ shift $(($OPTIND - 1))
local fastqFiles=$* local fastqFiles=$*
# IGENOME=/projects/bioinfo/igenomes/Mus_musculus/Ensembl/GRCm38 # IGENOME=/projects/bioinfo/igenomes/Mus_musculus/Ensembl/GRCm38
echo fastq $fastqFiles
echo igenomes "$IGENOME"
if [ -z "$IGENOME" ] || [ -z "$fastqFiles" ]; if [ -z "$IGENOME" ] || [ -z "$fastqFiles" ];
then echo "Usage: dge_tophat_se -i <path to igenome> [<fastq.gz file>]+" >&2 ; return; then echo "Usage: dge_tophat_se -i <path to igenome> [<fastq.gz file>]+" >&2 ; return;
...@@ -143,9 +143,6 @@ spin.R $DGE_HOME/bam_qc.R . ...@@ -143,9 +143,6 @@ spin.R $DGE_HOME/bam_qc.R .
} }
export -f dge_tophat_se export -f dge_tophat_se
# dge_tophat_se
# dge_tophat_se -i
dge_cuffdiff(){ dge_cuffdiff(){
......
- cuffdbs change dramatically in size if gtf is provided when building them, but what impact does it have on the results - cuffdbs change dramatically in size if gtf is provided when building them, but what impact does it have on the results
- Also try to remove RNA PCR Primer enrichment. Currently we just remove index and universal adapter
...@@ -51,10 +51,10 @@ commandArgs <- function(trailingOnly = FALSE){ return(as.character(spin_opts$scr ...@@ -51,10 +51,10 @@ commandArgs <- function(trailingOnly = FALSE){ return(as.character(spin_opts$scr
spin(r_script, knit=F) spin(r_script, knit=F)
mdScript <- str_replace(r_script, "[.]R$", ".Rmd") rmdScript <- str_replace(r_script, "[.]R$", ".Rmd")
system(paste("mv", mdScript, "tmp.Rmd")) system(paste("mv", rmdScript, "tmp.Rmd"))
system(paste("cat tmp.Rmd | grep -Ev '^#+$' | grep -Fv '#!/usr/bin/env Rscript' >", basename(mdScript))) system(paste("cat tmp.Rmd | grep -Ev '^#+$' | grep -Fv '#!/usr/bin/env Rscript' >", basename(rmdScript)))
file.remove("tmp.Rmd") file.remove("tmp.Rmd")
cssHeader=' cssHeader='
...@@ -67,14 +67,17 @@ cssHeader=' ...@@ -67,14 +67,17 @@ cssHeader='
## custom title http://stackoverflow.com/questions/14124022/setting-html-meta-elements-with-knitr ## custom title http://stackoverflow.com/questions/14124022/setting-html-meta-elements-with-knitr
opts_chunk$set( opts_chunk$set(
cache = spin_opts$"-c", cache = spin_opts$c,
message= spin_opts$"-m", message= spin_opts$m,
warning= spin_opts$"-w", warning= spin_opts$w,
echo= spin_opts$"-e", echo= spin_opts$e,
fig.width=15, fig.width=15,
width=200 width=200
) )
knit2html(basename(mdScript), header=cssHeader) knit2html(basename(rmdScript), header=cssHeader)
## also remove the .md and the .Rmd files
file.remove(basename(rmdScript))
file.remove(basename(str_replace(r_script, "[.]R$", ".md")))
file.remove(basename(mdScript))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment