zenity interface for vcffilterjdk/jvarkit https://www.biostars.org/p/296145/ zenity gui
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
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 | |
fi | |
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