Last active
December 7, 2022 20:08
-
-
Save idolawoye/bc483e81480c9b7e9be812e4d8075986 to your computer and use it in GitHub Desktop.
One liner to print out percentage of reads from a Kraken report file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| grep -w -F -f taxon.txt *report.txt | awk 'BEGIN{OFS="\t"}{ print $1,$2}' > tb.txt | |
| # taxon.txt is a file containing the Taxon name you want to summarize, e.g: Mycobacterium tuberculosis complex | |
| # *.report.txt is the wildcard for selecting multiple Kraken report files | |
| # tb.txt is the output TSV file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment