Skip to content

Commit

Permalink
Merge pull request #912 from maxplanck-ie/dev_KS
Browse files Browse the repository at this point in the history
Fix 857
  • Loading branch information
katsikora committed Aug 3, 2023
2 parents 9d2e7a6 + 5b0be61 commit 14d7bea
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions snakePipes/common_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,3 +819,13 @@ def writeTools(usedEnvs, wdir, workflowName, maindir):
elif dependencies is True:
f.write(line)
f.close()


def copySampleSheet(sampleSheet, wdir):
if os.path.isfile(sampleSheet) and os.path.exists(wdir):
bname = os.path.basename(sampleSheet)
try:
shutil.copy(sampleSheet, os.path.join(wdir, bname))
except Exception as err:
print(f"Unexpected {err=}, {type(err)=}")
raise
2 changes: 2 additions & 0 deletions snakePipes/workflows/ATAC-seq/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ onstart:
if toolsVersion:
usedEnvs = [CONDA_SHARED_ENV, CONDA_ATAC_ENV, CONDA_RMD_ENV]
cf.writeTools(usedEnvs, workingdir, "ATAC-seq", maindir)
if sampleSheet:
cf.copySampleSheet(sampleSheet, wdir)

### main rule ##################################################################
################################################################################
Expand Down
3 changes: 3 additions & 0 deletions snakePipes/workflows/ChIP-seq/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ onstart:
if toolsVersion:
usedEnvs = [CONDA_SHARED_ENV, CONDA_CHIPSEQ_ENV]
cf.writeTools(usedEnvs, workingdir, "ChIP-seq", maindir)
if sampleSheet:
cf.copySampleSheet(sampleSheet, wdir)


### main rule ##################################################################
################################################################################
Expand Down
2 changes: 2 additions & 0 deletions snakePipes/workflows/HiC/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ onstart:
if toolsVersion:
usedEnvs = [CONDA_SHARED_ENV, CONDA_HIC_ENV]
cf.writeTools(usedEnvs, outdir, "HiC", maindir)
if sampleSheet:
cf.copySampleSheet(sampleSheet, wdir)

### main rule ##################################################################
################################################################################
Expand Down
2 changes: 2 additions & 0 deletions snakePipes/workflows/WGBS/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ onstart:
if toolsVersion:
usedEnvs = [CONDA_SHARED_ENV, CONDA_WGBS_ENV]
cf.writeTools(usedEnvs, outdir, pipeline, maindir)
if sampleSheet:
cf.copySampleSheet(sampleSheet, wdir)

### main rule ##################################################################
################################################################################
Expand Down
2 changes: 2 additions & 0 deletions snakePipes/workflows/mRNA-seq/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,8 @@ onstart:
if toolsVersion:
usedEnvs = [CONDA_SHARED_ENV, CONDA_RNASEQ_ENV]
cf.writeTools(usedEnvs, outdir, "mRNA-seq", maindir)
if sampleSheet:
cf.copySampleSheet(sampleSheet, wdir)

### main rule ##################################################################
################################################################################
Expand Down
2 changes: 2 additions & 0 deletions snakePipes/workflows/noncoding-RNA-seq/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ onstart:
if toolsVersion:
usedEnvs = [CONDA_SHARED_ENV, CONDA_NONCODING_RNASEQ_ENV]
cf.writeTools(usedEnvs, outdir, "noncoding-RNA-seq", maindir)
if sampleSheet:
cf.copySampleSheet(sampleSheet, wdir)

### main rule ##################################################################
################################################################################
Expand Down

0 comments on commit 14d7bea

Please sign in to comment.