File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ def initialize(self):
139139 # create the stream handler after child processes spawned to enable parallel reading
140140 # this function will be called by worker_init_function in DataLoader
141141 self .genome_pyfaidx = pyfaidx .Fasta (self .genome_fasta )
142- self .bigwigs = [utils .BigWig (bw_path ) for bw_path in self .bigwig_filelist ] if self .bigwig_filelist is not None else None
142+ self .bigwigs = [utils .BigWig (bw_path , backend = config . BIGWIG_BACKEND ) for bw_path in self .bigwig_filelist ] if self .bigwig_filelist is not None else None
143143 if self .target_bam is not None :
144144 if isinstance (self .target_bam , list ):
145145 self .target_pysam = [pysam .AlignmentFile (b ) for b in self .target_bam ]
Original file line number Diff line number Diff line change @@ -461,7 +461,7 @@ def compute_mean_std_bigwig(bigwig):
461461 :type bigwig: str
462462 :rtype: (mean, stddev)
463463 """
464- bw = BigWig (bigwig )
464+ bw = BigWig (bigwig , backend = config . BIGWIG_BACKEND )
465465
466466 # get chrom length list
467467 chroms = bw .chroms ()
Original file line number Diff line number Diff line change 1616import pysam
1717import webdataset as wds
1818
19- from seqchromloader import utils
19+ from seqchromloader import utils , config
2020from seqchromloader .loader import _SeqChromDatasetByWds
2121
2222logger = logging .getLogger (__name__ )
@@ -147,17 +147,17 @@ def dump_data_webdataset_worker(coords,
147147 ):
148148 #get handlers
149149 genome_pyfaidx = pyfaidx .Fasta (fasta )
150- bigwigs = [utils .BigWig (bw ) for bw in bigwig_files ] if bigwig_files is not None else None
150+ bigwigs = [utils .BigWig (bw , backend = config . BIGWIG_BACKEND ) for bw in bigwig_files ] if bigwig_files is not None else None
151151 if target_bam is not None :
152152 if isinstance (target_bam , list ):
153153 target = [pysam .AlignmentFile (b ) for b in target_bam ]
154154 else :
155155 target = pysam .AlignmentFile (target_bam )
156156 elif target_bw is not None :
157157 if isinstance (target_bw , list ):
158- target = [utils .BigWig (b ) for b in target_bw ]
158+ target = [utils .BigWig (b , backend = config . BIGWIG_BACKEND ) for b in target_bw ]
159159 else :
160- target = utils .BigWig (target_bw )
160+ target = utils .BigWig (target_bw , backend = config . BIGWIG_BACKEND )
161161 else :
162162 target = None
163163
You can’t perform that action at this time.
0 commit comments