#!/bin/bash

# Input and output file names
input_file="AlphaMissense_hg38.tsv.gz"
output_file="AlphaMissense_hg38_modified.tsv.gz"

# Remove the first three rows, then modify the header, and compress the result
bgzip -dc "$input_file" | \
tail -n +4 | \
awk 'BEGIN { OFS = "\t" } NR==1 { print tolower($0) } NR>1 { print $0 }' | \
bgzip > "$output_file"

tabix -s 1 -b 2 -e 2 $output_file

