Chnage the TMB number in the blue circle of the report from in-house TMB to Illumina TMB #104
Open
Chnage the TMB number in the blue circle of the report from in-house TMB to Illumina TMB #104
Conversation
…TMB to Illumina TMB. And the number needs to be rounded. This is the request from national molecular biology group. GitHub issue 100.
tonjegul
approved these changes
Apr 15, 2026
marrip
reviewed
Apr 15, 2026
Collaborator
marrip
left a comment
There was a problem hiding this comment.
Hey, I think your changes are quite straight forward but I would consider to make this part in the code DRYer. Please have a look at my suggestion and let me know what you think
Comment on lines
+914
to
943
| if(TMB_TSO500_nr >= 0 and TMB_TSO500_nr <= 5 and TMB_TSO500 != "" and TMB_TSO500 != "NA"): | ||
| roundshape = slide.shapes.add_shape(MSO_SHAPE.OVAL, Cm(7.07), Cm(3.90), Cm(0.58), Cm(0.58)) | ||
| roundshape.line.color.rgb = RGBColor(255,165,0) | ||
| textbox5 = slide.shapes.add_textbox(Inches(2.74), Inches(1.54), Inches(0.32), Inches(0.21)) | ||
| tf5 = textbox5.text_frame | ||
| tf5.paragraphs[0].text = str_TMB_DRUP | ||
| tf5.paragraphs[0].text = str(TMB_TSO500_nr) | ||
| tf5.paragraphs[0].font.size = Pt(7) | ||
| tf5.paragraphs[0].font.bold = True | ||
| tf5.paragraphs[0].alignment = PP_ALIGN.CENTER | ||
| tf5.paragraphs[0].font.color.rgb = RGBColor(250,250,250) | ||
| if((TMB_DRUP_nr > 5 and TMB_DRUP_nr <= 20) or str_TMB_DRUP == "" or str_TMB_DRUP == "NA"): | ||
| if((TMB_TSO500_nr > 5 and TMB_TSO500_nr <= 20) or TMB_TSO500 == "" or TMB_TSO500 == "NA"): | ||
| roundshape = slide.shapes.add_shape(MSO_SHAPE.OVAL, Cm(8.27), Cm(3.90), Cm(0.58), Cm(0.58)) | ||
| roundshape.line.color.rgb = RGBColor(255,165,0) | ||
| textbox5 = slide.shapes.add_textbox(Cm(8.23), Cm(3.90), Cm(0.58), Cm(0.60)) | ||
| tf5 = textbox5.text_frame | ||
| tf5.paragraphs[0].text = str_TMB_DRUP | ||
| tf5.paragraphs[0].text = str(TMB_TSO500_nr) | ||
| tf5.paragraphs[0].font.size = Pt(7) | ||
| tf5.paragraphs[0].font.bold = True | ||
| tf5.paragraphs[0].alignment = PP_ALIGN.CENTER | ||
| tf5.paragraphs[0].font.color.rgb = RGBColor(250,250,250) | ||
| if(TMB_DRUP_nr > 20 and str_TMB_DRUP != "" and str_TMB_DRUP != "NA"): | ||
| if(TMB_TSO500_nr > 20 and TMB_TSO500 != "" and TMB_TSO500 != "NA"): | ||
| roundshape = slide.shapes.add_shape(MSO_SHAPE.OVAL, Cm(10.26), Cm(3.90), Cm(0.58), Cm(0.58)) | ||
| roundshape.line.color.rgb = RGBColor(255,165,0) | ||
| textbox5 = slide.shapes.add_textbox(Cm(10.20), Cm(3.95), Cm(0.58), Cm(0.60)) | ||
| tf5 = textbox5.text_frame | ||
| tf5.paragraphs[0].text = str_TMB_DRUP | ||
| tf5.paragraphs[0].text = str(TMB_TSO500_nr) | ||
| tf5.paragraphs[0].font.size = Pt(7) | ||
| tf5.paragraphs[0].font.bold = True | ||
| tf5.paragraphs[0].alignment = PP_ALIGN.CENTER | ||
| tf5.paragraphs[0].font.color.rgb = RGBColor(250,250,250) |
Collaborator
There was a problem hiding this comment.
could we make this whole part DRYer. I see there is a lot of repetition which seems unnecessary? Maybe something like:
Suggested change
| if(TMB_TSO500 != "" and TMB_TSO500 != "NA"): | |
| if(TMB_TSO500_nr >= 0 and TMB_TSO500_nr <= 5): | |
| roundshape = slide.shapes.add_shape(MSO_SHAPE.OVAL, Cm(7.07), Cm(3.90), Cm(0.58), Cm(0.58)) | |
| textbox5 = slide.shapes.add_textbox(Inches(2.74), Inches(1.54), Inches(0.32), Inches(0.21)) | |
| if(TMB_TSO500_nr > 5 and TMB_TSO500_nr <= 20): | |
| roundshape = slide.shapes.add_shape(MSO_SHAPE.OVAL, Cm(8.27), Cm(3.90), Cm(0.58), Cm(0.58)) | |
| textbox5 = slide.shapes.add_textbox(Cm(8.23), Cm(3.90), Cm(0.58), Cm(0.60)) | |
| if(TMB_TSO500_nr > 20 and TMB_TSO500 != "" and TMB_TSO500 != "NA"): | |
| roundshape = slide.shapes.add_shape(MSO_SHAPE.OVAL, Cm(10.26), Cm(3.90), Cm(0.58), Cm(0.58)) | |
| textbox5 = slide.shapes.add_textbox(Cm(10.20), Cm(3.95), Cm(0.58), Cm(0.60)) | |
| roundshape.line.color.rgb = RGBColor(255,165,0) | |
| tf5 = textbox5.text_frame | |
| tf5.paragraphs[0].text = str(TMB_TSO500_nr) | |
| tf5.paragraphs[0].font.size = Pt(7) | |
| tf5.paragraphs[0].font.bold = True | |
| tf5.paragraphs[0].alignment = PP_ALIGN.CENTER | |
| tf5.paragraphs[0].font.color.rgb = RGBColor(250,250,250) |
I changed the logic in if((TMB_TSO500_nr > 5 and TMB_TSO500_nr <= 20) or TMB_TSO500 == "" or TMB_TSO500 == "NA") because I thought it was a mistake that it would also handle TMB_TSO500 == "" to be empty and TMB_TSO500to beNA` but I can adjust it for this case if I got it wrong. Just let me know
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Request from the national molecular biology group:
Change the TMB number in the blue circle of report from in-house TMB to Illumina TMB. And the number will be rounded when reading into the report.