Skip to content

Instantly share code, notes, and snippets.

@cx0
Last active May 16, 2024 10:42
Show Gist options
  • Save cx0/937143a4a4101e6708d97e823b9098dd to your computer and use it in GitHub Desktop.
Save cx0/937143a4a4101e6708d97e823b9098dd to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
# ClinVar weekly updates: https://ftp.ncbi.nlm.nih.gov/pub/clinvar/tab_delimited/
# Download assembly-specific variant annotation (Release date: 2022-09-19)
wget https://ftp.ncbi.nlm.nih.gov/pub/clinvar/tab_delimited/variant_summary.txt.gz
awk '{print "\t"$0"\t"}' acmg.filtered.genes.list \|
rg -zf - variant_summary.txt.gz \|
rg 'GRCh38' \|
rg 'single nucleotide variant' \|
rg '\(p.' \|
cut -f 1,3,5,7 > clinvar_parsed.txt
# append header with the relevant columns
sed -i '.bak' '1s/^/\#AlleleID\tName\tGeneSymbol\tClinicalSignificance\'$'\n/g' clinvar_parsed.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment