Doesnt work all the time with all samplesheets. Particularly i had one with single cell data that caused an error like this:
Sep-12 15:38:25.444 [Actor Thread 32] ERROR nextflow.extension.OperatorImpl - @unknown
**java.lang.IndexOutOfBoundsException: index is out of range 0..-1 (index = 0)**
at org.codehaus.groovy.runtime.StringGroovyMethods.getAt(StringGroovyMethods.java:1373)
at org.codehaus.groovy.runtime.dgm$1263.doMethodInvoke(Unknown Source)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at Script_d620b82475db33ec$_runScript_closure1$_closure2$_closure4.doCall(Script_d620b82475db33ec:80)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:343)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:328)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:279)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1007)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at nextflow.extension.MapOp$_apply_closure1.doCall(MapOp.groovy:56)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:343)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:328)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:279)
I found that this here:
https://github.com/nf-core/demultiplex/blob/17cde5d8f22f5327beac9637e941e4775ada1b3f/workflows/demultiplex.nf#L73-L82
Doesnt work all the time with all samplesheets. Particularly i had one with single cell data that caused an error like this: