@@ -1333,8 +1333,8 @@ def topHat_map(self, input_fastq, output_dir, genome, transcriptome, cpus):
1333
1333
return cmd
1334
1334
1335
1335
def picard_mark_duplicates (self , input_bam , output_bam , metrics_file , temp_dir = "." ):
1336
- transient_file = re .sub ("\.bam$" , "" , output_bam ) + ".dups.nosort.bam"
1337
- output_bam = re .sub ("\.bam$" , "" , output_bam )
1336
+ transient_file = re .sub (r "\.bam$" , "" , output_bam ) + ".dups.nosort.bam"
1337
+ output_bam = re .sub (r "\.bam$" , "" , output_bam )
1338
1338
cmd1 = self .tools .java + " -Xmx" + self .pm .javamem
1339
1339
cmd1 += " -jar `which MarkDuplicates.jar`"
1340
1340
cmd1 += " INPUT={0}" .format (input_bam )
@@ -1406,7 +1406,7 @@ def shift_reads(self, input_bam, genome, output_bam):
1406
1406
return cmd
1407
1407
1408
1408
def sort_index_bam (self , input_bam , output_bam ):
1409
- tmp_bam = re .sub ("\.bam" , ".sorted" , input_bam )
1409
+ tmp_bam = re .sub (r "\.bam" , ".sorted" , input_bam )
1410
1410
cmd1 = self .tools .samtools + " sort {0} {1}" .format (input_bam , tmp_bam )
1411
1411
cmd2 = "mv {0}.bam {1}" .format (tmp_bam , output_bam )
1412
1412
cmd3 = self .tools .samtools + " index {0}" .format (output_bam )
@@ -1638,7 +1638,7 @@ def bam_to_bigwig(
1638
1638
# addjust fragment length dependent on read size and real fragment size
1639
1639
# (right now it asssumes 50bp reads with 180bp fragments)
1640
1640
cmds = list ()
1641
- transient_file = os .path .abspath (re .sub ("\.bigWig" , "" , output_bigwig ))
1641
+ transient_file = os .path .abspath (re .sub (r "\.bigWig" , "" , output_bigwig ))
1642
1642
cmd1 = self .tools .bedtools + " bamtobed -i {0} |" .format (input_bam )
1643
1643
if not tagmented :
1644
1644
cmd1 += (
@@ -2050,7 +2050,7 @@ def parse_bowtie_stats(self, stats_file):
2050
2050
line = [
2051
2051
i for i in range (len (content )) if " reads; of these:" in content [i ]
2052
2052
][0 ]
2053
- stats ["readCount" ] = re .sub ("\D.*" , "" , content [line ])
2053
+ stats ["readCount" ] = re .sub (r "\D.*" , "" , content [line ])
2054
2054
if 7 > len (content ) > 2 :
2055
2055
line = [
2056
2056
i
0 commit comments