What's an efficient way of counting of dinucleotides/trinucleotide pattern on fastq.gz file reads?
I know there are tools like seqtk that will be very efficient at reading through the .fastq.gz files, and tools like cutadapt that are good at finding long(ish) adapter patterns in the fastq.gz PE of files, but, what would be the best tool to count the number of reads where a di-/trinucleotide is present N-number of times in the read?
E.g.
countingtool --pattern CGC file_R1.fastq.gz
Result: column two is number of times the pattern is seen (exclusive numbers, no overlap)
CGC 0 51341234
CGC 1 13948130
CGC 2 1234344
CGC 3 51344
CGC 4 1343
CGC
included in the13948130
that have 1? Are the reads with >N included in the count of reads with N? $\endgroup$CGCGC
as one occurrence or two? $\endgroup$