In the bash
menu below if the variant that is inputted is in the format NM_004004.3:c.274G>T
the below works perfectly. My question is if the variant inputted is NM_004004.3:-c.274G>T or NM_004004.3:+c.274G>T
then the code as is will throw an error due to a biological issue. Is it possible to to have variants that have either a -/+
in them skip the additional function and go straight to the nomenclature function? I apologize for any confusion I am not sure how to explain this, but basically if variants with a -/+
in them go to the additional function then they will error. I don't know if there can be a special case coded in or if there is a better way. Thank you :).
gjb2() {
printf "\n\n"
printf "What is the id of the patient getting GJB2 analysis : "; read id
printf "Please enter the coding variant the following is an example"
echo " c.274G>T"
printf "variant(s), use a comma between multiple: "; IFS="," read -a variant
[ -z "$id" ] && printf "\n No ID supplied. Leaving match function." && sleep 2 && return
[ "$id" = "end" ] && printf "\n Leaving match function." && sleep 2 && return
for ((i=0; i<${#variant[@]}; i++))
do printf "NM_004004.5:%s\n" ${variant[$i]} >> c:/Users/cmccabe/Desktop/Python27/out.txt
done
add2text ${id}.txt
additional
}
nomenclature() {
# run python NameChecker
printf "\n\n"
cd 'C:'
C:/Users/cmccabe/Desktop/Python27/python.exe C:/Users/cmccabe/Desktop/Python27/run_batch_job.py C:/Users/cmccabe/Desktop/Python27/out.txt C:/Users/cmccabe/Desktop/Python27/out_name.txt NameChecker
check
}