When saving a file to vcf format for the first time, the code downloads the fasta files in the resources/fasta folder. I noticed that this process was taking a long time, even with the parallelize=True option pass to the SNPs class. Checking the code for the Writer class, I've discovered that the _write_vcf method was responsible for calling another method, which in turn, call other functions to download the reference files.
With this little change, I brought the Parallelizer from the SNPs class to the Writer and significantly improved download times.
When saving a file to vcf format for the first time, the code downloads the fasta files in the
resources/fasta
folder. I noticed that this process was taking a long time, even with theparallelize=True
option pass to theSNPs
class. Checking the code for theWriter
class, I've discovered that the_write_vcf
method was responsible for calling another method, which in turn, call other functions to download the reference files.With this little change, I brought the
Parallelizer
from theSNPs
class to the Writer and significantly improved download times.