Genexus .bam File Transfer to GCP
NOTE THAT THE GCP LINK WILL CHANGE. THIS WILL BE UPDATED TO REFLECT THE CHANGES WHEN THE NEW LINK IS ANNOUNCED.
The NYWWS.sh script transfers the processed bam files (*.merged.bam.ptrim.bam) to the NYWWS GCP at Syracuse for analysis.
The process includes the following:
- SSH connection to the local Genexus instrument
- Searching the instrument for the most recent processed bam files
- Copying these files into /tmp/nywws/
- Renaming the files according to the ID specified when the Genexus run was initiated (i.e. the sample ID)
- Uploading the processed bam files under the sample ID name in the correct facility location folder
- Logging all data into a genexus.log file
The Wiki includes instructions for Ubuntu installation, Manual file retrieval, SSH key creation, and WSL data retrieval and transfer. These are alternatives to using the script.
- SSH key (private and public)
- Instrument IP address
- Python3.8+
- Google Cloud SDK - NOTE: install the Debian/Ubuntu version for WSL, NOT the Windows version.
- Bash 4.0+ - NOTE: if running macOS with Bash v3, Conda environment with Bash v4 or higher is required
To download the script, navigate to NYWWS.sh and click on 'Raw' to view the raw script. Right-click on the page once it has loaded and select 'Save as...' to save the script. Make sure it is in a place you can navigate to from WSL. It is recommended to move the file to your home directory.
- Ex. if NYWWS.sh is saved to your desktop, you can move it to your home directory with the following:
cd
mv /mnt/c/Users/[NAME]/Desktop/NYWWS.sh .
To run the script:
./NYWWS.sh
Prompts will appear that you will answer.
This can be downloaded the same way as NYWWS.sh, but is run with three (3) arguments: path to ssh key, instrument IP, and facility. It can be run as follows:
./sample_check.sh [/path/to/shh/key] [instrument IP address] [facility]
This is a one-time script to run for QC purposes.
This script can be run in a cronjob or standalone to bypass prompts (not recommended). It relies on a file named "genexus_default.txt", which is the credentials files generated by NYWWS.sh (i.e. {name}_default.txt). It takes the mandatory argument of the number of days since the last run. To run this every day, '-1' will check for runs that completed one day ago.
./nywws_cron_upload.sh -1