Seq Reads Trimming
2
0
Entering edit mode
11.0 years ago
kanwarjag ★ 1.2k

I have sequencing data which I want to trim from 3' end to retain first 20 bp not on based on quality. Most of the tools ask for qulaity and and then trim. Is there any way I can just trim reads to keep first 20 bases. This data is for matching bar codes with standard format which is embedded in first 20 bp.

Thanks

trimming quality • 4.4k views
ADD COMMENT
0
Entering edit mode

Possible duplicate: Trimming a fastq file representing RNA-seq data. Seqtk works with fasta and the awk oneliner also works.

ADD REPLY
4
Entering edit mode
11.0 years ago
Assa Yeroslaviz ★ 1.8k

Fastx has a trimmer option, which is doing exactly that.

FASTA/Q Trimmer

$ fastx_trimmer -h
usage: fastx_trimmer [-h] [-f N] [-l N] [-z] [-v] [-i INFILE] [-o OUTFILE]

version 0.0.6
   [-h]         = This helpful help screen.
   [-f N]       = First base to keep. Default is 1 (=first base).
   [-l N]       = Last base to keep. Default is entire read.
   [-z]         = Compress output with GZIP.
   [-i INFILE]  = FASTA/Q input file. default is STDIN.
   [-o OUTFILE] = FASTA/Q output file. default is STDOUT.
ADD COMMENT
0
Entering edit mode

When I tried to use FASTx it is asking for quality score.

ADD REPLY
0
Entering edit mode

Maybe you used fastq_quality trimmer instead of fastx_trimmer? Because as you can see from the help output above, it does not need any quality threshold.

ADD REPLY
0
Entering edit mode

Add the option -Q 33 like that: fastx_trimmer -i Sample.fastq -o Sample_trimmed.fastq -f 5 -Q 33

ADD REPLY
0
Entering edit mode
11.0 years ago
vijay ★ 1.6k

You can use a simple perl script which can do this job for you. You can use the substr() function to extract the first 20 base pairs alone..

For example you can say

$seq1= substr($seq, 20);

Hope this would help you!!

ADD COMMENT

Login before adding your answer.

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