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

migrated bc wrapper to jl

parent 749ddf64
No related branches found
No related tags found
No related merge requests found
......@@ -195,22 +195,23 @@ if [ $# -eq 0 ]; then
return;
fi
local bamDir=$1
if [ $# -e 1 ]; then
bamFiles=$(find $bamDir | grep ".bam$" | grep -v "unmapped" | sort)
if [ $# -eq 1 ]; then
bamFiles=$(find $1 | grep ".bam$" | grep -v "unmapped" | sort)
else
bamFiles=$*
fi
bamLabels=$(echo "$bamFiles" | xargs -n1 basename | sed 's!.*/!!' | sed 's/_mmf.bam//g' | sed 's/_ca.bam//g' | sed 's/.bam//g' | xargs echo); echo $bamLabels
local bamLabels=$(echo "$bamFiles" | xargs -n1 basename | sed 's!.*/!!' | sed 's/_mmf.bam//g' | sed 's/_ca.bam//g' | sed 's/.bam//g' | xargs echo);
echo "Used bam labels are: $bamLabels"
## see how well bam files correlate using untrimmed data
bcCmd="bamCorrelate bins --bamfiles $(echo $bamFiles | xargs echo) --labels $bamLabels --plotFile='bc.pdf' --outFileCorMatrix='bc.txt' --numberOfProcessors=6 --corMethod spearman --zMin 0.5 --zMax 1"
echo $bcCmd
bcCmd="bamCorrelate bins --bamfiles $(echo $bamFiles | xargs echo) --labels $bamLabels --plotFile=bc.pdf --outFileCorMatrix=bc.txt --numberOfProcessors=4 --corMethod spearman --zMin 0.5 --zMax 1"
#echo "cmd is $bcCmd"
#mysub "${project}__bamcorrelate" "$bcCmd" -q long -n 4 -R span[hosts=1] | blockScript .bamcorrelate
#mailme "$project: bamcorrelate done in $(pwd)"
jl submit --wait --jl .bamcorrelate -q long -t 4 -n "${project}__bamcorrelate" "$bcCmd"
}
export -f dge_bam_correlate
......
......@@ -120,7 +120,7 @@ algnSummaryLong %>% filter(str_detect(variable, "Uniquely_mapped_reads_Perc|Perc
#' ## Alignment Correlation
#' Without using any transcriptome as reference, the genome can be binned and alignment counts per bin can be used to perform a correlation analysis.
#' Used tool [deepTools](https://github.com/fidelram/deepTools)
#' Created using [deepTools](https://github.com/fidelram/deepTools)
## http://stackoverflow.com/questions/291813/recommended-way-to-embed-pdf-in-html
#+ results="asis"
......
......@@ -79,7 +79,7 @@ ggplot(algnSummary, aes(condition, mapped_reads)) +
#' ## Alignment Correlation
#' Without using any transcriptome as reference, the genome can be binned and alignment counts per bin can be used to perform a correlation analysis.
#' Used tool [deepTools](https://github.com/fidelram/deepTools)
#' Created using [deepTools](https://github.com/fidelram/deepTools)
## http://stackoverflow.com/questions/291813/recommended-way-to-embed-pdf-in-html
#+ results="asis"
......
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