Commit 22e76841 authored by Holger Brandl's avatar Holger Brandl
Browse files

continued with rna-seq analysis for kirstin

parent 6d2ae08c
Meyer RNA-Seq
=============
Overview
--------
Data Location:
Source Repositorry:
Fetch the data
--------------
Technical Replicate Aggregation
-------------------------------
Experimental Layout
-------------------
**TODO** Add layout
Read Alignment
--------------
**TODO** link in path
**TODO** embed qc and alignment stats
Differential Expression Analysis
--------------------------------
**TODO** link in report
**TODO** embed final result summary
......@@ -48,51 +48,33 @@ dge_fastqc $(ls *fastq.gz) &
mcdir $baseDir/lanereps_pooled
echo '
devtools::source_url("https://raw.githubusercontent.com/holgerbrandl/datautils/v1.22/R/core_commons.R")
options(java.parameters = "-Xmx4g" ); require_auto(xlsx)
devtools::source_url("https://raw.githubusercontent.com/holgerbrandl/datautils/v1.36/R/core_commons.R")
sheetFile <- "../originals/natalied-FC_SN678_338-2015-5-12.xls"
# nc: no culture
# na: no hormone
# ECD: ecdysone
# INS: insulin
## first number : biological repliciate
## last number: time
renaming_scheme=c("NC" = "no_culture", "NA" = "no_hormone", "ECD"="ecdysone_", "INS"="insulin_", "9"="9h", "4"="4h")
sampleSheet <- read.xlsx2(sheetFile, "Fastqfiles") %>%
sampleSheet <- read_excel(sheetFile, "Fastqfiles") %>%
select(File, SampleName) %>%
mutate(
bio_replicate=str_match(SampleName, "(.).*")[,2],
sample = str_replace(SampleName, "[0-9]*", "") %>% str_replace_all(renaming_scheme),
sample = str_replace(SampleName, "[0-9]*", "") %>% str_replace_all(c("NC" = "no_culture", "NA" = "no_hormone", "ECD"="ecdysone_", "INS"="insulin_", "9"="9h", "4"="4h")),
bio_sample=paste(sample, bio_replicate, sep="_")
)
write.delim(sampleSheet, file="renaming_scheme.txt")
write_tsv(sampleSheet, path="renaming_scheme.txt")
#sampleSheet %>% count(bio_sample)
require(ggplot2)
ggplot(sampleSheet, aes(bio_sample)) + geom_bar() + coord_flip()
#require(ggplot2)
#ggplot(sampleSheet, aes(bio_sample)) + geom_bar() + coord_flip()
## merge lane replication
## rather write file
sampleSheet %>% group_by(bio_sample) %>% summarise(
zcat=paste("zcat", paste(paste0("../originals/", File), collapse=" "), "| gzip -c >", paste0(bio_sample[1], ".fastq.gz"))
) %>% with(zcat) %>% write.delim(header=F, file="lane_merge.cmd", quote=F)
' | R --vanilla -q
cat lane_merge.cmd | while read line; do
mysub "${project}__repmerge" "$line" | joblist .repmerge
jl submit -j .repmerge "$line"
done
wait4jobs .repmerge
mailme "${project}: replicate merging done"
jl wait --email --report
dge_fastqc $(ls *fastq.gz) &
......
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