Git Product home page Git Product logo

Comments (4)

MikkelSchubert avatar MikkelSchubert commented on August 23, 2024 1

Dear Rex Han,

If I understand you correctly, then I am afraid that AdapterRemoval cannot handle your data.

You write that your reads look like this [1]:

a. r1: barcode1-forwardprimer-sequence
   r2: barcode2-reverseprimer-sequence
b. r1: barcode2-reverseprimer-sequence
   r2: barcode1-forwardprimer-sequence

However, AdapterRemoval expects the following [2]:

a. r1: barcode1-sequence-forwardprimer
   r2: barcode2-sequence-reverseprimer
b. r1: barcode2-sequence-reverseprimer
   r2: barcode1-sequence-forwardprimer

That is to say that reads must start with a barcode, then the sequence, and finally end with an adapter. If your data does not look like that, then you cannot use AdapterRemoval and it is unlikely that support for the kind of layout you describe will be added.

However, if your data actually matches what AdapterRemoval requires [2], then you can perform the trimming and demultiplexing as follows:

Firstly, you will need to specify two sets of barcodes for each sample:

$ cat my_barcodes.txt
Sample1a	barcode1	barcode2
Sample1b	barcode2	barcode1

And secondly, you will need to specify two sets of adapters for use with --adapter-list:

$ cat my_adapters.txt
forwardprimer	reverseprimer
reverseprimer	forwardprimer

Once you have done that, then you can run with those lists AdapterRemoval as follows (adding your own input/output/trimming/etc options):

$ AdapterRemoval --adapter-list my_adapters.txt --barcode-list my_barcodes.txt ...

You will get two sets of output files per sample (e.g. Sample1a and Sample1b), but it's pretty simple to combine those afterwards. Note also that this will run slower than regular demultiplexing, since AdapterRemoval will try both sets of adapters for each read, regardless of the barcode.

Best,
Mikkel

from adapterremoval.

rexhancx avatar rexhancx commented on August 23, 2024

Dear Dr. Schubert,

thanks for your quick reply and I apologize for my confusing statement.

adapterremoval can only handle with one-orientation data as manpage said,

The first barcode is then compared to first N_1 bases of the mate 1 read, and the second barcode is compared to the first N_2 bases of the mate 2 read.

could you help add a function that automatically handle with mixed-orientation data,

(1) compare first barcode to r1, second barcode to r2, generate r1_1 and r2_1
(2) then first barcode to r2_unidentified, second barcode to r1_unidentified, generate r1_2 and r2_2
(3) finally cat r1_2 >> r1_1, cat r2_2 >> r2_1, and provide new data statistics

anyway, adapterremoval is an awesome software. my function request may ask too much.

thank you for putting my request into your consideration and feel free to make your own decision.

wish everything goes well with you. :)

from adapterremoval.

MikkelSchubert avatar MikkelSchubert commented on August 23, 2024

Dear Rex Han,

I'll think about adding functionality to AR to handle this.
But it seems like a very unusual situation, so I'm honestly not sure that it is worthwhile.

One possibility might be to allow multiple sets of barcodes per sample, which could perhaps also be useful in other situations, but from what I understand of your protocol you'd still need to provide both combinations of adapter sequences using --adapter-list.

Best,
Mikkel

from adapterremoval.

rexhancx avatar rexhancx commented on August 23, 2024

Dear Dr. Schubert,

Glad to hear from you.

Thanks, I'll try this --adapter-list.

wish everything goes well with u.

from adapterremoval.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.