This is a test version of Biostars. For the public version, visit https://www.biostars.org.
grep sequence larger than read length in fastq

Apologies for the naive question, if the length of each read in my fastq file is 75bp

For example something like this:

@HS25_123:4:1567:891011:23248/2
CTCCGACAGACTGAGTCGCCCGGGGGGATCTCGAGCGGCCGCCACTGTGCTGGATAATTCGAGCTCGCCCCGACG
+
CCBCCGGGGGGGGGGGGGGGFGGGGGGGGGGGGEGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG

is it possible to grep search for a sequence longer than 75bp?

I would assume not, but just wanted to make sure.

Thank you!

rna-sequencing sequence grep

if the length of each read in my fastq file is 75bp

If that is true/known then as @Mensur said you will not get any results since no read in your will will be longer then 75 bp.

If you want to test if that statement is true, then use @shenwei's code to get an answer.

is it possible to grep search for a sequence longer than 75bp?

You will want to use a tool that understands fastq format rather than grep.

2 answers

It is possible to search but you won't get any results.

Counting sequences >= 76 bp with seqkit seq.

seqkit seq -m 76 reads_1.fq.gz | seqkit stats

Log in to answer this question.