<p>From your comment, it seems that masking regions are not your priority, but you would rather find them (correct me if I am wrong):</p>

<blockquote>
  <p>not interested in masking, but really finding any type of repeats, from low complexity regions to small repeats</p>
</blockquote>

<p>To find these regions, you can try <a href="http://www.cbcb.umd.edu/software/RepeatFinder/" rel="nofollow noreferrer">RepeatFinder</a>. From their <a href="http://www.cbcb.umd.edu/software/RepeatFinder/RepeatFinderReprint.pdf" rel="nofollow noreferrer">paper</a>, it seems that is suitable for bacterial genomes too. It also seems to be faster because based on suffix tree data structure instead of working with string-matching algorithm (as in RepeatMasker).  </p>

CC BY-SA 3.0
2017-08-29T22:20:51.273Z
2017-08-29T22:20:51.273Z
aechchiki
<p>If I understood correctly your question, you want to mask those regions in a (FASTA?) genome. I think you could identify those regions using <a href="http://mummer.sourceforge.net/" rel="nofollow noreferrer">mummer</a> and mask them using <a href="http://bedtools.readthedocs.io/en/latest/" rel="nofollow noreferrer">bedtools</a>.</p>
<pre><code># align genome against itself
nucmer --maxmatch --nosimplify genome.fasta genome.fasta

# select repeats and convert the corrdinates to bed format
show-coords -r -T -H out.delta | awk '{if (<span class="math-container">$1 != $</span>3 &amp;&amp; <span class="math-container">$2 != $</span>4) print <span class="math-container">$0}' | awk '{print $8"\t"$1"\t"$</span>2}' &gt; repeats.bed

# mask those bases with bedtools
bedtools maskfasta -fi genome.fasta -bed repeats.bed -fo masked.fasta
</code></pre>
<p>Have a look at <a href="http://mummer.sourceforge.net/manual/#identifyingrepeats" rel="nofollow noreferrer">nucmer</a> and <a href="http://bedtools.readthedocs.io/en/latest/content/tools/maskfasta.html" rel="nofollow noreferrer">bedtools maskfasta</a> options to fine-tune your analysis.</p>

CC BY-SA 3.0
2017-08-31T15:57:50.230Z
This approach may work, but it seems quite an un-orthodox way to mask repeats, have you used this or seen people use it for bacterial genomes?
Chris_Rands
CC BY-SA 3.0
2017-08-31T16:06:07.737Z
I have used it, following the advice found on the mummer manual: http://mummer.sourceforge.net/manual/#identifyingrepeats
mgalardini
CC BY-SA 3.0
2017-08-31T16:09:21.713Z
thanks, you used it for prokaryotes? they says in the docs it's not really designed for that and only identifies a limited number of repeat types, so I assumed this was not really advised?
Chris_Rands
CC BY-SA 3.0
2017-08-31T16:19:00.810Z
yes, I did use it on E. coli K-12, finding 1324 repeats. I never tried other methods so I'm unsure how it compares with those. It would definitely be interesting. I wouldn't say the authors of mummer discourage you to use nucmer for finding repeats, just that it wasn't specifically made for that purpose.
mgalardini
CC BY-SA 4.0
2017-08-24T13:53:40.627Z
2020-09-07T15:40:28.573Z
2020-09-07T15:40:28.573Z
mgalardini
<p>I'm looking for a way to identify low complexity regions and other repeats in the genome of <em>Escherichia coli</em>. I found that RepeatMasker may be used for example when drafting genomes of prokaryotes (<a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3587949/" rel="nofollow noreferrer"><em>E. coli</em> example</a>). But RepeatMasker works on a limited dataset of species, neither of them being prokaryotes. By default, when running RepeatMasker, if no species is specified, it will compare with homo sapiens data. </p>

<p>This seems rather inadequate, but the most relevent alternative, <a href="https://sites.google.com/site/prapsoftware/" rel="nofollow noreferrer">PRAP</a>, requires a "dead" tool (VisCoSe, by Michael Spitzer).</p>

<ol>
<li>Is it still wise to to use RepeatMasker on <em>Escherichia coli</em>?</li>
<li>If yes, which settings would maximise relevance ?</li>
</ol>

CC BY-SA 3.0
2017-08-24T15:38:57.130Z
`RepeatMasker` isn't designed for use with prokaryotic genomes.  Nonetheless, it performs a contamination check for *E. coli* so you could play around with the `-is_only` flag to try and detect bacterial repeats, probably better to find an alternative tool or repeat library though
Chris_Rands
CC BY-SA 3.0
2017-08-25T10:56:03.507Z
"Repeats" have different meanings. What types of repeats to mask are highly dependent on the downstream analyses – in fact, repeat masking is often discouraged. Explaining why you want to mask repeats would give you a more accurate answer.
user172818
CC BY-SA 3.0
2017-08-25T15:00:48.247Z
@user172818 In fact, I am not interested in masking, but really *finding* any type of repeats, from low complexity regions to small repeats, as can be obtained using `RepeatMasker`.
I would then use these repeats as (sort of) an explanatory variable.
Titouan Bougouin-Laessle
<genome><repeat-elements><sequence-analysis>
Is it wise to use RepeatMasker on prokaryotes?
# Is it wise to use RepeatMasker on prokaryotes?

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

I'm looking for a way to identify low complexity regions and other repeats in the genome of *Escherichia coli*. I found that RepeatMasker may be used for example when drafting genomes of prokaryotes ([*E. coli* example](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3587949/)). But RepeatMasker works on a limited dataset of species, neither of them being prokaryotes. By default, when running RepeatMasker, if no species is specified, it will compare with homo sapiens data.

This seems rather inadequate, but the most relevent alternative, [PRAP](https://sites.google.com/site/prapsoftware/), requires a "dead" tool (VisCoSe, by Michael Spitzer).

1. Is it still wise to to use RepeatMasker on *Escherichia coli*?
2. If yes, which settings would maximise relevance ?

**Tags:** genome, repeat-elements, sequence-analysis
> **Comments:**
> **username_1**: `RepeatMasker` isn't designed for use with prokaryotic genomes.  Nonetheless, it performs a contamination check for *E. coli* so you could play around with the `-is_only` flag to try and detect bacterial repeats, probably better to find an alternative tool or repeat library though  
> **username_2**: "Repeats" have different meanings. What types of repeats to mask are highly dependent on the downstream analyses – in fact, repeat masking is often discouraged. Explaining why you want to mask repeats would give you a more accurate answer.  
> **username_0**: @user172818 In fact, I am not interested in masking, but really *finding* any type of repeats, from low complexity regions to small repeats, as can be obtained using `RepeatMasker`. I would then use these repeats as (sort of) an explanatory variable.  

---

## 2 answers

### Answer by username_4 on 2017-08-24. Score: 5 | Accepted answer

If I understood correctly your question, you want to mask those regions in a (FASTA?) genome. I think you could identify those regions using mummer and mask them using bedtools.
# align genome against itself
nucmer --maxmatch --nosimplify genome.fasta genome.fasta

# select repeats and convert the corrdinates to bed format
show-coords -r -T -H out.delta | awk '{if ($1 != $3 && $2 != $4) print $0}' | awk '{print $8"\t"$1"\t"$2}' > repeats.bed

# mask those bases with bedtools
bedtools maskfasta -fi genome.fasta -bed repeats.bed -fo masked.fasta

Have a look at nucmer and bedtools maskfasta options to fine-tune your analysis.

> **Comments:**
> **username_1**: This approach may work, but it seems quite an un-orthodox way to mask repeats, have you used this or seen people use it for bacterial genomes?  
> **username_4**: I have used it, following the advice found on the mummer manual: http://mummer.sourceforge.net/manual/#identifyingrepeats  
> **username_1**: thanks, you used it for prokaryotes? they says in the docs it's not really designed for that and only identifies a limited number of repeat types, so I assumed this was not really advised?  
> **username_4**: yes, I did use it on E. coli K-12, finding 1324 repeats. I never tried other methods so I'm unsure how it compares with those. It would definitely be interesting. I wouldn't say the authors of mummer discourage you to use nucmer for finding repeats, just that it wasn't specifically made for that purpose.  

---

### Answer by username_3 on 2017-08-29. Score: 1

From your comment, it seems that masking regions are not your priority, but you would rather find them (correct me if I am wrong):

> not interested in masking, but really finding any type of repeats, from low complexity regions to small repeats

To find these regions, you can try [RepeatFinder](http://www.cbcb.umd.edu/software/RepeatFinder/). From their [paper](http://www.cbcb.umd.edu/software/RepeatFinder/RepeatFinderReprint.pdf), it seems that is suitable for bacterial genomes too. It also seems to be faster because based on suffix tree data structure instead of working with string-matching algorithm (as in RepeatMasker).


---

