ugm6hr
September 9th, 2012, 06:05 PM
I'm writing a simple (-ish) bash script to automate variant annotation for genetic sequencing data.
I need to put a variable within quotation marks - see below.
gatkname=$vcfname".gatk"
gatktable="g"$vcfname
vtools select variant --samples 'sample_name="$gatkname"' -t $gatktable
Just to confirm, the entries work when done manually:
vtools select variant --samples 'sample_name = "20AA02205.gatk"' -t g20AA02205
I can't find any way for the variable to be recognised as text within quotation marks. I'm sure this must be easy - but googling hasn't helped.
I need to put a variable within quotation marks - see below.
gatkname=$vcfname".gatk"
gatktable="g"$vcfname
vtools select variant --samples 'sample_name="$gatkname"' -t $gatktable
Just to confirm, the entries work when done manually:
vtools select variant --samples 'sample_name = "20AA02205.gatk"' -t g20AA02205
I can't find any way for the variable to be recognised as text within quotation marks. I'm sure this must be easy - but googling hasn't helped.