Biostar Beta. Not for public use.
How to remove the 5' sepecific sequence of fastq file
0
Entering edit mode
11 months ago
hsu • 0

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 !

ADD COMMENTlink
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 REPLYlink
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 REPLYlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.1