Any part of a script that generates ".sh" files to queue them with sbatch after generating some data neccesary to run these ".sh" files could include generating said data into the ".sh" files themselves.
For example:
This should speed things up by making it so that generating the neccesary data becomes part of the sbatch commands, and thus can run at the same time as other similar commands, instead of stopping the script dead in its tracks until the data is generated.
WARNING: This approach will only work if the data generated is used in a single resulting sbatch command, like with the QQ plot in "gwas.plotter.sh". If the data generated is used in multiple commands, like with the Manhattan plots generated in "gwas.plotter.sh" then the data generation will need to stay seperate (although it could still be turned into an sbatch command regardless and turned into a dependancy for the Manhattan plots).
Any part of a script that generates ".sh" files to queue them with sbatch after generating some data neccesary to run these ".sh" files could include generating said data into the ".sh" files themselves. For example:
Would become something like:
This should speed things up by making it so that generating the neccesary data becomes part of the sbatch commands, and thus can run at the same time as other similar commands, instead of stopping the script dead in its tracks until the data is generated.
WARNING: This approach will only work if the data generated is used in a single resulting sbatch command, like with the QQ plot in "gwas.plotter.sh". If the data generated is used in multiple commands, like with the Manhattan plots generated in "gwas.plotter.sh" then the data generation will need to stay seperate (although it could still be turned into an sbatch command regardless and turned into a dependancy for the Manhattan plots).