Gemma icon indicating copy to clipboard operation
Gemma copied to clipboard

Make stringification of long FactorValue descriptors better to avoid >255 characters

Open SalvaSherif2532 opened this issue 1 year ago • 2 comments

Edited by PP to add that this issue was noted during splitting an experiment, which turned out to be misannotated so it's not a problem, but in general, when we have FactorValues with multiple statements, the stringified version can be too long to display (and will also cause problems if it gets used in this rare experiment splitting situation).


When splitting experiments, if a FV being utilized for splitting leads to the title of the new experiment exceeding 255 characters, the CLI fails. This bug was identified in #488.

Here is the stack trace: ERROR 23136 [main] u.g.c.u.AbstractCLI.executeCommand(209) | splitExperiment failed: IllegalArgumentException: It's not possible to truncate the name of the split such that it won't exceed 255 characters. java.lang.IllegalArgumentException: It's not possible to truncate the name of the split such that it won't exceed 255 characters. at ubic.gemma.core.analysis.preprocess.SplitExperimentServiceImpl.generateNameForSplit(SplitExperimentServiceImpl.java:360) ~[gemma-core-1.31.0.jar:?] at ubic.gemma.core.analysis.preprocess.SplitExperimentServiceImpl.split(SplitExperimentServiceImpl.java:161) ~[gemma-core-1.31.0.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_382] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_382] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_382] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_382] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[spring-aop-3.2.18.RELEASE.jar:3.2.18.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) ~[spring-aop-3.2.18.RELEASE.jar:3.2.18.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) ~[spring-aop-3.2.18.RELEASE.jar:3.2.18.RELEASE] at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64) ~[spring-security-core-3.2.10.RELEASE.jar:?] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.2.18.RELEASE.jar:3.2.18.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) ~[spring-aop-3.2.18.RELEASE.jar:3.2.18.RELEASE] at com.sun.proxy.$Proxy210.split(Unknown Source) ~[?:?] at ubic.gemma.core.apps.SplitExperimentCli.doWork(SplitExperimentCli.java:107) ~[gemma-cli-1.31.0.jar:?] at ubic.gemma.core.util.AbstractCLI.executeCommand(AbstractCLI.java:203) [gemma-cli-1.31.0.jar:?] at ubic.gemma.core.apps.GemmaCLI.main(GemmaCLI.java:199) [gemma-cli-1.31.0.jar:?]

SalvaSherif2532 avatar Feb 02 '24 19:02 SalvaSherif2532

generateNameForSplit gives up too easily :) and interacts badly with the long statement strings. The problem is the split is supposed to have information about the FactorValue that it has, distinct from other split parts. and we don't always know where in the statement the differentiation is (in the subject, or the object for example).

Experiment names are limited in length to 255 characters. This can obviously be changed, but there's a good reason: the name should fit on the screen!

So we'll have to reword that method, which was admittedly sort of thrown together.

ppavlidis avatar Feb 02 '24 20:02 ppavlidis

Related to #1027. Excluding certain terms will shorten the stringified FV.

arteymix avatar Feb 10 '24 17:02 arteymix