Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T22:20:51.273Z
Answers.LastActivityDate: 2017-08-29T22:20:51.273Z
Answers.UserDisplayName: aechchiki
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-31T15:57:50.230Z
Answers.Text: 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?
Answers.UserDisplayName: Chris_Rands
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-31T16:06:07.737Z
Answers.Text: I have used it, following the advice found on the mummer manual: http://mummer.sourceforge.net/manual/#identifyingrepeats
Answers.UserDisplayName: mgalardini
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-31T16:09:21.713Z
Answers.Text: 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?
Answers.UserDisplayName: Chris_Rands
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-31T16:19:00.810Z
Answers.Text: 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.
Answers.UserDisplayName: mgalardini
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2017-08-24T13:53:40.627Z
Answers.LastActivityDate: 2020-09-07T15:40:28.573Z
Answers.LastEditDate: 2020-09-07T15:40:28.573Z
Answers.UserDisplayName: mgalardini
Body: <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>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-24T15:38:57.130Z
Comments.Text: `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
Comments.UserDisplayName: Chris_Rands
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-25T10:56:03.507Z
Comments.Text: "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.
Comments.UserDisplayName: user172818
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-25T15:00:48.247Z
Comments.Text: @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.
Comments.UserDisplayName: Titouan Bougouin-Laessle
Tags: <genome><repeat-elements><sequence-analysis>
Title: Is it wise to use RepeatMasker on prokaryotes?
ThreadText: # 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**: @username_2 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](http://mummer.sourceforge.net/) and mask them using [bedtools](http://bedtools.readthedocs.io/en/latest/).
  
  ```
  # 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](http://mummer.sourceforge.net/manual/#identifyingrepeats) and [bedtools maskfasta](http://bedtools.readthedocs.io/en/latest/content/tools/maskfasta.html) 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).
  
  
  ---
  
  