@@ -240,7 +240,7 @@ def read_xml_metadata(path, include_invalid_runs=False) -> List[SraRunMetadata]:
240240 read_types = fastq_load_read_types
241241
242242 elif sra_fastq_files :
243- logging .warning (
243+ logger .warning (
244244 "%s: The SRA files: %s do not match arguments passed to fastq-load.py: %s. The filenames passed to fastq-load.py will be used instead: %s." ,
245245 srr ,
246246 ', ' .join (sf .attrib ['filename' ] for sf in sra_fastq_files ),
@@ -256,7 +256,7 @@ def read_xml_metadata(path, include_invalid_runs=False) -> List[SraRunMetadata]:
256256 issues |= SraRunIssue .MISMATCHED_FASTQ_LOAD_OPTIONS
257257
258258 else :
259- logging .warning (
259+ logger .warning (
260260 "%s: No SRA files found, but the arguments of fastq-load.py are present: %s. The filenames passed to fastq-load.py will be used: %s." ,
261261 srr , ' ' .join (k + '=' + v if v else 'k' for k , v in options .items ()), ', ' .join (fastq_load_files ))
262262 fastq_filenames = fastq_load_files
@@ -269,7 +269,7 @@ def read_xml_metadata(path, include_invalid_runs=False) -> List[SraRunMetadata]:
269269
270270 # check for 10x BAM files
271271 elif sra_10x_bam_files :
272- logging .info ('%s: Using 10x Genomics BAM files do determine read layout.' , srr )
272+ logger .info ('%s: Using 10x Genomics BAM files do determine read layout.' , srr )
273273 # we have to read the file(s), unfortunately
274274
275275 if len (sra_10x_bam_files ) > 1 :
@@ -293,7 +293,7 @@ def read_xml_metadata(path, include_invalid_runs=False) -> List[SraRunMetadata]:
293293 'Mixture of sequencing layouts in a single 10x BAM file are not supported.' )
294294
295295 if flowcells :
296- logging .info ('%s: Detected read types from BAM file %s: %s' , srr , bam_file .attrib ['filename' ],
296+ logger .info ('%s: Detected read types from BAM file %s: %s' , srr , bam_file .attrib ['filename' ],
297297 ', ' .join (rt .name for rt in bam_read_types ))
298298 # FIXME: report FASTQ filenames for all flowcells and lanes
299299 flowcell = next (iter (flowcells .values ()))
@@ -312,7 +312,7 @@ def read_xml_metadata(path, include_invalid_runs=False) -> List[SraRunMetadata]:
312312 bam_file_urls = [bam_file .attrib ['url' ]]
313313 bam_fastq_filenames = get_fastq_filenames_for_10x_sequencing_layout (flowcells )
314314 else :
315- logging .warning ('%s: Failed to detect read types from BAM file, ignoring that run.' , srr )
315+ logger .warning ('%s: Failed to detect read types from BAM file, ignoring that run.' , srr )
316316 issues |= SraRunIssue .INVALID_RUN
317317 if include_invalid_runs :
318318 result .append (SraRunMetadata (srx , srr ,
@@ -459,9 +459,9 @@ def read_bam_header(srr, filename, url):
459459 """Read and cache the header of a SRA BAM file."""
460460 bam_header_file = join (cfg .OUTPUT_DIR , sra_config .bam_headers_cache_dir , srr + '.bam-header.txt' )
461461 if os .path .exists (bam_header_file ):
462- logging .info ('%s: Using cached 10x BAM header from %s...' , srr , bam_header_file )
462+ logger .info ('%s: Using cached 10x BAM header from %s...' , srr , bam_header_file )
463463 else :
464- logging .info ('%s: Reading header from 10x BAM file %s from %s to %s...' , srr ,
464+ logger .info ('%s: Reading header from 10x BAM file %s from %s to %s...' , srr ,
465465 filename , url , bam_header_file )
466466 os .makedirs (os .path .dirname (bam_header_file ), exist_ok = True )
467467 with open (bam_header_file , 'w' ) as f :
0 commit comments