Skip to content

Instantly share code, notes, and snippets.

View Honchkrow's full-sized avatar
🎯
Focusing

Honchkrow Honchkrow

🎯
Focusing
View GitHub Profile
@Honchkrow
Honchkrow / bam_merge.sh
Created January 10, 2024 07:57
Merge multiple bam file (avoid too many open files error)
#!/bin/bash
# Directory containing all sorted files
sorted_files_directory="/home/zw/Data/WGBS_HCC_cfDNA/sorted"
# Name of the final merged bam file
final_bam_file="merged.bam"
# Temporary directory for storing intermediate merged files
temp_directory="/home/zw/Data/WGBS_HCC_cfDNA/temp"