This is a test version of Biostars. For the public version, visit https://www.biostars.org.
cutadapt does not keep sequences

HI, I am trying to remove sequences that do not contain an adapter. the problem is that in the output I just can see the name of those reads but not the sequences. Example:

A.fastq :

@JZRAE:01332:11593
GTAGATAGTGAAAAAAAAAAAACCACAGCTTCCAAACACCATGACTCCATTATCACCGAGTCTGCCCAGGGGTAGAGAGGCTGAGCCCCC
+
01419341:433333333333%30445566462440////00./18859;6;:;<:3:/--53-//*/466.786664411444......
@JZRAE:01332:11602
TTATTGACATAACTAGGTCAATGGTTTGCTAAGAACTGATACAATGTTCAAAGAAACAGCTGG
+
.+-0),.476748:36-376/32-12*/422-293778664556:;>6454+367.5220,,)
@JZRAE:01332:11606
AGTCCACTCTTTAGAAGCTTTAAAATCACAAGCTTCCCTCTGTCCCTGCTGGGACTAAAGGTCCTG
+
77873443466-5//*-35617;;099944-/15.55.577779:,331.44*/-,12,4,-/356
@JZRAE:01332:11607
TTATTGACATACTAGGTCATGGTTGCTAAGAACTGATACAATGTTCAAGAAACAGCTGCCTTTTTCTCCA
+
6/41-///33/////-/////-/1445606948787:97737774//+.561979;873*----)---*-
@JZRAE:01332:11609
GAACCTGCCAATCGAAGTACCTATCCTGCTCTTTTATGGTTTCCATTTGCATGGACTATCTTTTTTCTATCCCTTTACTTTGGTCTTTGTGTCATCC
+
/8050576152...545344477785989;3345+154158072555/54578.31443-,,,,,',,,//0-26267771535553233---111/

I want to keep those reads with these adapter: GTAGATAGTGAAA ( In this case just the first read). So I do:

 $ cutadapt -a GTAGATAGTGAA --discard-untrimmed -o B.fastq A.fastq

and this is what I get:

B.fastq:

@JZRAE:01332:11593

+

How can I do it so I end up just with those reads having the adapter ( an also clipping it)

thnaks

sequencing fastq

thanks Jeremy! I found the solution

2 answers

cutadapt -g ^GTAGATAGTGAA --discard-untrimmed A.fastq > E.fastq

-g ^GTAGATAGTGAA: The adapter is expected to be a prefix of the read

I think the trimmed read you are showing without sequence happened to be made of adapter only, so it was fully trimmed. Try setting the -m option Discard trimmed reads that are shorter than LENGTH

Log in to answer this question.