This is a test version of Biostars. For the public version, visit https://www.biostars.org.
know the grep command for fastq file

I have junction read sequence like this -HISEQ:151:HHKH7BCXX:2:1203:18952:80029 and i want to grep this sequence from my fastq file . so please tell me how i grep this sequence.

rna-seq

brian, OP asks

i want to grep this sequence from my fastq file

SeqKit works with both fastq and fasta files.

3 answers

if the file is decompressed: grep -A4 HISEQ:151:HHKH7BCXX:2:1203:18952:80029 file.fastq

if the file is compressed: zgrep -A4 HISEQ:151:HHKH7BCXX:2:1203:18952:80029 file.fastq.gz

man grep can explain to you how to use it

grep 'HISEQ:151:HHKH7BCXX:2:1203:18952:80029' your_fastq_file.fastq

grep -1 "HISEQ:151:HHKH7BCXX:2:1203:18952:80029" .fastq

Hey gsk1185, thanks for contributing but please note that exactly this answer has already been given twice. There is no point in a third identical answer.

Log in to answer this question.