We have done some experiments measuring the expression of several genes in a population subjected to a genetic therapy. For each gene, we have the measurement of its expression in the control population, and in the treated population. Write a program that computes the change recorded for each gene between both populations, and reports whether the gene is upregulated (positive change), downregulated (negative change), or presents no change. Finally, the program should report which gene suffered the largest change (either positive or negative). In case of a tie, report the first such gene found in the input.
The input is a sequence of triplets. Each triplet consists of a string (gene name) and two real numbers: the expression in the control population and the expression in the treated population.
The output is the value of the change in expression for each gene, and whether it is up- or down- regulated. At the end, the gene with largest change is reported. Follow the format of the examples.
Remember that to print a real number x with two decimal
digits, you can use f"x:.2f"
Input
BRCA1 12.0 10.5 TP53 8.5 14.0 EGFR 3.2 2.8 MYC 15.1 20.4 VEGFA 6.0 3.1
Output
BRCA1 changed by -1.50. downregulated TP53 changed by 5.50. upregulated EGFR changed by -0.40. downregulated MYC changed by 5.30. upregulated VEGFA changed by -2.90. downregulated The gene with the largest change is TP53.
Input
IL6 20.0 12.5 TNF 15.2 10.1 CXCL8 8.0 6.8 STAT3 11.5 5.0 JUN 6.2 6.2 SOX2 3.0 8.5 NANOG 4.1 9.0 POU5F1 5.5 12.3 KLF4 2.8 5.4 LIN28A 1.2 6.9 HBB 6.0 6.0 ALB 12.5 12.1 INS 3.3 3.9 APOE 7.7 7.0 FTO 5.5 5.6
Output
IL6 changed by -7.50. downregulated TNF changed by -5.10. downregulated CXCL8 changed by -1.20. downregulated STAT3 changed by -6.50. downregulated JUN changed by 0.00. no change SOX2 changed by 5.50. upregulated NANOG changed by 4.90. upregulated POU5F1 changed by 6.80. upregulated KLF4 changed by 2.60. upregulated LIN28A changed by 5.70. upregulated HBB changed by 0.00. no change ALB changed by -0.40. downregulated INS changed by 0.60. upregulated APOE changed by -0.70. downregulated FTO changed by 0.10. upregulated The gene with the largest change is IL6.