@@ -64,7 +64,8 @@ def export_pseudobulk(
6464 remove_duplicates: bool, optional
6565 Whether duplicates should be removed before converting the data to bigwig.
6666 split_pattern: str, optional
67- Pattern to split cell barcode from sample id. Default: ___ .
67+ Pattern to split cell barcode from sample id. Default: '___'. Note, if `split_pattern` is not None, then `export_pseudobulk` will
68+ attempt to infer `sample_id` from the index of `input_data` and ignore `sample_id_col`.
6869 use_polars: bool, optional
6970 Whether to use polars to read fragments files. Default: True.
7071 **kwargs
@@ -521,7 +522,7 @@ def macs_call_peak(
521522 q_value = q_value ,
522523 nolambda = nolambda ,
523524 )
524- log .info (name + " done!" )
525+ log .info (f" { name } done!" )
525526 return MACS_peak_calling
526527
527528@ray .remote
@@ -645,7 +646,7 @@ def __init__(
645646 ):
646647 self .macs_path = macs_path
647648 self .treatment = bed_path
648- self .name = name
649+ self .name = str ( name )
649650 self .outdir = outdir
650651 self .input_format = input_format
651652 self .gsize = genome_size
@@ -691,7 +692,7 @@ def call_peak(self):
691692 self .ext_size ,
692693 self .keep_dup ,
693694 )
694- log .info ("Calling peaks for " + self .name + " with %s" , cmd )
695+ log .info (f "Calling peaks for { self .name } with { cmd } " )
695696 try :
696697 subprocess .check_output (args = cmd , shell = True , stderr = subprocess .STDOUT )
697698 except subprocess .CalledProcessError as e :
@@ -707,7 +708,7 @@ def load_narrow_peak(self):
707708 Load MACS2 narrow peak files as :class:`pr.PyRanges`.
708709 """
709710 narrow_peak = pd .read_csv (
710- os .path .join (self .outdir , self .name + " _peaks.narrowPeak" ),
711+ os .path .join (self .outdir , f" { self .name } _peaks.narrowPeak" ),
711712 sep = "\t " ,
712713 header = None ,
713714 )
0 commit comments