Custom trimming of "staggered" adapter sequences
1
0
Entering edit mode
8.7 years ago
joycewang83 ▴ 20

Hello!

I have a question pertaining to the trimming of custom/staggered adapter sequence in a FASTQ file.

I have a library with 4 different adapter lengths on the 5' side; this was done to increase library diversity during sequencing. However now I want to trim off the adapter and I can't do it by length!

Here's the 4 potential adapter sequence:

AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCTCGGGGACTTATCAGCCAACC
AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCTNCGGGGACTTATCAGCCAACC
AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCTNNCGGGGACTTATCAGCCAACC
AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCTNNNCGGGGACTTATCAGCCAACC

And now I would like to trim off all "CGGGGACTTATCAGCCAACC" (and everything upstream!) from my reads - does anyone know how I can do it?

Thanks a lot for any help! Please let me know if further information is needed.

Joyce

trimming • 3.2k views
ADD COMMENT
0
Entering edit mode

Looks like a job for perl regex.

ADD REPLY
0
Entering edit mode

Thanks Karl. I have close to zero knowledge in programming, maybe a little bit in Python. Was hoping to be able to use some established programs such as Trimmomatic. I will keep looking around. Thanks! -joyce

ADD REPLY
0
Entering edit mode

I don't know enough perl to give you the answer. I suppose someone else will. But sometimes you have to do some programming to solve problems! Perl has a really easy string-search routine in the "regex" that can find your index and cut at the appropriate place. You could do it in Python if you'd like, or any kind of programming language.

ADD REPLY
0
Entering edit mode

Thanks Karl! I am in the process of learning Python - programming is absolutely crucial indeed!

ADD REPLY
1
Entering edit mode
8.7 years ago
Phil S. ▴ 700

As it appears to me your adapters always build the last 21 bases in your reads. Therefore tools like cutadapt or bbduk from the BBMap package should do the job without a problem. I don't know about trimmomatic since i haven't used it that regularly...

ADD COMMENT
0
Entering edit mode

OK thanks Phil. I have heard about cutadatpt - will check it out!

ADD REPLY
0
Entering edit mode

it worked - thanks!!!

ADD REPLY
0
Entering edit mode

np mate, you are welcome. You maybe want to accept my previous comment as an answer since it solved your problem.

Best,
Phil

ADD REPLY

Login before adding your answer.

Traffic: 2158 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6