Commit f18c070a authored by Holger Brandl's avatar Holger Brandl
Browse files

bash cosmetics

parent 0c9521fa
......@@ -5,8 +5,8 @@ export project="TODO define project name"
## madmax
if [ "$HOSTNAME"=="falcon1" ]; then
export baseDir="/projects/bioinfo/holger/projects/${project}"
export PROJECT_SCRIPTS="/projects/bioinfo/holger/scripts/${project}"
export PRJ_DATA="/projects/bioinfo/holger/projects/${project}"
export PRJ_SCRIPTS="/projects/bioinfo/holger/scripts/${project}"
export NGS_TOOLS="/projects/bioinfo/scripts/ngs_tools/dev"
## TODO define igenome to be used
......@@ -16,8 +16,8 @@ fi
## bioinfo
if [ $(hostname) == "bioinformatics-srv1" ]; then
export baseDir=/net/mack/lustre/projects/bioinfo/holger/projects/${project}
export PROJECT_SCRIPTS==/net/mack/lustre/projects/bioinfo/holger/scripts/${project}
export PRJ_DATA=/net/mack/lustre/projects/bioinfo/holger/projects/${project}
export PRJ_SCRIPTS==/net/mack/lustre/projects/bioinfo/holger/scripts/${project}
export NGS_TOOLS=/net/mack/lustre/projects/bioinfo/scripts/ngs_tools/dev
fi
......@@ -26,14 +26,14 @@ source ${NGS_TOOLS}/dge_workflow/dge_utils.sh
export PATH=${NGS_TOOLS}/dge_workflow:$PATH
ls ${igenome} || { echo "igennome variable is not correctly set" 1>&2; exit 1; }
cd ${baseDir} || { echo "project directory '$baseDir' does not exist" 1>&2; exit 1; }
ls ${IGENOME} || { echo "igennome variable is not correctly set" 1>&2; exit 1; }
cd ${PRJ_DATA} || { echo "project directory '$PRJ_DATA' does not exist" 1>&2; exit 1; }
########################################################################################################################
### Fetch the data
mcdir ${baseDir}/originals
mcdir ${PRJ_DATA}/originals
wget -nc --user="USER" --password="PW" -r --no-directories --no-check-certificate -A "*fastq.gz" https:/projects.biotec.tu-dresden.de/ngs-filesharing/martaf/
......@@ -49,7 +49,7 @@ dge_fastqc $(ls *fastq.gz) &
## todo adjust renaming scheme to project specifics
mcdir $baseDir/lanereps_pooled
mcdir $PRJ_DATA/lanereps_pooled
echo '
devtools::source_url("https://raw.githubusercontent.com/holgerbrandl/datautils/v1.36/R/core_commons.R")
......@@ -93,9 +93,9 @@ dge_fastqc $(ls *fastq.gz) &
########################################################################################################################
### Alignment the reads
mcdir $baseDir/alignments
mcdir $PRJ_DATA/alignments
star_align.kts ${igenome} $(ls ${baseDir}/lanereps_pooled/*.fastq.gz) 2>&1 | tee star_algin.log
star_align.kts ${igenome} $(ls ${PRJ_DATA}/lanereps_pooled/*.fastq.gz) 2>&1 | tee star_algin.log
#dge_bam_correlate . & # part of star_align.kts now
......@@ -106,7 +106,7 @@ mailme "$project: mapping done"
### Differential Expression Analysis
mcdir $baseDir/dge_analysis
mcdir $PRJ_DATA/dge_analysis
## build custom design matrix
#csvcut -tc replicate,sample $baseDir/lanereps_pooled/renaming_scheme.txt | csvformat -T > design_matrix.txt
......@@ -136,7 +136,7 @@ rend.R -e ${NGS_TOOLS}/dge_workflow/featcounts_deseq_mf.R ../alignments/star_cou
## Term enrichment
mcdir ${baseDir}/dge_analysis/dge_enrichment_analysis
mcdir ${PRJ_DATA}/dge_analysis/dge_enrichment_analysis
#$NGS_TOOLS/common/cp_enrichment.R --overlay_expr_data ../plot_score_matrix.txt ../degs_by_contrast.txt contrast
rend.R -e ${NGS_TOOLS}/common/cp_enrichment.R --overlay_expr_data ../plot_score_matrix.txt ../degs_by_contrast.txt contrast
......@@ -148,13 +148,13 @@ rend.R -e ${NGS_TOOLS}/common/cp_enrichment.R --overlay_expr_data ../plot_score_
## todo make sure to stay in current directory #{ (cd ${NGS_TOOLS} && git describe --tags) } >> .used_ngs_tools
(cd ${NGS_TOOLS} && test -n "$project" && git diff --exit-code && git tag "${project}__$(date +'%Y%m%d')") || echo "could not tag current branch"
# and log it
git describe --tags >> ${baseDir}/.used_ngs_tools
git describe --tags >> ${PRJ_DATA}/.used_ngs_tools
## bidirectional sync with project space
#remoteProjectDir=/net/fileserver-nfs/stornext/snfs3/projects/ TODO define mount path on bioinfo for bidirectional synching
(ls "${remoteProjectDir}" "${baseDir}" && ~/bin/unison ${baseDir} ${remoteProjectDir}/data -fastcheck -times -perms 0 -batch) || echo "could not sync data"
(ls "${remoteProjectDir}" "${PRJ_DATA}" && ~/bin/unison ${PRJ_DATA} ${remoteProjectDir}/data -fastcheck -times -perms 0 -batch) || echo "could not sync data"
## update scripts working copy in project space
#git clone "git@git.mpi-cbg.de:bioinfo/${project}.git" ${remoteProjectDir}/scripts
......
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