-
Notifications
You must be signed in to change notification settings - Fork 0
SMaHT Kopah Quickstart
⚠️ Examples use Youngjun Kwon's uwnetid (yjkwon5) - replace yjkwon5 with your uwnetid.
- Working effectively on hyak
- Install rclone
- Configure rclone
- Interface to download Kopah data
- List content on Kopah
- Create your first bucket; add content
- Copy data from Kopah to your cwd
- Copy files and folders to Kopah
- Pipe data directly into Kopah
- Stream data from Kopah
- Copying symlinks
- Delete files and folders
- List all buckets
- Check bucket or dir size
- Create a presigned URL
- Mount directories
- Space allocations
-
Your home directory is tiny by today's standards, and you will run into problems. Take the time to set up a real workspace by following these instructions. but replace the directory shown in:
mkdir -p /mmfs1/gscratch/stergachislab/${USER}with our smaht directory:mkdir -p /mmfs1/gscratch/smaht/${USER}. -
Install conda (miniconda3). Follow the installer instructions for Linux. When you select the install location, choose somewhere other than your home directory (the default). I would choose: /mmfs1/gscratch/smaht/${USER}/tools/miniconda3
conda create -n rclone
conda activate rclone
conda install conda-forge::rclone
Create ~/.config/rclone/rclone.conf
[k_smaht]
type = s3
provider = Ceph
access_key_id = <find key in ~/kopah_smaht>
secret_access_key = <find key in ~/kopah_smaht>
endpoint = https://s3.kopah.uw.edu
[k_smaht_reader]
type = s3
provider = Ceph
access_key_id = <find key in ~/kopah_smaht_reader>
secret_access_key = <find key in ~/kopah_smaht_reader>
endpoint = https://s3.kopah.uw.edu
💡 k_ prefix helps you remember these are Kopah keys.
💡 You can rename k_smaht_reader to k_sr or something else short if you prefer.
💡 You may not yet have ~/kopah_smaht_reader but we can get those for you.
Find and download data: https://s3.kopah.uw.edu/smaht/index.html
rclone lsf k_smaht:smaht/
-
rclone lsf— lists files and directories at the given level (non-recursive) -
rclone lsd— lists only directories at the given level (non-recursive) -
rclone ls— recursively lists all files starting at the given level, including file sizes
(using yjkwon5 as our example person)
echo "hello world" > hello.txt
rclone copy hello.txt k_smaht:smaht/analysis/yjkwon5/
rclone ls k_smaht:smaht/analysis/yjkwon5
rm -f hello.txt # verify nothing local
rclone copy k_smaht:smaht/analysis/yjkwon5/hello.txt .
Copy bam files, dereferenced symlinks to bam files, or entire folders to Kopah
rclone copy . k_smaht:smaht/analysis/yjkwon5/proj1/ --include "*.bam"
rclone copy -L . k_smaht:smaht/analysis/yjkwon5/proj2/dereferenced-symlinks/ --include "*.bam"
rclone copy myfolder/ k_smaht:smaht/analysis/yjkwon5/proj3/
💡 add --progress --stats=10s to end of copy command to see upload/download progress.
You can pipe data directly to Kopah without creating a local file.
echo "hello world!" | rclone rcat k_smaht:smaht/analysis/yjkwon5/proj1/ok.txt
./my-script.sh input.bam | rclone rcat k_smaht:smaht/analysis/yjkwon5/proj2/output.bam
rclone cat k_smaht:smaht/analysis/yjkwon5/proj1/ok.txt # prints hello world!
rclone cat k_smaht:smaht/analysis/yjkwon5/proj2/output.bam | ft validate
Upload actual (dereferenced) files:
rclone copy -L path-to-hyak-symlink k_smaht:smaht/analysis/yjkwon5/my-fancy-directory/
Upload as pseudo-symlinks:
rclone copy path-to-hyak-symlink k_smaht:smaht/analysis/yjkwon5/dir-with-symlink-files/ --links
Delete one file:
rclone delete k_smaht:smaht/analysis/yjkwon5/subfolder1/bye.txt
Delete recursively:
rclone purge k_smaht:smaht/analysis/yjkwon5/subfolder2
rclone lsd k_smaht:
rclone size k_smaht:smaht/
rclone size k_smaht:smaht/analysis/yjkwon5/
Create a hyperlink to private data that expires:
rclone link k_smaht:smaht/data/hic/SMaHT_001/lib_208871_sample_1676947_S1_L008_R2_001.fastq.gz
For a whole folder:
tar -czf everything.tgz <my-directory>
rclone copy everything.tgz k_smaht:smaht/analysis/yjkwon5/proj1/
rm everything.tgz # local
rclone link k_smaht:smaht/analysis/yjkwon5/proj1/everything.tgz
Put in your ~/.bashrc (then start a new terminal)
export PATH=${PATH}:/mmfs1/gscratch/smaht/bin
Mount or unmount Kopah smaht bucket (in cwd):
mount-kopah
unmount-kopah
You can add a directory to specify where to mount/unmount:
mount-kopah proj5
unmount-kopah proj5
Capacity can increase.
| User | Quota | Used |
|---|---|---|
| smaht | 230TB/209TiB | 125TiB |