Skip to content

Commit

Permalink
feat: snakemake 8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Schubach committed Jun 11, 2024
1 parent 9d7e409 commit cf38ed9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
11 changes: 2 additions & 9 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
################################
#### Global functions ####
################################
from snakemake.workflow import srcdir

SCRIPTS_DIR = srcdir("../scripts")

SCRIPTS_DIR = "../scripts"

def getScript(name):
return "%s/%s" % (SCRIPTS_DIR, name)


# this container defines the underlying OS for each job when using the workflow
# with --use-conda --use-singularity
container: "docker://continuumio/miniconda3"
return workflow.source_path("%s/%s" % (SCRIPTS_DIR, name))


##### load config and sample sheets #####
Expand Down
2 changes: 2 additions & 0 deletions workflow/rules/counts/counts_noUMI.smk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ rule counts_noUMI_create_BAM:
fw_fastq=lambda wc: getFW(wc.project, wc.condition, wc.replicate, wc.type),
rev_fastq=lambda wc: getRev(wc.project, wc.condition, wc.replicate, wc.type),
script_FastQ2doubleIndexBAM=getScript("count/FastQ2doubleIndexBAM_python3.py"),
module_FastQ2doubleIndexBAM=getScript("count/library_python3.py"),
script_MergeTrimReadsBAM=getScript("count/MergeTrimReadsBAM_python3.py"),
module_MergeTrimReadsBAM=getScript("count/MergeTrimReads_python3.py"),
output:
"results/experiments/{project}/counts/noUMI.{condition}_{replicate}_{type}.bam",
params:
Expand Down
2 changes: 2 additions & 0 deletions workflow/rules/counts/counts_umi.smk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ rule counts_umi_create_BAM:
rev_fastq=lambda wc: getRev(wc.project, wc.condition, wc.replicate, wc.type),
umi_fastq=lambda wc: getUMI(wc.project, wc.condition, wc.replicate, wc.type),
script_FastQ2doubleIndexBAM=getScript("count/FastQ2doubleIndexBAM_python3.py"),
module_FastQ2doubleIndexBAM=getScript("count/library_python3.py"),
script_MergeTrimReadsBAM=getScript("count/MergeTrimReadsBAM_python3.py"),
module_MergeTrimReadsBAM=getScript("count/MergeTrimReads_python3.py"),
output:
"results/experiments/{project}/counts/useUMI.{condition}_{replicate}_{type}.bam",
params:
Expand Down
3 changes: 0 additions & 3 deletions workflow/scripts/count/MergeTrimReadsBAM_python3.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@
"""

import sys, os
import math
import random

import pysam
from optparse import OptionParser,OptionGroup
import string

from MergeTrimReads_python3 import set_adapter_sequences, set_options, set_keys, process_SR, process_PE
table = str.maketrans('TGCA','ACGT') # COMPLEMENT DNA
Expand Down
3 changes: 1 addition & 2 deletions workflow/scripts/count/MergeTrimReads_python3.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
"""

import sys, os
import sys
import math
import random
import string

table = str.maketrans('TGCA','ACGT') # COMPLEMENT DNA

Expand Down

0 comments on commit cf38ed9

Please sign in to comment.