Make gap in Genomes

I want to know how you align genomes with reference and how make gaps in genomes with character - until the number of nucleotides in the genomes equals the reference? Only you make gaps beginning and the end of the genomes?
I open results/masked.fasta and I see that some genomes have - in the middle.
I only know one one function in biopython called Pairwise2 that can do this but using this is very time consuming.I am curious to know how you make gaps in genomes for align with refrence?

Hi @Mahan.iz. We are using nextalign to align genomes to reference for our main nCoV runs, in combination with custom masking of certain sites.