Limit singularity to certain processes

108 views
Skip to first unread message

mphoe...@gmail.com

unread,
May 6, 2021, 11:58:03 AM5/6/21
to Nextflow
Hi,

I am trying to write a pipeline that runs on a SLURM cluster, consisting of traditional nodes as well as one Illumina Dragen, 

I would like the software to be provisioned through singularity - with the exception of the Dragen jobs, since Dragen has its own, local software. 

I was trying to define singularity within a label as in

withLabel: 'default' {
  singularity.enabled = true
}

withLabel: 'dragen' {
 // blabla
}

That however does not work. Is there any way to do this in Nextflow, or do I have to use some other way to provision software (process-specific conda environments or whatever). 

Cheers,
Marc

Paolo Di Tommaso

unread,
May 7, 2021, 9:53:06 AM5/7/21
to nextflow
The singularity engine can only be enabled as a top-level optional therefore cannot be nested within the process scope. 

However what you can do its to *not* specific the container for the dragen tasks ie. 

```
singularity.enabled = true

process {
  withLabel: 'default' {
    container = 'some/image'
  }

  withLabel: 'dragen' {
   container = null
  }
}
```

--
You received this message because you are subscribed to the Google Groups "Nextflow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nextflow+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nextflow/4919682b-c928-4c94-a188-7b771e876fa8n%40googlegroups.com.

Alan Hoyle

unread,
May 7, 2021, 2:18:56 PM5/7/21
to next...@googlegroups.com
This conversation is quite useful.  We recently got a Dragen appliance as well, and have also put it on our SLURM cluster in a "dragen" partition.  I note that with at least some of the Illumina-provided, Dragen-enabled workflows, they call Singularity internally in their workflow.  

-alan

--
  -  Alan Hoyle  -  al...@alanhoyle.com  -  http://www.alanhoyle.com/  -


Reply all
Reply to author
Forward
0 new messages