Skip to content

Commit

Permalink
Fix Spark temp dir permissions (#145)
Browse files Browse the repository at this point in the history
* Fix Spark temp dir permissions

* Bump version to 7.2.1
  • Loading branch information
yashpatel6 authored Oct 28, 2021
1 parent da0a654 commit 5a7bfda
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [Unreleased]


## [7.2.1] - 2021-10-28
### Changed
- Fix potential Spark temp directory permissions issue

## [7.2.0] - 2021-10-01
### Added
- GPL2 License added
Expand Down
2 changes: 1 addition & 1 deletion pipeline/config/methods.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ manifest {
name = "align-DNA"
author = "Benjamin Carlin; Chenghao Zhu; Aaron Holmes; Yash Patel"
description = "alignment pipeline for paired fastqs DNA samples"
version = "7.2.0"
version = "7.2.1"
}

params {
Expand Down
23 changes: 22 additions & 1 deletion pipeline/modules/mark_duplicates_spark.nf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,28 @@ process run_MarkDuplicatesSpark_GATK {
path "${params.sample_name}.mark_dup.metrics"
path(".command.*")

beforeScript 'chmod 777 `pwd`'
//Update tempdir permissions for user 'nobody'
beforeScript "chmod 777 `pwd`; \
if [[ ! -d ${params.temp_dir} ]]; \
then \
mkdir -p ${params.temp_dir}; \
chmod 777 ${params.temp_dir}; \
else \
if [[ ! `stat -c %a ${params.temp_dir}` == 777 ]]; \
then \
chmod 777 ${params.temp_dir}; \
fi; \
fi; \
if [[ ! -d ${params.spark_temp_dir} ]]; \
then \
mkdir -p ${params.spark_temp_dir}; \
chmod 777 ${params.spark_temp_dir}; \
else \
if [[ ! `stat -c %a ${params.spark_temp_dir}` == 777 ]]; \
then \
chmod 777 ${params.spark_temp_dir}; \
fi; \
fi"

shell:
bam_output_filename = "${params.bam_output_filename}"
Expand Down

0 comments on commit 5a7bfda

Please sign in to comment.