How to remove the 5' sepecific sequence of fastq file
0
0
Entering edit mode
5.6 years ago
hsu ▴ 40

Hi, I want to remove sepecific sequence in the 5' of my fastq file, these sequeces which I want to remove are not adapter sequences. I tried to use

cutadapt -g ATGCATTTTCG -o out.fq my.fq

But it's not working. Do you have any suggestions? Thank you !

remove fastq cutadapt • 1.6k views
ADD COMMENT
2
Entering edit mode

Hi hsu,

Could you show us how the read with the desired sequence that needs trimming looks like? Your command works for me:

$ cutadapt -g ATGCATTTTCG -o out.fq my.fq
This is cutadapt 1.8.3 with Python 2.7.2
Command line parameters: -g ATGCATTTTCG -o out.fq test.fq
Trimming 1 adapter with at most 10.0% errors in single-end mode ...
Finished in 0.01 s (10000 us/read; 0.01 M reads/minute).

=== Summary ===

Total reads processed:                       1
Reads with adapters:                         1 (100.0%)
Reads written (passing filters):             1 (100.0%)

Total basepairs processed:            68 bp
Total written (filtered):             57 bp (83.8%)

=== Adapter 1 ===

Sequence: ATGCATTTTCG; Type: regular 5'; Length: 11; Trimmed: 1 times.

No. of allowed errors:
0-9 bp: 0; 10-11 bp: 1

Overview of removed sequences
length  count   expect  max.err error counts
11  1   0.0 1   1

$ cat my.fq
@A00111:321:H7Y22DSXX:1:1101:3305:1047 1:N:0:GATAGACA+TCTTTCCC
ATGCATTTTCGTNCTTCTCCTTTTTTTCTGTTTAGAAAAATGACTAGAATCCATTAATTTCTAACCCC
+
F#FFFFFFFFFFFFFFFFFFFFFFFFFF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

$ cat out.fq
@A00111:321:H7Y22DSXX:1:1101:3305:1047 1:N:0:GATAGACA+TCTTTCCC
TNCTTCTCCTTTTTTTCTGTTTAGAAAAATGACTAGAATCCATTAATTTCTAACCCC
+
FFFFFFFFFFFFFFFFF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
ADD REPLY
0
Entering edit mode

You can use bbduk.sh from BBMap suite this way.

bbduk.sh -Xmx1g in=my.fq out=out.fq literal=ATGCATTTTCG ktrim=l k=5 restrictleft=15
ADD REPLY

Login before adding your answer.

Traffic: 1920 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