# Make gap in Genomes

**URL:** <https://nextstrain.discourse.group/t/make-gap-in-genomes/497>\
**Category:** Help and Getting Started\
**Created:** [April 25, 2021, 1:21am UTC](https://nextstrain.discourse.group/t/make-gap-in-genomes/497 "2021-04-25T01:21:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahan.iz](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@Mahan.iz](https://nextstrain.discourse.group/u/Mahan.iz)\
**Post date:** [April 25, 2021, 1:21am UTC](https://nextstrain.discourse.group/t/make-gap-in-genomes/497/1 "2021-04-25T01:21:55Z")

</div>

Hi  
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?

---

<div class="post-metadata">

**Author:** ![james](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/james/32/11_2.png) [@james](https://nextstrain.discourse.group/u/james)\
**Post date:** [April 25, 2021, 10:59pm UTC](https://nextstrain.discourse.group/t/make-gap-in-genomes/497/2 "2021-04-25T22:59:17Z")

</div>

Hi @Mahan.iz. We are using [nextalign](https://github.com/nextstrain/nextclade) to align genomes to reference for our main nCoV runs, in combination with [custom masking of certain sites](https://github.com/nextstrain/ncov/blob/master/workflow/snakemake_rules/main_workflow.smk#L147-L177).
