I'm attempting to annotate my M. tuberculosis variant VCF files using SnpEff. The genome build I used for the variant calling was gi|559794742|gb|CP003248.2| and the error I get when running the code below is: EFF=(MODIFIER||||||||||1|ERROR_CHROMOSOME_NOT_FOUND). I attempted to change the name of the chromosome to match that of the genome build (H37RV) used by SnpEff but it did not work. here is the genome link from SnpEff.config ftp://ftp.sanger.ac.uk/pub/pathogens/Mycobacterium/tuberculosis.
I too attempted to change this to the link the the genome I used which returned the same error.
They way I got around that is to check the SnpEff file for the chromosome name it uses. Just gunzip the .bin file in the SnpEff data folder which matches your reference (they use the Ensembl naming, I believe you are looking for GCA_000005845.2). In my case the name of the chromosome was Chromosome. Then you can just run the below as a shell script and it will replace you reference name with the one SnpEff uses, then you can run SnpEff. Following that you can use the same code with the reverse sed argument and rename the chromosome correctly again. Alternatively you can rename the chromosome in the SnpEff file. Just make sure you are using the correct reference.
cd "folder with VCFs"
for f in $(ls *.vcf)
sed -i 's/gi|556503834|ref|NC_000913.3|/Chromosome/g' "$f"
echo "Processing $f"