<p>The use of lower/upper case letters and <code>N</code>/<code>n</code> letters in genomes sequences is not completely standardised and you should always check the specification of the resource you are using.</p>

<p>Lower case letters are most commonly used to represent “soft-masked sequences”, a convention popularised by <a href="http://www.repeatmasker.org/" rel="noreferrer">RepeatMasker</a>, where interspersed repeats (which covers transposons, retrotransposons and processed pseudogenes) and low complexity sequences are marked with lower case letters. Note that larger repeats, such as sizable tandem repeats, segmental duplications, and whole gene duplications are not generally masked.</p>

<p>However, there are other uses for lower/upper case letters, for example, <a href="http://www.ensembl.org/Help/View?id=155" rel="noreferrer">Ensembl have used</a> upper/lower case letters to represent exonic and intronic sequences respectively.</p>

<p><code>N</code> and <code>n</code> nucleotides may represent “hard masked sequences”, where interspersed repeats and low complexity sequences are replaced by <code>N</code>s. But <code>N</code>/<code>n</code>s may alternatively represent ambiguous nucleotides, indeed this is the <a href="https://en.wikipedia.org/wiki/Nucleic_acid_notation#IUPAC_notation" rel="noreferrer">IUPAC</a> specification.</p>

<p>Also note occasionally (although fortunately rarely) <code>X</code>/<code>x</code> is used to represent ambiguous nucleotides or “hard-masked sequences” too.</p>

CC BY-SA 3.0
2017-05-24T08:16:19.220Z
2017-05-24T08:16:19.220Z
Chris_Rands
<ol>
<li>Lower case nucleotides commonly denotes a <strong>soft</strong> masked sequences. How exactly the genome was masked you can find in FAQ of <a href="https://www.ncbi.nlm.nih.gov/genome/doc/ftpfaq/#masking" rel="nofollow noreferrer">NCBI</a>:</li>
</ol>

<blockquote>
  <p><strong>Are repetitive sequences in eukaryotic genomes masked?</strong></p>
  
  <p>Repetitive sequences in eukaryotic genome assembly sequence files, as
  identified by <a href="https://www.ncbi.nlm.nih.gov/pubmed/16287941" rel="nofollow noreferrer">WindowMasker</a>, have been masked to lower-case.</p>
  
  <p>The location and identity of repeats found by <a href="http://www.repeatmasker.org/" rel="nofollow noreferrer">RepeatMasker</a> are also
  provided in a separate file. These spans could be used to mask the
  genomic sequences if desired. Be aware, however, that many less
  studied organisms do not have good repeat libraries available for
  RepeatMasker to use.</p>
</blockquote>

<ol start="2">
<li><p>IMHO, low complexity regions are always more likely to be missassembled than high complexity sequences. However, this will be problem for non-model organisms. I would guess that the reliability of the softmasked regions of mouse genome will very high.</p></li>
<li><p>No idea, looks like an artefact.</p></li>
</ol>

<p><strong>An example of usage of the soft mask</strong></p>

<p>Mapping of sequence to reference usually starts with perfect matches of seeds (substrings) of the mapped reads and the reference sequence. Soft masked (low complexity) regions are not used for matches of seeds, but they are used only for the extension of the alignment if there was a seed in a neighbouring region. This application of softmasking applied to problem of long read assembly is described on this <a href="https://dazzlerblog.wordpress.com/2016/04/01/detecting-and-soft-masking-repeats/" rel="nofollow noreferrer">blog</a>.</p>

CC BY-SA 3.0
2017-05-24T12:29:31.210Z
2017-05-24T14:24:15.477Z
2017-05-24T14:24:15.477Z
Kamil S Jaron
<blockquote>
  <p>What does this soft masking actually mean?</p>
</blockquote>

<p>A lot of the sequence in genomes are repetitive. Human genome, for example, has (at least) two-third repetitive elements.[1]. </p>

<p>These repetitive elements are soft-masked by converting the upper case letters to lower case. An important use-case of these soft-masked bases will be in homology searches: An <code>atatatatatat</code> will tend to appear both in human and mouse genomes but is likely non-homologous.</p>

<blockquote>
  <p>How confident can I be about the sequence in these regions?</p>
</blockquote>

<p>As you can be about in non soft-masked based positions. Soft-masking is done after determining portions in the genome that are likely repetitive. There is no uncertainty whether a particular base is 'A' or 'G', just that it is part of a repeat and hence should be represented as an 'a'.</p>

<blockquote>
  <p>What does a lowercase n represent?</p>
</blockquote>

<p>UCSC uses <a href="https://tandem.bu.edu/trf/trfdesc.html" rel="noreferrer">Tandom Repeat Finder</a> and <a href="http://www.repeatmasker.org/" rel="noreferrer">RepeatMasker</a> for soft-masking potential repeats. NCBI most likely uses <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3045581/" rel="noreferrer">TANTAN</a>. 'N's represents no sequence information is available for that base. It being replaced by 'n' is likely an artifact of the repeat-masking software where it soft-masks an 'N' by an 'n' to indicate that portion of the genome is likely a repeat too.</p>

<p>[1] <a href="http://journals.plos.org/plosgenetics/article?id=10.1371/journal.pgen.1002384" rel="noreferrer">http://journals.plos.org/plosgenetics/article?id=10.1371/journal.pgen.1002384</a></p>

CC BY-SA 3.0
2017-05-25T17:04:07.280Z
Informative answer, but I think it's controversial to say the human genome is "(at least) two-third repetitive elements"; the P-clouds method you cite is quite permissive and half is a more commonly accepted figure. And soft-masking doesn't involve masking all repeats generally, just interspersed repeats and low complexity sequences. Also there is always uncertainty around base calling and assembly building, and more so for repetitive sequences, although mm10 is one of the best assemblies of course...
Chris_Rands
CC BY-SA 3.0
2017-05-24T06:01:32.763Z
2017-05-24T06:01:32.763Z
Saket Choudhary
<p>I am using a reference genome for mm10 mouse downloaded from <a href="https://www.ncbi.nlm.nih.gov/genome?term=mus%20musculus" rel="noreferrer">NCBI</a>, and would like to understand in greater detail the difference between lowercase and uppercase letters, which make up roughly equal parts of the genome. I understand that N is used for 'hard masking' (areas in the genome that could not be assembled) and lowercase letters for 'soft masking' in repeat regions.</p>

<ol>
<li>What does this soft masking actually mean? </li>
<li>How confident can I be about the sequence in these regions?</li>
<li>What does a lowercase n represent? </li>
</ol>

<fasta><genome>
Uppercase vs lowercase letters in reference genome
# Uppercase vs lowercase letters in reference genome

(Asked by: username_0 on 2017-05-24)

I am using a reference genome for mm10 mouse downloaded from [NCBI](https://www.ncbi.nlm.nih.gov/genome?term=mus%20musculus), and would like to understand in greater detail the difference between lowercase and uppercase letters, which make up roughly equal parts of the genome. I understand that N is used for 'hard masking' (areas in the genome that could not be assembled) and lowercase letters for 'soft masking' in repeat regions.

1. What does this soft masking actually mean?
2. How confident can I be about the sequence in these regions?
3. What does a lowercase n represent?

**Tags:** fasta, genome

---

## 3 answers

### Answer by username_3 on 2017-05-24. Score: 29 | Accepted answer

> What does this soft masking actually mean?

A lot of the sequence in genomes are repetitive. Human genome, for example, has (at least) two-third repetitive elements.[1].

These repetitive elements are soft-masked by converting the upper case letters to lower case. An important use-case of these soft-masked bases will be in homology searches: An `atatatatatat` will tend to appear both in human and mouse genomes but is likely non-homologous.

> How confident can I be about the sequence in these regions?

As you can be about in non soft-masked based positions. Soft-masking is done after determining portions in the genome that are likely repetitive. There is no uncertainty whether a particular base is 'A' or 'G', just that it is part of a repeat and hence should be represented as an 'a'.

> What does a lowercase n represent?

UCSC uses [Tandom Repeat Finder](https://tandem.bu.edu/trf/trfdesc.html) and [RepeatMasker](http://www.repeatmasker.org/) for soft-masking potential repeats. NCBI most likely uses [TANTAN](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3045581/). 'N's represents no sequence information is available for that base. It being replaced by 'n' is likely an artifact of the repeat-masking software where it soft-masks an 'N' by an 'n' to indicate that portion of the genome is likely a repeat too.

[1] <http://journals.plos.org/plosgenetics/article?id=10.1371/journal.pgen.1002384>

> **Comments:**
> **username_1**: Informative answer, but I think it's controversial to say the human genome is "(at least) two-third repetitive elements"; the P-clouds method you cite is quite permissive and half is a more commonly accepted figure. And soft-masking doesn't involve masking all repeats generally, just interspersed repeats and low complexity sequences. Also there is always uncertainty around base calling and assembly building, and more so for repetitive sequences, although mm10 is one of the best assemblies of course...  

---

### Answer by username_1 on 2017-05-24. Score: 14

The use of lower/upper case letters and `N`/`n` letters in genomes sequences is not completely standardised and you should always check the specification of the resource you are using.

Lower case letters are most commonly used to represent “soft-masked sequences”, a convention popularised by [RepeatMasker](http://www.repeatmasker.org/), where interspersed repeats (which covers transposons, retrotransposons and processed pseudogenes) and low complexity sequences are marked with lower case letters. Note that larger repeats, such as sizable tandem repeats, segmental duplications, and whole gene duplications are not generally masked.

However, there are other uses for lower/upper case letters, for example, [Ensembl have used](http://www.ensembl.org/Help/View?id=155) upper/lower case letters to represent exonic and intronic sequences respectively.

`N` and `n` nucleotides may represent “hard masked sequences”, where interspersed repeats and low complexity sequences are replaced by `N`s. But `N`/`n`s may alternatively represent ambiguous nucleotides, indeed this is the [IUPAC](https://en.wikipedia.org/wiki/Nucleic_acid_notation#IUPAC_notation) specification.

Also note occasionally (although fortunately rarely) `X`/`x` is used to represent ambiguous nucleotides or “hard-masked sequences” too.


---

### Answer by username_2 on 2017-05-24. Score: 4

1. Lower case nucleotides commonly denotes a **soft** masked sequences. How exactly the genome was masked you can find in FAQ of [NCBI](https://www.ncbi.nlm.nih.gov/genome/doc/ftpfaq/#masking):

> **Are repetitive sequences in eukaryotic genomes masked?**
>
> Repetitive sequences in eukaryotic genome assembly sequence files, as
> identified by [WindowMasker](https://www.ncbi.nlm.nih.gov/pubmed/16287941), have been masked to lower-case.
>
> The location and identity of repeats found by [RepeatMasker](http://www.repeatmasker.org/) are also
> provided in a separate file. These spans could be used to mask the
> genomic sequences if desired. Be aware, however, that many less
> studied organisms do not have good repeat libraries available for
> RepeatMasker to use.

2. IMHO, low complexity regions are always more likely to be missassembled than high complexity sequences. However, this will be problem for non-model organisms. I would guess that the reliability of the softmasked regions of mouse genome will very high.
3. No idea, looks like an artefact.

**An example of usage of the soft mask**

Mapping of sequence to reference usually starts with perfect matches of seeds (substrings) of the mapped reads and the reference sequence. Soft masked (low complexity) regions are not used for matches of seeds, but they are used only for the extension of the alignment if there was a seed in a neighbouring region. This application of softmasking applied to problem of long read assembly is described on this [blog](https://dazzlerblog.wordpress.com/2016/04/01/detecting-and-soft-masking-repeats/).


---

