Answers.Body: <p>This is the sort of thing that <a href="https://gitlab.com/mcfrith/last" rel="nofollow noreferrer">LAST</a> has been specifically designed to work well for:</p>
  <blockquote>
  <p>LAST is designed for moderately large data (e.g. genomes, DNA reads,
  proteomes). It's especially good at finding rearrangements and recombinations: we believe last-split does that more rigorously than anything else.</p>
  </blockquote>
  <p>Here's my usual approach for mapping with LAST:</p>
  <pre><code>lastdb -uRY4 -R01 reference_sequences.fa reference_sequences.fa
  # training is probably not needed if your sub-sequences have no
  # variation from the parental sequences
  last-train reference_sequences.fa input_sequences.fa &gt; trained.mat
  lastal -P 10 -p trained.mat --split reference_sequences.fa input_sequences.fa &gt; aligned.maf
  </code></pre>
  <p>LAST is <em>very</em> customisable. If you want to adjust the mapping or split sensitivity, have a look at the <code>lastal</code> documentation <a href="https://gitlab.com/mcfrith/last/-/blob/main/doc/lastal.rst" rel="nofollow noreferrer">here</a>, and the <code>last-split</code> documentation <a href="https://gitlab.com/mcfrith/last/-/blob/main/doc/last-split.rst" rel="nofollow noreferrer">here</a>.</p>
  <p>For example, there's a mismap probability adjustment which excludes alignments with a mismap probability above a certain threshold:</p>
  <pre><code># only form alignments if the mismap probability is 0.1% or less
  lastal --split-m 0.001 ...
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-11-03T16:17:22.357Z
Answers.Text: I tried a lot of the parameters. The mismap threshold did not have an impact for me. I found that lowering the minimum alignment score with the parameter `lastal -e` to 50 worked well to increase the sensitivity. It is now working perfectly.
Answers.UserDisplayName: Yano
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-15T09:33:02.307Z
Answers.LastActivityDate: 2022-11-03T19:19:23.417Z
Answers.LastEditDate: 2022-11-03T19:19:23.417Z
Answers.UserDisplayName: gringer
Body: <p><strong>The data</strong></p>
  <p>I have a large number of reads from sequences that were generated by randomly shuffling regions of two parent sequences together. See the following image:</p>
  <p><a href="https://i.sstatic.net/LgU0I.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/LgU0I.png" alt="1" /></a></p>
  <p>The regions that are shuffled are around 100-200 bp in length. The full shuffled sequence is around 1000 bp long. In general, the regions will be in the same order as the original sequence. The shuffled sequences are fragmented and sequenced into 150bp reads. One read can contain more than two borders between shuffle regions from a different parent sequence.</p>
  <p>The sequences are very similar (95%). Because of this high similarity you cannot pinpoint the border between two regions. The border will be a range between a variant that is unique to source1 and a variant that is unique to source2. That is ok because I am not interested in knowing from which source an identical region came.</p>
  <p><strong>The question</strong></p>
  <p>I would like to identify which part of the read originates from parent sequence one or two.
  What would be a suitable tool to do this?</p>
  <p><strong>My attempts</strong></p>
  <p>I tried to look at some multiple sequence alignment tools like MAFFT or Clustal but I am not interested in aligning all reads to each other. They also don't identify the shuffle regions well in my testing.</p>
  
Tags: <phylogenetics><genomics><multiple-sequence-alignment>
Title: How to identify sequence origin in DNA shuffle reads?
ThreadText: # How to identify sequence origin in DNA shuffle reads?
  
  (Asked by: username_0 on 2022-10-13)
  
  **The data**
  
  I have a large number of reads from sequences that were generated by randomly shuffling regions of two parent sequences together. See the following image:
  
  [![1](https://i.sstatic.net/LgU0I.png)](https://i.sstatic.net/LgU0I.png)
  
  The regions that are shuffled are around 100-200 bp in length. The full shuffled sequence is around 1000 bp long. In general, the regions will be in the same order as the original sequence. The shuffled sequences are fragmented and sequenced into 150bp reads. One read can contain more than two borders between shuffle regions from a different parent sequence.
  
  The sequences are very similar (95%). Because of this high similarity you cannot pinpoint the border between two regions. The border will be a range between a variant that is unique to source1 and a variant that is unique to source2. That is ok because I am not interested in knowing from which source an identical region came.
  
  **The question**
  
  I would like to identify which part of the read originates from parent sequence one or two.
  What would be a suitable tool to do this?
  
  **My attempts**
  
  I tried to look at some multiple sequence alignment tools like MAFFT or Clustal but I am not interested in aligning all reads to each other. They also don't identify the shuffle regions well in my testing.
  
  **Tags:** phylogenetics, genomics, multiple-sequence-alignment
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-10-15. Score: 2 | Accepted answer
  
  This is the sort of thing that [LAST](https://gitlab.com/mcfrith/last) has been specifically designed to work well for:
  
  > LAST is designed for moderately large data (e.g. genomes, DNA reads,
  > proteomes). It's especially good at finding rearrangements and recombinations: we believe last-split does that more rigorously than anything else.
  
  Here's my usual approach for mapping with LAST:
  
  ```
  lastdb -uRY4 -R01 reference_sequences.fa reference_sequences.fa
  # training is probably not needed if your sub-sequences have no
  # variation from the parental sequences
  last-train reference_sequences.fa input_sequences.fa > trained.mat
  lastal -P 10 -p trained.mat --split reference_sequences.fa input_sequences.fa > aligned.maf
  
  ```
  
  LAST is *very* customisable. If you want to adjust the mapping or split sensitivity, have a look at the `lastal` documentation [here](https://gitlab.com/mcfrith/last/-/blob/main/doc/lastal.rst), and the `last-split` documentation [here](https://gitlab.com/mcfrith/last/-/blob/main/doc/last-split.rst).
  
  For example, there's a mismap probability adjustment which excludes alignments with a mismap probability above a certain threshold:
  
  ```
  # only form alignments if the mismap probability is 0.1% or less
  lastal --split-m 0.001 ...
  
  ```
  
  > **Comments:**
  > **username_0**: I tried a lot of the parameters. The mismap threshold did not have an impact for me. I found that lowering the minimum alignment score with the parameter `lastal -e` to 50 worked well to increase the sensitivity. It is now working perfectly.  
  
  ---
  
  