Skip to main content

Brainglobe array batch script file creation

Using the following function will write an array job file and will also create a file called commands.txt with a list of all the commands that will be run when the array script is launched.

Its probably important not to edit this file while the job is running.

Existing output directories are skipped.

Rawdata directory is assumed to be in NIU neuroblueprint format: https://neuroblueprint.neuroinformatics.dev/latest/specification.html

probably the only things that matter are:

  • rawdata folder contains a folder for each mouse
  • derivatives data is the same as the rawdata folder but with /rawdata/ replaced by /derivatives/ (changing this might break things)
  • whole brain images can be kept in a different location to the "rawdata" and this should work as long as the mouse folder names match..

Go to hpc_scripts/slurm_config and set the parameters according to your need. Make sure to edit the email to be your email

slurm_params = {
    "time_limit": "3-0:0", # 3 days, 0 hours, 0 minutes
    "n_jobs": 10,
    "n_jobs_at_a_time": 4,
    "user_email": "",
    "memory_limit": 60,

}

Look in hpc_scripts/brainglobe/brainreg_array_job_constructor.py and edit the arguments in the main() function. Also the paths to the data should be changed to yours.


def main():
    atlas = "allen_mouse_10um"
    overwrite_existing=False
    rawdata_directory = Path("/path/to/rawdata/")   
    serial2p_directory_raw = Path(""/path/to/whole_brains/")
    array_job_outpath=""/path/to/batch_scripts/" 


Running scripts

To run scripts you should submit jobs via slurm. For this you will need to have your python code installed remotely and you will need a batch script, written in bash, that will be used to call jobs on the HPC.

First SSH to the swc network.

ssh user@ssh.swc.ucl.ac.uk

SSH again to the hpc.

ssh user@hpc-gw2

Then call the sbatch command on the batch script file.

sbatch /path/to/batch_script.sh

Metadata

Release files for hpc-scripts 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hpc-scripts 0.1.0
File Size Uploaded Provenance Actions
hpc_scripts-0.1.0.tar.gz 8.0 kB Without provenance Details for hpc_scripts-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hpc-scripts 0.1.0
File Interpreter ABI Platform Actions
hpc_scripts-0.1.0-py3-none-any.whl Python 3 none any Details for hpc_scripts-0.1.0-py3-none-any.whl

Total release size: 18.4 kB

Release files / hpc_scripts-0.1.0.tar.gz

Download URL hpc_scripts-0.1.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0044e1a9d78fdaf40a99d3c88fc06c9b031d68bcd563f197ccb7e5aadbbc25ab
BLAKE2b-256 checksum
How to use checksums
8f4f601e39a354013f3e5f60de2c2fba3b13907271254c00cc2690c49ccd407a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.0

Release files / hpc_scripts-0.1.0-py3-none-any.whl

Download URL hpc_scripts-0.1.0-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b25b0f9127a4a2680ad30b9e642534ac89283a449ecb672ddc9c1db98b6ae65
BLAKE2b-256 checksum
How to use checksums
7893a64264a5db7239bc9639d626ff4a1ba46938950219b17166380821b10010
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.0

Security for hpc-scripts 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page