@@ -33,12 +33,13 @@ def move_files(extension):
33
33
34
34
# Load Snakemake variables
35
35
bams = snakemake .input ["bam" ]
36
- bams = [os .path .join (cwd ,x ) for x in bams ]
36
+ bams = [os .path .join (cwd , x ) for x in bams ]
37
37
gatc = os .path .join (cwd , snakemake .input ["gatc" ])
38
38
threads = snakemake .threads
39
39
bins = snakemake .params ["binsize" ]
40
40
normalization_method = snakemake .params ["normalization_method" ]
41
41
idx = os .path .join (cwd ,snakemake .params ["idx" ])
42
+ extension = snakemake .params ["extension" ]
42
43
extra = snakemake .params ["extra" ]
43
44
log = os .path .join (cwd , snakemake .log [0 ])
44
45
@@ -57,8 +58,8 @@ def move_files(extension):
57
58
damidseq_pipeline = os .path .join (cwd ,"resources/damidseq_pipeline/damidseq_pipeline" )
58
59
59
60
# Get dam bam
60
- dam_bam = [x for x in bams if re . search ( "dam.extended.bam$" , x .lower ())]
61
- assert len (dam_bam ) == 1
61
+ dam_bam = [x for x in bams if x .lower (). endswith ( f"dam { extension } " )]
62
+ assert len (dam_bam ) == 1 , "No Dam only bam file found..."
62
63
# TO DO: allow for multiple Dam only bam files (i.e. multiple conditions)
63
64
64
65
# Get non-Dam bam files
0 commit comments