Python code solution was sugested, but bash fixes are still very welcomed!
Hi, I am running ANNOVAR with following code:
perl $TABL_ANN_DIR $READS_INPUT_DIR/$folder/${name}_unfiltered.annovar.ann.avinput $DATASETS_DIR --buildver $GENOME_VERSION --outfile ${name}.annovar.ann --remove --protocol $GENOME_SOURSE,$CLIMVAR_VERSION,$dbSNP,$COSMIC_COD,$COSMIC_NONCOD,$HGP --operation g,f,f,f,f,f --nastring . --vcfinput --thread $THREAD
The input file is .avinput, but anyway it starts not from table_annovar.pl, but convert2annovar.pl and can not find it
sh: 1: convert2annovar.pl: not found
Obviously, because I am working in another directory then where this file is. I copied this file to the working dir, but it didn`t help.
I know I can use annotate_variation.pl with the same purpose instead of table_annovar.pl, but I realy need the output file to be VCF and annotate_variation.pl dose not have this argument, as table_annovar.pl does (--vcfinput).
May be anybody can suggest a solution? Thanks!
Does ANNOVAR output VCF file?
Also, you're giving
.avinput
file with--vcfinput
parameter which doesn't seem right.Thank you for your comment!
I am just wondering if ANNOVAR has any option to output a VCF file? Because I haven't seen such option.
If you really need a VCF file you might need to look into another tool like Ensembl VEP.
Error is probably because the script is not your path. Try adding the directory of annovar to your path.
As far as ANNOVAR documentation states, VCF output is available.
We can read it on this page https://annovar.openbioinformatics.org/en/latest/user-guide/startup/
You mean, to add ANNOVAR path to perl-script file? If yes, then it is there.
I mean the
PATH
variable. Which should be something like thisexport PATH="$STORAGE_DIR/Tools/ANNOVAR/annovar/table_annovar.pl:$PATH"
You can add this to your shell config file.
Since documentation says you can get VCF output if you input a VCF file. So instead of
avinput
maybe you should call table annovar with VCF file directly? This way you won't need any further intermediate processing.Thank you for your suggestion! I added to the PATH table_annovar.pl and convert2annovar.pl. Unfortunatly, fort now, error still exists (convert2annovar.pl: not found).
Oh, I made a mistake in previous reply. Could you try it like so?
Thank you for concerning. Unfortunately, it did not work out either.
To solve the problem I wrote a python code to transform tab-deliminated files from ANNOVAR output to vcf-like files.
First run ANNOVAR in filter mode in bash with command
Then use python
For example input:
Code:
output:
So now this file could be used with cyvcf2 module in python to analize VCF files.