Trim 100bp PE sequencing to 50bp reads
2
0
Entering edit mode
2.5 years ago
Jautis ▴ 560

Hello, we're doing some QC for future sequencing and want to have an empirical comparison of 100bp SE reads with 50bp PE reads. Starting with 100bp PE reads, how can I trim the fastq file to the first 50 bases? (i.e. retain the first 50 characters for each even-number row). Thanks!

unix bash sequencing fastq • 1.1k views
ADD COMMENT
2
Entering edit mode
2.5 years ago
GenoMax 142k

Using reformat.sh from BBMap suite:

reformat.sh -Xmx4g in1=R1.fq.gz in2=R2.fq.gz out1=trim_R1.fq.gz out2=trim_R2.fq.gz forcetrimright=50

seqtk (LINK) by Heng Li:

seqtk trimfq -e 50 R1.fq > R1_trim.fq
ADD COMMENT
0
Entering edit mode
2.5 years ago
$ cutadapt -l 50 -o out1.fq -p out2.fq input_R1.fastq input_R2.fastq
$ cutadapt -l 50 -o out1.fq  input_R1.fastq 

if SE fastq headers are not 50 characters long, you can try this: colrm 51 < test_R1.fastq > out_R1.fastq. colrm is available most of the *buntu distros.

ADD COMMENT

Login before adding your answer.

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