@@ -253,7 +253,7 @@ def processSequence(sequence):
253
253
254
254
duplicatePercent = round (numDuplicateGuides / numIdentifiedGuides * 100.0 , 3 )
255
255
printer (f'\t Identified { numIdentifiedGuides :,} possible target sites in this file.' )
256
- printer (f'\t Of these, { len (duplicateGuides ):,} are not unique. These sites occur a total of { numDuplicateGuides } times.' )
256
+ printer (f'\t Of these, { len (duplicateGuides ):,} are not unique. These sites occur a total of { numDuplicateGuides :, } times.' )
257
257
printer (f'\t Removing { numDuplicateGuides :,} of { numIdentifiedGuides :,} ({ duplicatePercent } %) guides.' )
258
258
printer (f'\t { len (candidateGuides ):,} distinct guides have been discovered so far.' )
259
259
@@ -277,7 +277,7 @@ def processSequence(sequence):
277
277
for batchFile in guideBatchinator :
278
278
batchStartTime = time .time ()
279
279
280
- printer (f'Processing batch file { (batchFileId + 1 ):,} of { len (guideBatchinator )} ' )
280
+ printer (f'Processing batch file { (batchFileId + 1 ):,} of { len (guideBatchinator ):, } ' )
281
281
282
282
# Create new candidate guide dictionary
283
283
candidateGuides = {}
@@ -401,14 +401,17 @@ def processSequence(sequence):
401
401
errorCount = 0
402
402
notFoundCount = 0
403
403
404
- pgLength = int (configMngr ['rnafold' ]['page-length' ])
404
+ pgLength = min (
405
+ int (configMngr ['input' ]['batch-size' ]),
406
+ int (configMngr ['rnafold' ]['page-length' ])
407
+ )
405
408
406
409
for pgIdx , pageCandidateGuides in Paginator (
407
410
filterCandidateGuides (candidateGuides , MODULE_MM10DB ),
408
411
pgLength
409
412
):
410
413
if pgLength > 0 :
411
- printer (f'\t Processing page { (pgIdx + 1 )} ({ pgLength :,} per page).' )
414
+ printer (f'\t Processing page { (pgIdx + 1 ):, } (max { pgLength :,} per page).' )
412
415
413
416
if os .path .exists (configMngr ['rnafold' ]['output' ]):
414
417
os .remove (configMngr ['rnafold' ]['output' ])
@@ -501,10 +504,10 @@ def processSequence(sequence):
501
504
printer (f'\t { failedCount :,} of { testedCount :,} failed here.' )
502
505
503
506
if errorCount > 0 :
504
- printer (f'\t { errorCount } of { testedCount } erred here.' )
507
+ printer (f'\t { errorCount :, } of { testedCount :, } erred here.' )
505
508
506
509
if notFoundCount > 0 :
507
- printer (f'\t { notFoundCount } of { testedCount } not found in RNAfold output.' )
510
+ printer (f'\t { notFoundCount :, } of { testedCount :, } not found in RNAfold output.' )
508
511
509
512
#########################################
510
513
## Calc mm10db result ##
@@ -529,9 +532,9 @@ def processSequence(sequence):
529
532
candidateGuides [target23 ]['acceptedByMm10db' ] = CODE_ACCEPTED
530
533
acceptedCount += 1
531
534
532
- printer (f'\t { acceptedCount } accepted.' )
535
+ printer (f'\t { acceptedCount :, } accepted.' )
533
536
534
- printer (f'\t { failedCount } failed.' )
537
+ printer (f'\t { failedCount :, } failed.' )
535
538
536
539
del acceptedCount
537
540
@@ -606,15 +609,18 @@ def processSequence(sequence):
606
609
testedCount = 0
607
610
failedCount = 0
608
611
609
- pgLength = int (configMngr ['bowtie2' ]['page-length' ])
612
+ pgLength = min (
613
+ int (configMngr ['input' ]['batch-size' ]),
614
+ int (configMngr ['bowtie2' ]['page-length' ])
615
+ )
610
616
611
617
for pgIdx , pageCandidateGuides in Paginator (
612
618
filterCandidateGuides (candidateGuides , MODULE_SPECIFICITY ),
613
619
pgLength
614
620
):
615
621
616
622
if pgLength > 0 :
617
- printer (f'\t Processing page { (pgIdx + 1 )} ({ pgLength :,} per page).' )
623
+ printer (f'\t Processing page { (pgIdx + 1 ):, } (max { pgLength :,} per page).' )
618
624
619
625
if os .path .exists (configMngr ['bowtie2' ]['output' ]):
620
626
os .remove (configMngr ['bowtie2' ]['output' ])
@@ -732,15 +738,18 @@ def processSequence(sequence):
732
738
testedCount = 0
733
739
failedCount = 0
734
740
735
- pgLength = int (configMngr ['offtargetscore' ]['page-length' ])
741
+ pgLength = min (
742
+ int (configMngr ['input' ]['batch-size' ]),
743
+ int (configMngr ['offtargetscore' ]['page-length' ])
744
+ )
736
745
737
746
for pgIdx , pageCandidateGuides in Paginator (
738
747
filterCandidateGuides (candidateGuides , MODULE_SPECIFICITY ),
739
748
pgLength
740
749
):
741
750
742
751
if pgLength > 0 :
743
- printer (f'\t Processing page { (pgIdx + 1 )} ({ pgLength :,} per page).' )
752
+ printer (f'\t Processing page { (pgIdx + 1 ):, } (max { pgLength :,} per page).' )
744
753
745
754
# prepare the list of candidate guides to score
746
755
guidesInPage = 0
@@ -873,7 +882,7 @@ def processSequence(sequence):
873
882
#########################################
874
883
printer ('Done.' )
875
884
876
- printer (f'{ len (candidateGuides )} guides evaluated.' )
885
+ printer (f'{ len (candidateGuides ):, } guides evaluated.' )
877
886
878
887
printer ('This batch ran in {} (dd hh:mm:ss) or {} seconds' .format (
879
888
time .strftime ('%d %H:%M:%S' , time .gmtime ((time .time () - batchStartTime ))),
0 commit comments