Skip to content

Instantly share code, notes, and snippets.

@davetang
Created June 16, 2017 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davetang/7874d065ad0f7f268f9b2aba7b06e38b to your computer and use it in GitHub Desktop.
Save davetang/7874d065ad0f7f268f9b2aba7b06e38b to your computer and use it in GitHub Desktop.
#!/bin/bash
if type -P gemini > /dev/null
then
for SEVERITY in HIGH MED LOW; do
gemini query -q "select impact_so, count(impact_so) from variants where impact_severity == \"$SEVERITY\" group by impact_so order by count(impact_so)" --header *.db > $SEVERITY.tsv
plot_gemini.R $SEVERITY.tsv
rm -f $SEVERITY.tsv
done
gemini query -q "select impact_so, count(impact_so) from variants group by impact_so order by count(impact_so)" --header *.db > ALL.tsv
plot_gemini.R ALL.tsv
rm -f ALL.tsv
gemini query -q 'select sub_type, count(sub_type) from variants group by sub_type order by count(sub_type)' --header *.db > TYPE.tsv
plot_gemini.R TYPE.tsv
rm -f TYPE.tsv
else
echo Could not find gemini
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment