Skip to content

Commit

Permalink
fix prefix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alexg9010 committed Sep 12, 2024
1 parent cd5c047 commit 423e21a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions rules/export_tabix_bigwig.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def destrand(context):
output:
bw = os.path.join(DIR_bigwig, "{prefix}.{context}_{tool}.bw")
wildcard_constraints:
context=".+(?<!destranded)",
tool="(?<!destranded)_.*"
context="CpG|CHG|CHH",
tool="methylDackel|methylKit"
params:
assembly = ASSEMBLY,
destrand = lambda wc: destrand(wc.context)
Expand Down
4 changes: 1 addition & 3 deletions rules/preprocessing_methyldackel.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,11 @@ def keepDups(protocol):
output:
DIR_methcall + "methylDackel/" + "tabix_{context}/{prefix}_{context}.txt.bgz",
DIR_methcall + "methylDackel/" + "tabix_{context}/{prefix}_{context}.txt.bgz.tbi"
wildcard_constraints:
sample="sorted.+(?<!deduped)"
params:
sampleid = "{prefix}_{context}",
assembly = ASSEMBLY,
treatment = lambda wc: samplesheet(
wc.prefix.replace(".deduped", ""), 'Treatment'),
removeMapperSuffix(wc.prefix), 'Treatment'),
context = "{context}",
dbdir = DIR_methcall + "methylDackel/" + "/tabix_{context}/",
mincov = int(config['general']['methylation-calling']
Expand Down
2 changes: 1 addition & 1 deletion scripts/func_defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def bigwig_exporting_bismark(files, sampleID, protocol):
if USEBWAMETH:
INFIX += [ ".bwameth.sorted"]
DESTRAND = "_destranded" if destrand("cpg") else ""
FILES = [ PATH+sampleID+infix + ".CpG" + DESTRAND + "_methylDackel" + ".bw" for infix in INFIX]
FILES = [ PATH+sampleID+infix+dedupe_tag(protocol) + ".CpG" + DESTRAND + "_methylDackel" + ".bw" for infix in INFIX]
return FILES

# FIXME: contexts should be generate output based on settings file
Expand Down

0 comments on commit 423e21a

Please sign in to comment.