Skip to content

Instantly share code, notes, and snippets.



Last active Jan 31, 2018
What would you like to do?
zenity interface for vcffilterjdk/jvarkit zenity gui
set -e
code=$(mktemp --suffix .code -t tmp.XXXXXXXXXX)
function cleanup {
rm -vf "${code}"
trap cleanup EXIT
INVCF=$(zenity --file-selection --title="Select input VCF" --file-filter "*.vcf *.vcf.gz")
OUTVCF=$(zenity --save --confirm-overwrite --file-selection --title="Select output VCF" --file-filter "*.vcf *.vcf.gz")
if [ "${INVCF}" == "${OUTVCF}" ]; then
zenity --title="ERROR" --error --text="input same as output (${INVCF})"
exit -1
zenity --width=1000 --title="CODE" --entry --text="Java Code" --entry-text="return variant.getStart()%10==0;" > ${code}
## set the correct path
java -jar /set/the/path/to/vcffilterjdk.jar -o "${OUTVCF}" -f "${code}" ${INVCF}
zenity --title="DONE" --info --text="Done:${OUTVCF}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment