cibrrig.run_sasquatch ===================== .. py:module:: cibrrig.run_sasquatch .. autoapi-nested-parse:: Need: 1) Local run path 2) Sasquatch directory 3) active ALF target 4) Archive ALF target Steps: 1) Compress local 2) Backup to Baker 3) Copy to Sasquatch 4) Remove local 5) Submit slurm job 5) Move to helens Attributes ---------- .. autoapisummary:: cibrrig.run_sasquatch.SASQUATCH_WORKING_DIR cibrrig.run_sasquatch.BAKER_DEST cibrrig.run_sasquatch.BAKER_DEST_RSS cibrrig.run_sasquatch.HELENS_DEST cibrrig.run_sasquatch.job_params Functions --------- .. autoapisummary:: cibrrig.run_sasquatch.gen_sbatch_script cibrrig.run_sasquatch.gen_tarball_script cibrrig.run_sasquatch.remove_empty_folders cibrrig.run_sasquatch.main cibrrig.run_sasquatch.from_NPX cibrrig.run_sasquatch.from_baker Module Contents --------------- .. py:data:: SASQUATCH_WORKING_DIR .. py:data:: BAKER_DEST .. py:data:: BAKER_DEST_RSS .. py:data:: HELENS_DEST .. py:data:: job_params .. py:function:: gen_sbatch_script(job_params: dict, run_folder: pathlib.Path, helens_dest: pathlib.Path | None = None, baker_dest_rss: pathlib.Path | None = None, opto_flag=True, QC_flag=True) -> str Generate SLURM batch script as a string. :param job_params: Dictionary containing job parameters. :type job_params: dict :param run_folder: Path to the run folder on the remote server. :type run_folder: Path :param helens_dest: Path to the destination folder on Helen's server. :type helens_dest: Path :param baker_dest_rss: Path to the destination folder on Baker's RSS server. :type baker_dest_rss: Path :returns: SLURM batch script as a string. :rtype: str .. py:function:: gen_tarball_script(run_folder: pathlib.Path) -> str Generate SLURM batch script as a string. :param run_folder: Path to the run folder on the remote server. :type run_folder: Path :returns: SLURM batch script as a string. :rtype: str .. py:function:: remove_empty_folders(root_dir) .. py:function:: main() .. py:function:: from_NPX(local_run_path, sasquatch_working_dir=SASQUATCH_WORKING_DIR, helens_dest=HELENS_DEST, baker_dest_rss=BAKER_DEST_RSS, opto_flag=True, QC_flag=True) Run the pipeline on sasquatch from the acquisition computer using SSH commands :param local_run_path: Path to the local run directory. :type local_run_path: Path :param sasquatch_working_dir: Path to sasquatch working directory. Defaults to SASQUATCH_WORKING_DIR. :type sasquatch_working_dir: Path, optional :param helens_dest: Path to Helen's destination directory. Defaults to HELENS_DEST. :type helens_dest: Path, optional :param baker_dest_rss: Path to Baker's RSS destination directory. Defaults to BAKER_DEST_RSS. :type baker_dest_rss: Path, optional :param opto_flag: Whether to remove opto artifact. Defaults to True. :type opto_flag: bool, optional :param QC_flag: Whether to run ephys QC. Defaults to True. :type QC_flag: bool, optional :returns: None :raises FileNotFoundError: If the local run path does not exist. .. py:function:: from_baker(run_src, sasquatch_working_dir=SASQUATCH_WORKING_DIR, helens_dest=HELENS_DEST, opto=True, qc=True) Run the pipeline on sasquatch from data already on baker. Must be run from the login node. This script is accessed by the entry point `pipeline_hpc` after installing cibrrig in a conda environment. e.g.: pipeline_hpc /data/rss/baker/ramirez_j/ramirezlab/alf_data_repo/ramirez/Subjects/m2025-01 Best practice is to create a tmux session on login node since you will move large files, activate iblenv, then run this :param run_src: Source run path, e.g. '/data/rss/baker/ramirez_j/ramirezlab/alf_data_repo/ramirez/Subjects/m2025-01' :type run_src: str :param sasquatch_working_dir: Path to sasquatch working directory. Defaults to SASQUATCH_WORKING_DIR. :type sasquatch_working_dir: Path, optional :param helens_dest: Path to Helen's destination directory. Defaults to HELENS_DEST. :type helens_dest: Path, optional :param opto_flag: Whether to remove opto artifact. Defaults to True. :type opto_flag: bool, optional :param QC_flag: Whether to run ephys QC. Defaults to True. :type QC_flag: bool, optional :raises FileNotFoundError: If the baker path does not exist.