Hello! We are trying to implement this :point_up::...
# nextflow-plugins
j
Hello! We are trying to implement this ☝🏻 new functionality to the nf-validation plugin with @Nicolas Vannieuwkerke which will allow to also validate an input sample sheet. We have some Groovy doubts and errors. Is there a Groovy expert here who can give us a hand with the technical aspects?
m
@Rob Syme maybe?
r
I don't deserve the "expert" honorific, but very happy to have a look and help where I can.
n
Oh thanks! I'll ping you in the PR with the error I'm currently struggling with πŸ™‚
r
Perfect. I'm github.com/robsyme
πŸ‘€ 1
😍 2
n
Hi @Rob Syme when would you have some time to have a look? (https://github.com/nextflow-io/nf-validation/pull/10). No pressure though, there's no rush
r
Checking it out now. My gut instinct is that the
validateAndConvertSamplesheet
method is returning a
DataflowWriteChannel
, but it is being used somewhere that is expecting a
DataflowReadChannel
(where the
getValAsync()
method is defined).
Pull request submitted.
n
Thank you! πŸ₯³
The pipeline run seems to be hanging now πŸ˜•
πŸ‘€ 1
😒 1
j
I was trying to see what could be happening and thought, could we add a new factory to the class Channel and follow, for exmaple, this structure? Using your function there. I don’t know if this would be an easier implementation or more confusing to do it from a plugin
n
I'm not really sure I'm following what you mean, the
validateAndConvertSamplesheet
function is a factory that is used with
Channel
πŸ™‚
j
oh right, it is, sorry! then you can ignore my comment πŸ˜„
n
No problem, I'll take a better look at the code this afternoon and see if I can find the problem πŸ™‚
πŸ‘πŸ» 1
j
I was wondering if we have to return channel then, but I’ve tried and still doesn’t work 😞
n
Yeah I've no idea what's going wrong now πŸ˜•
r
Hmm. The pipeline completes for me:
Does the pipeline emit anything for you?
n
Not really, I'll send you the whole output in a minute, got a bit of a Java installation problem 😁
πŸ‘ 1
r
I've got meetings in 10 mins and then we're running some Nextflow training for three hours, but will check in again here after that.
n
Allright, thanks for all the help already πŸ™‚
r
No worries at all! I've been looking for an excuse to get more involved with plugins, so this is perfect πŸ˜„
🀣 2
n
Awesome! I'll keep the errors coming then πŸ˜‰
Copy code
$ JAVA_HOME=/usr ./launch.sh run -plugins nf-validation ../dummy_pipeline/main.nf 
N E X T F L O W  ~  version 23.01.0-edge
Launching `../dummy_pipeline/main.nf` [disturbed_gates] DSL2 - revision: 9b7a103ada
[-        ] process > MODULE -
It just keeps hanging on this
(still didn't fix my JAVA but managed to get the output 😁 )
r
I changed my
<http://main.nf|main.nf>
a tiny bit, but that shouldn't matter:
Copy code
include { validateAndConvertSamplesheet } from 'plugin/nf-validation'

workflow {
    Channel.validateAndConvertSamplesheet(
        file("${projectDir}/samplesheet.csv"),
        file("${projectDir}/schema.json")
    ) | view
}
n
I'll try it out, who knows πŸ˜›
r
Nope, I changed it back, and everything still works here 😞
πŸ€” 1
n
Hmmmmmm
What are your versions? maybe that's the cause?
r
Nextflow at
4325777e5
n
I'll update my version, maybe that fixes it
I was using one from last week
r
🀞
... but this feels like we're clutching at straws now πŸ˜„
I'd be tempted to do some println debugging to try and pin down where it is stalling.
I'll also get some input from Paolo when I see him tomorrow.
n
Yes I'll do that when I got my Java up and running again, thanks!
🦜 1
I can't get it to run... it seems the
compileGroovy
command is trying to use a Java installation in a conda environment (even though I'm not in an environment). I've also set
JAVA_HOME
correctly. When running with
--debug
I can see that it detects the correct
JAVA_HOME
, but it still uses the wrong one...
r
Oh no! Very best of luck untangling that. Sounds like a very un-fun time :(
catjam 1
πŸŽ‰ 1
🦜 1
headbangingparrot 1
deploy parrot 1
n
Thank you it's not fun indeed 😁
Okay managed it by sneakily symlinking the location in the conda env to the normal java executable 😁
πŸ˜… 1
πŸ•΅οΈ 1
r
Nice. Are you still seeing the stalling with your new-and-improved Java environment?
n
yes I've not had the time to investigate further, I'll continue tomorrow πŸ™‚
πŸ‘ 1
I found it πŸ₯³ apparently it was trying to throw an error because the files didn't exist, but it was somehow unable to do so. I got the correct output when the files did exist
πŸ‘ 1
r
Wooohooo! Does that mean there is still a bug when the files don't exist?
n
Just mainly that the exception handling isn't working. I've been trying to fix this but have so far been unable to do this
Yes I fixed it! it fully works now as it did before the transfer. Time to add more features now πŸ™‚
πŸ’ͺ🏻 1
πŸ‘πŸ» 1
n
indeed πŸ˜‰
I'd like to write documentation alongside the development, is there some place that you would prefer me to place this? or is a subfolder called
docs
also fine?
j
I wrote the documentation in the
README.md
but a
docs
folder sounds good too
n
allright thanks! πŸ™‚
I think everything that was requested is added to the code. (with exception of a way to emit a help text similar to how it's done with parameters)
j
πŸ₯³ Thank you!! I will have a look between today and tomorrow πŸ™‚
πŸ’― 1
n
Thanks! πŸ₯³