Answers.Body: <p>There are two other ways in which you could demultiplex reads if guppy doesn't have the config file for the kit you are using.</p>
  
  <ol>
  <li><a href="https://github.com/calacademy-research/minibar" rel="nofollow noreferrer">Minibar</a>: This works for dual index barcodes specifically</li>
  <li><a href="https://github.com/rrwick/Porechop" rel="nofollow noreferrer">Porechop</a>: This is intended for the ONT sets, but you can also replace them with your own. However, it is designed to work with single index barcodes. That means, you will have to run it once with your forward indices, then take that output and run again with the reverse, and then do some gymnastics to combine it all together</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-20T07:35:09.427Z
Answers.Text: What do you mean with run it twice, with forward and reverse indices?
Answers.UserDisplayName: F.Lira
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-09T22:41:20.033Z
Answers.LastActivityDate: 2019-03-10T12:37:57.583Z
Answers.LastEditDate: 2019-03-10T12:37:57.583Z
Answers.UserDisplayName: Mrinalini Erkenswick Watsa
Answers.Body: <p>I've written some <a href="https://gitlab.com/gringer/bioinfscripts/-/blob/master/fastq-dental.pl" rel="nofollow noreferrer">Perl code</a> for demultiplexing nanopore reads using <a href="https://gitlab.com/mcfrith/last" rel="nofollow noreferrer">LAST</a>. A workflow demonstrating the use of this script (and how it works under the hood) can be found here:</p>
  <p><a href="https://dx.doi.org/10.17504/protocols.io.14egnxw4zl5d" rel="nofollow noreferrer">https://dx.doi.org/10.17504/protocols.io.14egnxw4zl5d</a></p>
  <p>You feed the script a barcode file and input fastq file, and it creates a trained mismatch matrix, aligns to the barcodes, then demultiplexes the reads into separate files for each barcode:</p>
  <pre><code>./fastq-dental.pl -barcode barcode_full_PBK004.fa -mat bc.mat reads_all.fastq.gz
  </code></pre>
  <p>Example output:</p>
  <pre><code>         9 BC01
          39 BC02
           1 BC02_BC07
          16 BC03
          38 BC04
           2 BC04_BC06
           1 BC04_BC07
           1 BC04_BC09
         643 BC05
           2 BC05_BC07
      493175 BC06
         115 BC06_BC06
           2 BC06_BC07
      663161 BC07
           1 BC07_BC05
         117 BC07_BC07
           1 BC07_BC09
         106 BC08
           1 BC08_BC06
          75 BC09
          72 BC10
           1 BC10_BC07
          41 BC11
          44 BC12
           1 BC12_BC06
       13535 BCchim
      237796 BCnoadapt
         152 BCnone
          90 RB12A
  </code></pre>
  <p>While the approach designed around using the ONT barcodes, the barcode fasta file can be replaced by another file [using barcode ID in the header] without change the protocol.</p>
  <p>FWIW, there is also now some support for detecting strand direction (e.g. using the strand switch primer provided by ONT), but I haven't yet got it working properly doing both demultiplexing and strand orientation at the same time.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-04T02:28:09.560Z
Answers.Text: Thank you! I am using minibar, works great and very easy to add custom barcodes.
  L.Y.
Answers.UserDisplayName: Lev Yampolsky
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-28T21:45:10.430Z
Answers.LastActivityDate: 2023-10-23T22:11:23.780Z
Answers.LastEditDate: 2023-10-23T22:11:23.780Z
Answers.UserDisplayName: gringer
Body: <p>We have a problem trying to demultiplex MinION sequences with custom barcodes. Do you have any software recommendations we can try for demultiplexing or how to demultiplex these custom barcodes with Albacore? We have tried using albacore but it only recognizes barcodes provided by Nanopore Technologies.</p>
  
Tags: <nanopore><minion><albacore><demultiplexing>
Title: Demultiplex nanopore reads with custom barcodes
ThreadText: # Demultiplex nanopore reads with custom barcodes
  
  (Asked by: username_0 on 2019-02-28)
  
  We have a problem trying to demultiplex MinION sequences with custom barcodes. Do you have any software recommendations we can try for demultiplexing or how to demultiplex these custom barcodes with Albacore? We have tried using albacore but it only recognizes barcodes provided by Nanopore Technologies.
  
  **Tags:** nanopore, minion, albacore, demultiplexing
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2019-02-28. Score: 5 | Accepted answer
  
  I've written some [Perl code](https://gitlab.com/username_3/bioinfscripts/-/blob/master/fastq-dental.pl) for demultiplexing nanopore reads using [LAST](https://gitlab.com/mcfrith/last). A workflow demonstrating the use of this script (and how it works under the hood) can be found here:
  
  <https://dx.doi.org/10.17504/protocols.io.14egnxw4zl5d>
  
  You feed the script a barcode file and input fastq file, and it creates a trained mismatch matrix, aligns to the barcodes, then demultiplexes the reads into separate files for each barcode:
  
  ```
  ./fastq-dental.pl -barcode barcode_full_PBK004.fa -mat bc.mat reads_all.fastq.gz
  
  ```
  
  Example output:
  
  ```
           9 BC01
          39 BC02
           1 BC02_BC07
          16 BC03
          38 BC04
           2 BC04_BC06
           1 BC04_BC07
           1 BC04_BC09
         643 BC05
           2 BC05_BC07
      493175 BC06
         115 BC06_BC06
           2 BC06_BC07
      663161 BC07
           1 BC07_BC05
         117 BC07_BC07
           1 BC07_BC09
         106 BC08
           1 BC08_BC06
          75 BC09
          72 BC10
           1 BC10_BC07
          41 BC11
          44 BC12
           1 BC12_BC06
       13535 BCchim
      237796 BCnoadapt
         152 BCnone
          90 RB12A
  
  ```
  
  While the approach designed around using the ONT barcodes, the barcode fasta file can be replaced by another file [using barcode ID in the header] without change the protocol.
  
  FWIW, there is also now some support for detecting strand direction (e.g. using the strand switch primer provided by ONT), but I haven't yet got it working properly doing both demultiplexing and strand orientation at the same time.
  
  > **Comments:**
  > **username_4**: Thank you! I am using minibar, works great and very easy to add custom barcodes. L.Y.  
  
  ---
  
  ### Answer by username_1 on 2019-03-09. Score: 3
  
  There are two other ways in which you could demultiplex reads if guppy doesn't have the config file for the kit you are using.
  
  1. [Minibar](https://github.com/calacademy-research/minibar): This works for dual index barcodes specifically
  2. [Porechop](https://github.com/rrwick/Porechop): This is intended for the ONT sets, but you can also replace them with your own. However, it is designed to work with single index barcodes. That means, you will have to run it once with your forward indices, then take that output and run again with the reverse, and then do some gymnastics to combine it all together
  
  > **Comments:**
  > **username_2**: What do you mean with run it twice, with forward and reverse indices?  
  
  ---
  
  