I need to automatize a command line software (pvacseq tools) where I need the 12th column of the row that contains "CHROM" of each file to be a parameter, this is what I have thought:
for i in *.vcf ; do pvacseq run \
$i \
awk'/CHROM/{print $12}' ${i}\
HLA-A*02:01,HLA-B*35:01,DRB1*11:01 \
MHCflurry MHCnuggetsI MHCnuggetsII NNalign NetMHC PickPocket SMM SMMPMBEC SMMalign \
"${i%%_vep*}_pvac-result" ; done
The problem seems that with each space of the awk
command, pvacseq unserstands that a new option It's been introduced.
So I guess what I need is a way of automatizing the extraction of that column in a single command without spaces or a way for the program to understand that the awk command is a single command even thought if It has spaces.
About the replication of the problem I don't know how to approach It since installing pvaseq can be complicated.