Commit dc255d67 authored by Gonzalo S Nido's avatar Gonzalo S Nido
Browse files

Added tmp directory for Bismark alignments

parent 7825a455
......@@ -93,6 +93,7 @@ fi
mkdir -p ${output_dir}
log_dir=${output_dir}/logs
mkdir -p ${log_dir}
# Create TMP folder
tmp_dir=${output_dir}/tmp
mkdir -p ${tmp_dir}
......@@ -143,7 +144,8 @@ echo -ne " 1.1 Aligning... "
#CMD="${bismark} ${b38_ref} -1 ${R1} -2 ${R2} -u 10000 \
CMD="${bismark} ${b38_ref} -1 ${R1} -2 ${R2} --multicore 8 \
-o ${output_dir} --prefix b38 --path_to_bowtie ${bowtie_path} \
--samtools_path ${samtools_path} > ${log_dir}/1_1_aln.stdout 2> ${log_dir}/1_1_aln.stderr"
--samtools_path ${samtools_path} --temp_dir ${tmp_dir} > \
${log_dir}/1_1_aln.stdout 2> ${log_dir}/1_1_aln.stderr"
echo -e ${CMD} > ${log_dir}/1_1_aln.cmd
if $MONITOR; then
${psrecord} "bash ${log_dir}/1_1_aln.cmd" --log ${log_dir}/1_1_aln.resources --interval 60 --include-children
......@@ -288,7 +290,8 @@ echo -ne " 2.1 Aligning... "
#CMD="${bismark} ${mt_ref} -1 ${R1} -2 ${R2} -u 10000 \
CMD="${bismark} ${mt_ref} -1 ${R1} -2 ${R2} --multicore 8 \
-o ${output_dir} --prefix MT --path_to_bowtie ${bowtie_path} \
--samtools_path ${samtools_path} > ${log_dir}/2_1_aln.stdout 2> ${log_dir}/2_1_aln.stderr"
--samtools_path ${samtools_path} --temp_dir ${tmp_dir} > \
${log_dir}/2_1_aln.stdout 2> ${log_dir}/2_1_aln.stderr"
echo -e ${CMD} > ${log_dir}/2_1_aln.cmd
if $MONITOR; then
${psrecord} "bash ${log_dir}/2_1_aln.cmd" --log ${log_dir}/2_1_aln.resources --interval 60 --include-children
......@@ -404,7 +407,8 @@ echo -ne " 3.1 Aligning vs nuclear DNA... "
#CMD="${bismark} ${nuc_ref} -1 ${R1} -2 ${R2} -u 10000 \
CMD="${bismark} ${nuc_ref} -1 ${R1} -2 ${R2} --multicore 8 \
--un --ambiguous -o ${output_dir} --prefix b38_noMT --path_to_bowtie ${bowtie_path} \
--samtools_path ${samtools_path} > ${log_dir}/3_1_aln.stdout 2> ${log_dir}/3_1_aln.stderr"
--samtools_path ${samtools_path} --temp_dir ${tmp_dir} > \
${log_dir}/3_1_aln.stdout 2> ${log_dir}/3_1_aln.stderr"
echo -e ${CMD} > ${log_dir}/3_1_aln.cmd
if $MONITOR; then
${psrecord} "bash ${log_dir}/3_1_aln.cmd" --log ${log_dir}/3_1_aln.resources --interval 60 --include-children
......@@ -491,7 +495,7 @@ echo -ne " 3.4 Re-aligning unmapped reads to mtDNA... "
CMD="(${bismark} ${mt_ref} -1 ${output_dir}/b38_noMT_${sample_id}_unmapped.R1.fastq.gz \
-2 ${output_dir}/b38_noMT_${sample_id}_unmapped.R2.fastq.gz --multicore 8 \
-o ${output_dir} --prefix umap_to_MT --path_to_bowtie ${bowtie_path} \
--samtools_path ${samtools_path} && \
--samtools_path ${samtools_path} --temp_dir ${tmp_dir} && \
mv ${output_dir}/umap_to_MT.b38_noMT_${sample_id}_unmapped.R1_bismark_bt2_pe.bam ${output_dir}/umap_to_MT_${sample_id}.bam && \
mv ${output_dir}/umap_to_MT.b38_noMT_${sample_id}_unmapped.R1_bismark_bt2_PE_report.txt ${output_dir}/umap_to_MT_${sample_id}_report.txt) > \
${log_dir}/3_4_realign_to_mt.stdout 2> \
......
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