Skip to content
Snippets Groups Projects
Commit ad386c3b authored by Bertrand  NÉRON's avatar Bertrand NÉRON
Browse files

add example to count nb of seq in fastq with grep

parent dc9208b1
No related branches found
No related tags found
No related merge requests found
Pipeline #87749 passed
...@@ -57,6 +57,20 @@ Exercises ...@@ -57,6 +57,20 @@ Exercises
* count the number of sequences in the file 'abcd.fa' (a multiple fasta file) * count the number of sequences in the file 'abcd.fa' (a multiple fasta file)
* can we have the same approach with a fastq file? * can we have the same approach with a fastq file?
.. note::
We can count the number of + but be careful *+* may appear in quality line even in first position.
So we have to count the *+* which are alone on the line.
| The line **start** (anchor ^) and finish (anchor $) by *+*
| so our pattern is :code:`^+$`
| do not forget to protect your pattern by surrounding it by quotes 'pattern'
| The complete command line is:
.. code-block::
grep -c '^+$' my_super_fichier.fastq
grep with Regular Expressions grep with Regular Expressions
============================= =============================
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment