I'm trying to use Snakemake to handle the running of an RNASeq pipeline on a HPC using SLURM to schedule jobs. I read that Snakemake has native support to schedule jobs using SBATCH on a cluster using snakemake --cluster, however this creates a Catch-22:
If you run snakemake --cluster from a login node, the Snakemake process it generates continues running on the login node until the pipeline stops running, which degrades performance of the login node and is against the rules of the HPC cluster.
If you run snakemake --cluster from a compute node, you are dispatching SBATCH commands from within an interactive session and on a compute node, while the rules of the cluster dictate they must be dispatched from the login node only.
Is there any way to use Snakemake to handle parallelization on a SLURM-managed cluster while 1) not running any long-term processes on the login node and 2) dispatching all jobs from the login node? My naive idea is to run Snakemake on a compute node, and then somehow get back to the login node before issuing the SBATCH commands, but I have no idea if this is even possible.
Thanks in advance for your time :)