DEIB-GECO / PyGMQL

Python Library for data analysis based on GMQL
Apache License 2.0
13 stars 5 forks source link

"INT is not a region builder" error in JOIN function #30

Closed MicheleRoar closed 3 years ago

MicheleRoar commented 3 years ago

with this query:

chip_promoter_0 = promoter.join(experiment=histone_marks,
                         genometric_predicate=[gl.DL(0)],
                         output='INT')

I got the following error. The same query works if the output parameter is LEFT, RIGHT or CONTIG


Py4JJavaError                             Traceback (most recent call last)
<ipython-input-107-5dbe907d20bc> in <module>()
      1 chip_promoter_0 = promoter.join(experiment=histone_marks,
      2                          genometric_predicate=[gl.DL(0)],
----> 3                          output='INT')

~/anaconda3/lib/python3.7/site-packages/gmql/dataset/GMQLDataset.py in join(self, experiment, genometric_predicate, output, joinBy, refName, expName, left_on, right_on)
    775 
    776         if isinstance(output, str):
--> 777             regionBuilder = self.opmng.getRegionBuilderJoin(output)
    778         else:
    779             raise TypeError("output must be a string. "

~/anaconda3/lib/python3.7/site-packages/py4j/java_gateway.py in __call__(self, *args)
   1303         answer = self.gateway_client.send_command(command)
   1304         return_value = get_return_value(
-> 1305             answer, self.gateway_client, self.target_id, self.name)
   1306 
   1307         for temp_arg in temp_args:

~/anaconda3/lib/python3.7/site-packages/py4j/protocol.py in get_return_value(answer, gateway_client, target_id, name)
    326                 raise Py4JJavaError(
    327                     "An error occurred while calling {0}{1}{2}.\n".
--> 328                     format(target_id, ".", name), value)
    329             else:
    330                 raise Py4JError(

Py4JJavaError: An error occurred while calling o16493.getRegionBuilderJoin.
: java.lang.IllegalArgumentException: INT is not a region builder
    at it.polimi.genomics.pythonapi.operators.OperatorManager$.getRegionBuilderJoin(OperatorManager.scala:314)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
    at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
    at py4j.Gateway.invoke(Gateway.java:280)
    at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
    at py4j.commands.CallCommand.execute(CallCommand.java:79)
    at py4j.GatewayConnection.run(GatewayConnection.java:214)
    at java.lang.Thread.run(Thread.java:748)
lucananni93 commented 3 years ago

Can you try using INTERSECTION instead of INT?

lucananni93 commented 3 years ago

Going to close this issue