<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://teaching.healthtech.dtu.dk/22126/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rasmus</id>
	<title>22126 - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://teaching.healthtech.dtu.dk/22126/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rasmus"/>
	<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php/Special:Contributions/Rasmus"/>
	<updated>2026-04-12T14:22:49Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=607</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=607"/>
		<updated>2026-01-12T13:12:14Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a &#039;&#039;Stapholycoccus aureus&#039;&#039; isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to &#039;&#039;Stapholycoccus aureus&#039;&#039;, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results_from_teacher&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DO NOT RUN THIS gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb DO NOT RUN THIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Genomes of the unknown ST have minimum 16,339 SNPs to genomes of ST207 or ST2326, whereas genomes og ST207 are maximum different by 897 SNPs.&lt;br /&gt;
&lt;br /&gt;
Accordingly, the unknown ST is genetically more distant from ST207 and ST2326 than it is apparent from the MLST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a slide from today&#039;s lecture that shows the distribution of genetic distances (pairwise SNP distances) in a collection of 446 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes.&lt;br /&gt;
&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Based on the shown distribution, do you think that the following statements are true or false:&lt;br /&gt;
* A: ST207 and ST2326 are the same strain ?&lt;br /&gt;
* B: ST207 and the unknown ST are the same phylogroup ?&lt;br /&gt;
* C: ST2326 and the unknown ST are different strains ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
* A: True&lt;br /&gt;
* B: True&lt;br /&gt;
* C: True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
There are 7 to 122 SNPs between genomes from the same person (if we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Yes, some genomes from different persons have pairwise SNP-distances that are low relative to the the distances between genomes from the same person. A quick search for information on the world wide web may suggest that for &#039;&#039;Pseudomonas aeruginosa&#039;&#039;, SNP-distances less than around 30 SNPs indicates transmission at the hospital.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the five ST2326 genome assemblies using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna &amp;gt; ~/microbial_exercise/output_abricate.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
Are the same AMR genes found in the five genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
No&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Do all found AMR genes have a good match to a database reference gene ? (sequence coverage of &amp;gt; 90% and sequence identity &amp;gt; 95%)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
No, three gene calls fails the criteria for a good match. Following command can be used the find the three gene calls:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/output_abricate.txt  | cut -f1,6,10,11 | awk &#039;$3&amp;lt;=90 || $4&amp;lt;=95&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=606</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=606"/>
		<updated>2026-01-12T12:58:32Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a &#039;&#039;Stapholycoccus aureus&#039;&#039; isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to &#039;&#039;Stapholycoccus aureus&#039;&#039;, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results_from_teacher&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DO NOT RUN THIS gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb DO NOT RUN THIS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Genomes of the unknown ST have minimum 16,339 SNPs to genomes of ST207 or ST2326, whereas genomes og ST207 are maximum different by 897 SNPs.&lt;br /&gt;
&lt;br /&gt;
Accordingly, the unknown ST is genetically more distant from ST207 and ST2326 than it is apparent from the MLST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a slide from today&#039;s lecture that shows the distribution of genetic distances (pairwise SNP distances) in a collection of 446 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes.&lt;br /&gt;
&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Based on the shown distribution, do you think that the following statements are true or false:&lt;br /&gt;
* A: ST207 and ST2326 are the same strain ?&lt;br /&gt;
* B: ST207 and the unknown ST are the same phylogroup ?&lt;br /&gt;
* C: ST2326 and the unknown ST are different strains ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
* A: True&lt;br /&gt;
* B: True&lt;br /&gt;
* C: True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
There are 7 to 122 SNPs between genomes from the same person (if we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Yes, some genomes from different persons have pairwise SNP-distances that are low relative the the distances between genomes from the same person. A quick search for information on the world wide web may suggest that for &#039;&#039;Pseudomonas aeruginosa&#039;&#039;, SNP-distances less than around 30 SNPs indicates transmission at the hospital.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the five ST2326 genome assemblies using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna &amp;gt; ~/microbial_exercise/output_abricate.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
Are the same AMR genes found in the five genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
No&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Do all found AMR genes have a good match to a database reference gene ? (sequence coverage of &amp;gt; 90% and sequence identity &amp;gt; 95%)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
No, three gene calls fails the criteria for a good match. Following command can be used the find the three gene calls:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/output_abricate.txt  | cut -f1,6,10,11 | awk &#039;$3&amp;lt;=90 || $4&amp;lt;=95&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Program_2026&amp;diff=605</id>
		<title>Program 2026</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Program_2026&amp;diff=605"/>
		<updated>2026-01-12T11:52:45Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;NOTE: THIS PAGE IS UNDER CONSTRUCTION WITH A NEW TEACHER IN 2026&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;REMEMBER TO BRING A LAPTOP FOR EXERCISES&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lectures will be in person in building [https://maps.app.goo.gl/wH5EW199wrChCmWK7 341] in auditorium 23. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lectures and exercises will take place on Discord (https://discord.gg/Qgw9M3SZA5). Please register with your full name. Will use Discord for online classes and collaboration with your project partners. Rather than emailing questions to the teaching staff, I encourage you to post your questions on discord.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The course has two main parts, the first half is lectures and exercises and the last half is project work ending with the exam on &#039;&#039;&#039;Friday 23rd of January 2026&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For the laptop &#039;&#039;&#039; if you have a secure laptop (e.g. work laptop from Statens Serum Institut for instance), please bring your personal laptop.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=== Course Program - January 2026 ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 5 (Day 1)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Introduction - Next Generation Sequencing&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:30am&amp;lt;/DT&amp;gt;  &lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to course &lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-1-Intro.pdf Lecture slides])&lt;br /&gt;
&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:30am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;dd&amp;gt;Introduction to NGS &lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-2-NGS_basics.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-10:45am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;The NGS revolution&lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-3-NGS_revolution.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:45am-11:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;11:00am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Logging on to our pupil servers ([[Logging on to pupil system]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury , Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:30pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Logging on to our pupil servers ([[Logging on to pupil system]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury , Amanda Gammelby Qvesel, Mads Hartmann  &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:30pm-2:15pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to UNIX &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;([https://teaching.healthtech.dtu.dk/22113/index.php/Unix Video lectures to watch from &amp;quot;Unix intro..&amp;quot; to &amp;quot;Touching upon...&amp;quot;])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;([[Unix Exercises|Unix exercises]] – possible answers [[Unix_answers|here]])&lt;br /&gt;
([[Basic UNIX notes]])&lt;br /&gt;
([[Advanced UNIX and Pipes]])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:15pm-2:30pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:30pm-3:30pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to UNIX (continued)&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;([https://teaching.healthtech.dtu.dk/22113/index.php/Unix Video lectures to watch from &amp;quot;Unix intro..&amp;quot; to &amp;quot;Touching upon...&amp;quot;])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;([[Unix Exercises|Unix exercises]] – possible answers [[Unix_answers|here]])&lt;br /&gt;
([[Basic UNIX notes]])&lt;br /&gt;
([[Advanced UNIX and Pipes]])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;3:30pm-4:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;First look at data&lt;br /&gt;
([[First look exercise]])&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 6 (Day 2)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Data pre-processing &amp;amp; Alignment&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45am &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Data basics ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-1-Data_basics.pdf Lecture slides]) ([[Data basics exercise]]) ([[Data basics exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Data pre-processing ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-2-QC_preprocessing.pdf Lecture slides]) ([[Data Preprocess exercise]]) ([[Data Preprocess exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm  &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Alignment ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-3-Alignment.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Alignment ([[Alignment exercise]]) ([[Alignment exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 7 (Day 3)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Variant calling &#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:30am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Functional Variation&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-1-Functional_variation.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:30am-10:15am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Variant calling part 1 ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-2-Preprocessing-variant_calling.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:15am-10:30am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:30am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Preprocessing ([[Postprocess exercise]])  ([[Postprocess_exercise_answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: variant calling part 1 ([[SNP calling exercise part 1]]) ([[SNP_calling_exercise_answers part 1]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: variant calling part 2 ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-3-Variant_filtering.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: variant calling part 2 ([[SNP calling exercise part 2]]) ([[SNP_calling_exercise_answers part 2]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 8 (Day 4)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Assembly, annotation and RNA-seq&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: de novo assembly and genomic annotations ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_4-1-Denovo.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45pm-10:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00pm-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: de novo assembly ([[denovo exercise]]) ([[denovo solution]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: RNAseq ([https://teaching.healthtech.dtu.dk/material/22126/2024/ngs_transcriptomics_kvs_2023_without_solutions_v2.pdf Lecture slides]) &lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2024/ngs_transcriptomics_kvs_2023_with_solutions_v2.pdf Lecture slides with solutions])&amp;lt;/DD&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Kristoffer Vitting-Seerup&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: RNAseq ([[Rnaseq_exercise]]) &amp;lt;!-- ([[Rnaseq_exercise_answers]]) --&amp;gt; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Kristoffer Vitting-Seerup, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 9 (Day 5)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Ancient DNA and 3D genomics&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-10:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Ancient DNA ([https://teaching.healthtech.dtu.dk/material/22126/2026/dtu_adna_2026_red.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Martin Sikora&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00pm-10:15pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:15pm-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Ancient DNA ([[Ancient DNA exercise]]) ([[Ancient_DNA_exercise_answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Martin Sikora, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-2:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: 3D Genomics with Hi-C ([https://teaching.healthtech.dtu.dk/material/22126/2026/3D_Genomics_Workshop.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Juan Rodríguez&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00am-2:15pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:15pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: 3D Genomics with Hi-C ([[Exercise and answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Juan Rodríguez, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 12 (Day 6)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Microbial genomics&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45am &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: Use of next-generation (genome) sequencing in clinical microbiology ([https://teaching.healthtech.dtu.dk/22126/images/7/77/Microbial_genomics_course22126_slide1-30_compressed.pdf Lecture slides 1-30])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-11:10am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: ([[ Microbial_genomics_exercise ]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;11:10pm-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: Use of next-generation (genome) sequencing in clinical microbiology ([https://teaching.healthtech.dtu.dk/22126/images/6/6d/Microbial_genomics_course22126_slide31-75_compressed.pdf Lecture slides 31-75])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: ([[ Microbial_genomics_exercise ]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 13 (Day 7)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Phylogenomics&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DD&amp;gt; The same exercise page will be used throughout the day: ([[Exercise]]) ([[Solution]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 1 + exercise: Tree thinking ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1_Tree_thinking.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-10:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 2 + exercise: Data ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2_Data.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;11:00am-11:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 3 + exercise: Basic methods ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3_Basic_methods.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00am-1:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 4 + exercise: Models and support ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_4_Models_and_support.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00am-2:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 5 + exercise: Gene trees ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_5_Gene_trees.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;3:00am-3:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 6 + exercise: Molecular dating ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_6_MolecularDating.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 14 (Day 8)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Metabarcoding and group project&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;TBA ([ Lecture])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Luke Holman&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:55am-10:10am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:10am-12:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: TBA ([https://github.com/leholman/25.DTUmetabarcodingExercise/blob/main/README.md Metabarcoding Exercises]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Luke Holman, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:30pm &amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt; Recap Test ([https://teaching.healthtech.dtu.dk/material/22126/2026/Recap_test.pdf Test])([https://teaching.healthtech.dtu.dk/material/22126/2026/Recap_test_Answers.pdf Answers])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:30pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:30pm &amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Projects &amp;amp; Group formation ([https://teaching.healthtech.dtu.dk/material/22126/2026/Poster.pdf Lecture slides] [http://teaching.healthtech.dtu.dk/material/22126/2023/posters.tar.gz Examples from previous courses]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:30pm-4:00pm &amp;lt;/DT&amp;gt;  &lt;br /&gt;
&amp;lt;DD&amp;gt;Projects &amp;amp; Group formation, prepare an outline for tomorrow. please write group names in the [https://docs.google.com/document/d/1W5HzThk4zSi2xAE4dwmtgw35JtyNbwhuizseiLrxLr0/edit?usp=sharing document for 2026]&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 15 (Day 9)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Project consolation, check when your 3 minutes are [https://docs.google.com/spreadsheets/d/1eZeAo0jtpUcJpd7ti8h2ofjVJD8wYOUws9QMZwp0fQ8/edit?usp=sharing Timesheet]&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;DD&amp;gt;You can go to Discord for help, we will be available.&amp;lt;/DD&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-4:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 16 (Day 10)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 19 (Day 11)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 20 (Day 12)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 21 (Day 13)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 22 (Day 14)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project Work &amp;amp; Submit poster&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Q&amp;amp;A: Practical information about the exam&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 23 (Day 15)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Exam&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Written Exam&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Program_2026&amp;diff=604</id>
		<title>Program 2026</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Program_2026&amp;diff=604"/>
		<updated>2026-01-12T11:51:47Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;NOTE: THIS PAGE IS UNDER CONSTRUCTION WITH A NEW TEACHER IN 2026&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;REMEMBER TO BRING A LAPTOP FOR EXERCISES&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lectures will be in person in building [https://maps.app.goo.gl/wH5EW199wrChCmWK7 341] in auditorium 23. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lectures and exercises will take place on Discord (https://discord.gg/Qgw9M3SZA5). Please register with your full name. Will use Discord for online classes and collaboration with your project partners. Rather than emailing questions to the teaching staff, I encourage you to post your questions on discord.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The course has two main parts, the first half is lectures and exercises and the last half is project work ending with the exam on &#039;&#039;&#039;Friday 23rd of January 2026&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For the laptop &#039;&#039;&#039; if you have a secure laptop (e.g. work laptop from Statens Serum Institut for instance), please bring your personal laptop.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=== Course Program - January 2026 ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 5 (Day 1)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Introduction - Next Generation Sequencing&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:30am&amp;lt;/DT&amp;gt;  &lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to course &lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-1-Intro.pdf Lecture slides])&lt;br /&gt;
&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:30am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;dd&amp;gt;Introduction to NGS &lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-2-NGS_basics.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-10:45am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;The NGS revolution&lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-3-NGS_revolution.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:45am-11:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;11:00am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Logging on to our pupil servers ([[Logging on to pupil system]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury , Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:30pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Logging on to our pupil servers ([[Logging on to pupil system]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury , Amanda Gammelby Qvesel, Mads Hartmann  &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:30pm-2:15pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to UNIX &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;([https://teaching.healthtech.dtu.dk/22113/index.php/Unix Video lectures to watch from &amp;quot;Unix intro..&amp;quot; to &amp;quot;Touching upon...&amp;quot;])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;([[Unix Exercises|Unix exercises]] – possible answers [[Unix_answers|here]])&lt;br /&gt;
([[Basic UNIX notes]])&lt;br /&gt;
([[Advanced UNIX and Pipes]])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:15pm-2:30pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:30pm-3:30pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to UNIX (continued)&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;([https://teaching.healthtech.dtu.dk/22113/index.php/Unix Video lectures to watch from &amp;quot;Unix intro..&amp;quot; to &amp;quot;Touching upon...&amp;quot;])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;([[Unix Exercises|Unix exercises]] – possible answers [[Unix_answers|here]])&lt;br /&gt;
([[Basic UNIX notes]])&lt;br /&gt;
([[Advanced UNIX and Pipes]])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;3:30pm-4:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;First look at data&lt;br /&gt;
([[First look exercise]])&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 6 (Day 2)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Data pre-processing &amp;amp; Alignment&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45am &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Data basics ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-1-Data_basics.pdf Lecture slides]) ([[Data basics exercise]]) ([[Data basics exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Data pre-processing ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-2-QC_preprocessing.pdf Lecture slides]) ([[Data Preprocess exercise]]) ([[Data Preprocess exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm  &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Alignment ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-3-Alignment.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Alignment ([[Alignment exercise]]) ([[Alignment exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 7 (Day 3)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Variant calling &#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:30am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Functional Variation&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-1-Functional_variation.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:30am-10:15am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Variant calling part 1 ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-2-Preprocessing-variant_calling.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:15am-10:30am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:30am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Preprocessing ([[Postprocess exercise]])  ([[Postprocess_exercise_answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: variant calling part 1 ([[SNP calling exercise part 1]]) ([[SNP_calling_exercise_answers part 1]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: variant calling part 2 ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-3-Variant_filtering.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: variant calling part 2 ([[SNP calling exercise part 2]]) ([[SNP_calling_exercise_answers part 2]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 8 (Day 4)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Assembly, annotation and RNA-seq&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: de novo assembly and genomic annotations ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_4-1-Denovo.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45pm-10:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00pm-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: de novo assembly ([[denovo exercise]]) ([[denovo solution]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: RNAseq ([https://teaching.healthtech.dtu.dk/material/22126/2024/ngs_transcriptomics_kvs_2023_without_solutions_v2.pdf Lecture slides]) &lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2024/ngs_transcriptomics_kvs_2023_with_solutions_v2.pdf Lecture slides with solutions])&amp;lt;/DD&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Kristoffer Vitting-Seerup&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: RNAseq ([[Rnaseq_exercise]]) &amp;lt;!-- ([[Rnaseq_exercise_answers]]) --&amp;gt; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Kristoffer Vitting-Seerup, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 9 (Day 5)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Ancient DNA and 3D genomics&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-10:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Ancient DNA ([https://teaching.healthtech.dtu.dk/material/22126/2026/dtu_adna_2026_red.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Martin Sikora&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00pm-10:15pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:15pm-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Ancient DNA ([[Ancient DNA exercise]]) ([[Ancient_DNA_exercise_answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Martin Sikora, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-2:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: 3D Genomics with Hi-C ([https://teaching.healthtech.dtu.dk/material/22126/2026/3D_Genomics_Workshop.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Juan Rodríguez&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00am-2:15pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:15pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: 3D Genomics with Hi-C ([[Exercise and answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Juan Rodríguez, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 12 (Day 6)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Microbial genomics&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45am &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: Use of next-generation (genome) sequencing in clinical microbiology ([https://teaching.healthtech.dtu.dk/22126/images/7/77/Microbial_genomics_course22126_slide1-30_compressed.pdf Lecture slides 1-30])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-11:10am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: ([[ Microbial_genomics_exercise ]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;11:10pm-11:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: Use of next-generation (genome) sequencing in clinical microbiology ([https://teaching.healthtech.dtu.dk/22126/images/6/6d/Microbial_genomics_course22126_slide31-75_compressed.pdf Lecture slides 31-75])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: ([[ Microbial_genomics_exercise ]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 13 (Day 7)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Phylogenomics&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DD&amp;gt; The same exercise page will be used throughout the day: ([[Exercise]]) ([[Solution]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 1 + exercise: Tree thinking ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1_Tree_thinking.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-10:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 2 + exercise: Data ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2_Data.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;11:00am-11:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 3 + exercise: Basic methods ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3_Basic_methods.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00am-1:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 4 + exercise: Models and support ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_4_Models_and_support.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00am-2:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 5 + exercise: Gene trees ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_5_Gene_trees.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;3:00am-3:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 6 + exercise: Molecular dating ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_6_MolecularDating.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 14 (Day 8)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Metabarcoding and group project&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;TBA ([ Lecture])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Luke Holman&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:55am-10:10am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:10am-12:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: TBA ([https://github.com/leholman/25.DTUmetabarcodingExercise/blob/main/README.md Metabarcoding Exercises]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Luke Holman, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:30pm &amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt; Recap Test ([https://teaching.healthtech.dtu.dk/material/22126/2026/Recap_test.pdf Test])([https://teaching.healthtech.dtu.dk/material/22126/2026/Recap_test_Answers.pdf Answers])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:30pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:30pm &amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Projects &amp;amp; Group formation ([https://teaching.healthtech.dtu.dk/material/22126/2026/Poster.pdf Lecture slides] [http://teaching.healthtech.dtu.dk/material/22126/2023/posters.tar.gz Examples from previous courses]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:30pm-4:00pm &amp;lt;/DT&amp;gt;  &lt;br /&gt;
&amp;lt;DD&amp;gt;Projects &amp;amp; Group formation, prepare an outline for tomorrow. please write group names in the [https://docs.google.com/document/d/1W5HzThk4zSi2xAE4dwmtgw35JtyNbwhuizseiLrxLr0/edit?usp=sharing document for 2026]&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 15 (Day 9)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Project consolation, check when your 3 minutes are [https://docs.google.com/spreadsheets/d/1eZeAo0jtpUcJpd7ti8h2ofjVJD8wYOUws9QMZwp0fQ8/edit?usp=sharing Timesheet]&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;DD&amp;gt;You can go to Discord for help, we will be available.&amp;lt;/DD&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-4:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 16 (Day 10)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 19 (Day 11)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 20 (Day 12)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 21 (Day 13)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 22 (Day 14)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project Work &amp;amp; Submit poster&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Q&amp;amp;A: Practical information about the exam&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 23 (Day 15)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Exam&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Written Exam&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=603</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=603"/>
		<updated>2026-01-12T10:05:30Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task02: Species-level taxonomic classification of bacterial genomes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a &#039;&#039;Stapholycoccus aureus&#039;&#039; isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to &#039;&#039;Stapholycoccus aureus&#039;&#039;, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results_from_teacher&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Genomes of the unknown ST have minimum 16,339 SNPs to genomes of ST207 or ST2326, whereas genomes og ST207 are maximum different by 897 SNPs.&lt;br /&gt;
&lt;br /&gt;
Accordingly, the unknown ST is genetically more distant from ST207 and ST2326 than it is apparent from the MLST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a slide from today&#039;s lecture that shows the distribution of genetic distances (pairwise SNP distances) in a collection of 446 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes.&lt;br /&gt;
&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Based on the shown distribution, do you think that the following statements are true or false:&lt;br /&gt;
* A: ST207 and ST2326 are the same strain ?&lt;br /&gt;
* B: ST207 and the unknown ST are the same phylogroup ?&lt;br /&gt;
* C: ST2326 and the unknown ST are different strains ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
* A: True&lt;br /&gt;
* B: True&lt;br /&gt;
* C: True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
There are 7 to 122 SNPs between genomes from the same person (if we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Yes, some genomes from different persons have pairwise SNP-distances that are low relative the the distances between genomes from the same person. A quick search for information on the world wide web may suggest that for &#039;&#039;Pseudomonas aeruginosa&#039;&#039;, SNP-distances less than around 30 SNPs indicates transmission at the hospital.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the five ST2326 genome assemblies using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna &amp;gt; ~/microbial_exercise/output_abricate.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
Are the same AMR genes found in the five genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
No&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Do all found AMR genes have a good match to a database reference gene ? (sequence coverage of &amp;gt; 90% and sequence identity &amp;gt; 95%)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
No, three gene calls fails the criteria for a good match. Following command can be used the find the three gene calls:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/output_abricate.txt  | cut -f1,6,10,11 | awk &#039;$3&amp;lt;=90 || $4&amp;lt;=95&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Program_2026&amp;diff=602</id>
		<title>Program 2026</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Program_2026&amp;diff=602"/>
		<updated>2026-01-12T09:56:19Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;NOTE: THIS PAGE IS UNDER CONSTRUCTION WITH A NEW TEACHER IN 2026&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;REMEMBER TO BRING A LAPTOP FOR EXERCISES&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lectures will be in person in building [https://maps.app.goo.gl/wH5EW199wrChCmWK7 341] in auditorium 23. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lectures and exercises will take place on Discord (https://discord.gg/Qgw9M3SZA5). Please register with your full name. Will use Discord for online classes and collaboration with your project partners. Rather than emailing questions to the teaching staff, I encourage you to post your questions on discord.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The course has two main parts, the first half is lectures and exercises and the last half is project work ending with the exam on &#039;&#039;&#039;Friday 23rd of January 2026&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For the laptop &#039;&#039;&#039; if you have a secure laptop (e.g. work laptop from Statens Serum Institut for instance), please bring your personal laptop.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=== Course Program - January 2026 ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 5 (Day 1)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Introduction - Next Generation Sequencing&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:30am&amp;lt;/DT&amp;gt;  &lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to course &lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-1-Intro.pdf Lecture slides])&lt;br /&gt;
&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:30am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;dd&amp;gt;Introduction to NGS &lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-2-NGS_basics.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-10:45am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;The NGS revolution&lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-3-NGS_revolution.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:45am-11:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;11:00am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Logging on to our pupil servers ([[Logging on to pupil system]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury , Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:30pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Logging on to our pupil servers ([[Logging on to pupil system]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury , Amanda Gammelby Qvesel, Mads Hartmann  &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:30pm-2:15pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to UNIX &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;([https://teaching.healthtech.dtu.dk/22113/index.php/Unix Video lectures to watch from &amp;quot;Unix intro..&amp;quot; to &amp;quot;Touching upon...&amp;quot;])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;([[Unix Exercises|Unix exercises]] – possible answers [[Unix_answers|here]])&lt;br /&gt;
([[Basic UNIX notes]])&lt;br /&gt;
([[Advanced UNIX and Pipes]])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:15pm-2:30pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:30pm-3:30pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to UNIX (continued)&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;([https://teaching.healthtech.dtu.dk/22113/index.php/Unix Video lectures to watch from &amp;quot;Unix intro..&amp;quot; to &amp;quot;Touching upon...&amp;quot;])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;([[Unix Exercises|Unix exercises]] – possible answers [[Unix_answers|here]])&lt;br /&gt;
([[Basic UNIX notes]])&lt;br /&gt;
([[Advanced UNIX and Pipes]])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;3:30pm-4:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;First look at data&lt;br /&gt;
([[First look exercise]])&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 6 (Day 2)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Data pre-processing &amp;amp; Alignment&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45am &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Data basics ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-1-Data_basics.pdf Lecture slides]) ([[Data basics exercise]]) ([[Data basics exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Data pre-processing ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-2-QC_preprocessing.pdf Lecture slides]) ([[Data Preprocess exercise]]) ([[Data Preprocess exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm  &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Alignment ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-3-Alignment.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Alignment ([[Alignment exercise]]) ([[Alignment exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 7 (Day 3)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Variant calling &#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:30am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Functional Variation&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-1-Functional_variation.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:30am-10:15am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Variant calling part 1 ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-2-Preprocessing-variant_calling.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:15am-10:30am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:30am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Preprocessing ([[Postprocess exercise]])  ([[Postprocess_exercise_answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: variant calling part 1 ([[SNP calling exercise part 1]]) ([[SNP_calling_exercise_answers part 1]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: variant calling part 2 ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-3-Variant_filtering.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: variant calling part 2 ([[SNP calling exercise part 2]]) ([[SNP_calling_exercise_answers part 2]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 8 (Day 4)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Assembly, annotation and RNA-seq&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: de novo assembly and genomic annotations ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_4-1-Denovo.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45pm-10:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00pm-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: de novo assembly ([[denovo exercise]]) ([[denovo solution]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: RNAseq ([https://teaching.healthtech.dtu.dk/material/22126/2024/ngs_transcriptomics_kvs_2023_without_solutions_v2.pdf Lecture slides]) &lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2024/ngs_transcriptomics_kvs_2023_with_solutions_v2.pdf Lecture slides with solutions])&amp;lt;/DD&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Kristoffer Vitting-Seerup&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: RNAseq ([[Rnaseq_exercise]]) &amp;lt;!-- ([[Rnaseq_exercise_answers]]) --&amp;gt; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Kristoffer Vitting-Seerup, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 9 (Day 5)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Ancient DNA and 3D genomics&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-10:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Ancient DNA ([https://teaching.healthtech.dtu.dk/material/22126/2026/dtu_adna_2026_red.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Martin Sikora&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00pm-10:15pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:15pm-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Ancient DNA ([[Ancient DNA exercise]]) ([[Ancient_DNA_exercise_answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Martin Sikora, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-2:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: 3D Genomics with Hi-C ([https://teaching.healthtech.dtu.dk/material/22126/2026/3D_Genomics_Workshop.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Juan Rodríguez&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00am-2:15pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:15pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: 3D Genomics with Hi-C ([[Exercise and answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Juan Rodríguez, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 12 (Day 6)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Microbial genomics&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45am &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: Use of next-generation (genome) sequencing in clinical microbiology ([https://teaching.healthtech.dtu.dk/22126/images/7/77/Microbial_genomics_course22126_slide1-30_compressed.pdf Lecture slides 1-30])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-11:10am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: ([[ Microbial_genomics_exercise ]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;11:10pm-11:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: Use of next-generation (genome) sequencing in clinical microbiology ([https://teaching.healthtech.dtu.dk/22126/images/6/6d/Microbial_genomics_course22126_slide31-75_compressed.pdf Lecture slides 31-75])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: ([[ Microbial_genomics_exercise ]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 13 (Day 7)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Phylogenomics&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DD&amp;gt; The same exercise page will be used throughout the day: ([[Exercise]]) ([[Solution]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 1 + exercise: Tree thinking ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1_Tree_thinking.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-10:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 2 + exercise: Data ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2_Data.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;11:00am-11:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 3 + exercise: Basic methods ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3_Basic_methods.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00am-1:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 4 + exercise: Models and support ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_4_Models_and_support.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00am-2:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 5 + exercise: Gene trees ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_5_Gene_trees.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;3:00am-3:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 6 + exercise: Molecular dating ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_6_MolecularDating.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 14 (Day 8)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Metabarcoding and group project&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;TBA ([ Lecture])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Luke Holman&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:55am-10:10am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:10am-12:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: TBA ([https://github.com/leholman/25.DTUmetabarcodingExercise/blob/main/README.md Metabarcoding Exercises]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Luke Holman, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:30pm &amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt; Recap Test ([https://teaching.healthtech.dtu.dk/material/22126/2026/Recap_test.pdf Test])([https://teaching.healthtech.dtu.dk/material/22126/2026/Recap_test_Answers.pdf Answers])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:30pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:30pm &amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Projects &amp;amp; Group formation ([https://teaching.healthtech.dtu.dk/material/22126/2026/Poster.pdf Lecture slides] [http://teaching.healthtech.dtu.dk/material/22126/2023/posters.tar.gz Examples from previous courses]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:30pm-4:00pm &amp;lt;/DT&amp;gt;  &lt;br /&gt;
&amp;lt;DD&amp;gt;Projects &amp;amp; Group formation, prepare an outline for tomorrow. please write group names in the [https://docs.google.com/document/d/1W5HzThk4zSi2xAE4dwmtgw35JtyNbwhuizseiLrxLr0/edit?usp=sharing document for 2026]&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 15 (Day 9)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Project consolation, check when your 3 minutes are [https://docs.google.com/spreadsheets/d/1eZeAo0jtpUcJpd7ti8h2ofjVJD8wYOUws9QMZwp0fQ8/edit?usp=sharing Timesheet]&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;DD&amp;gt;You can go to Discord for help, we will be available.&amp;lt;/DD&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-4:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 16 (Day 10)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 19 (Day 11)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 20 (Day 12)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 21 (Day 13)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 22 (Day 14)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project Work &amp;amp; Submit poster&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Q&amp;amp;A: Practical information about the exam&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 23 (Day 15)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Exam&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Written Exam&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Program_2026&amp;diff=601</id>
		<title>Program 2026</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Program_2026&amp;diff=601"/>
		<updated>2026-01-12T09:55:18Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;NOTE: THIS PAGE IS UNDER CONSTRUCTION WITH A NEW TEACHER IN 2026&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;REMEMBER TO BRING A LAPTOP FOR EXERCISES&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lectures will be in person in building [https://maps.app.goo.gl/wH5EW199wrChCmWK7 341] in auditorium 23. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lectures and exercises will take place on Discord (https://discord.gg/Qgw9M3SZA5). Please register with your full name. Will use Discord for online classes and collaboration with your project partners. Rather than emailing questions to the teaching staff, I encourage you to post your questions on discord.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The course has two main parts, the first half is lectures and exercises and the last half is project work ending with the exam on &#039;&#039;&#039;Friday 23rd of January 2026&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For the laptop &#039;&#039;&#039; if you have a secure laptop (e.g. work laptop from Statens Serum Institut for instance), please bring your personal laptop.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=== Course Program - January 2026 ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 5 (Day 1)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Introduction - Next Generation Sequencing&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:30am&amp;lt;/DT&amp;gt;  &lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to course &lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-1-Intro.pdf Lecture slides])&lt;br /&gt;
&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:30am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;dd&amp;gt;Introduction to NGS &lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-2-NGS_basics.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-10:45am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;The NGS revolution&lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-3-NGS_revolution.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:45am-11:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;11:00am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Logging on to our pupil servers ([[Logging on to pupil system]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury , Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:30pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Logging on to our pupil servers ([[Logging on to pupil system]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury , Amanda Gammelby Qvesel, Mads Hartmann  &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:30pm-2:15pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to UNIX &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;([https://teaching.healthtech.dtu.dk/22113/index.php/Unix Video lectures to watch from &amp;quot;Unix intro..&amp;quot; to &amp;quot;Touching upon...&amp;quot;])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;([[Unix Exercises|Unix exercises]] – possible answers [[Unix_answers|here]])&lt;br /&gt;
([[Basic UNIX notes]])&lt;br /&gt;
([[Advanced UNIX and Pipes]])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:15pm-2:30pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:30pm-3:30pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to UNIX (continued)&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;([https://teaching.healthtech.dtu.dk/22113/index.php/Unix Video lectures to watch from &amp;quot;Unix intro..&amp;quot; to &amp;quot;Touching upon...&amp;quot;])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;([[Unix Exercises|Unix exercises]] – possible answers [[Unix_answers|here]])&lt;br /&gt;
([[Basic UNIX notes]])&lt;br /&gt;
([[Advanced UNIX and Pipes]])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;3:30pm-4:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;First look at data&lt;br /&gt;
([[First look exercise]])&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 6 (Day 2)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Data pre-processing &amp;amp; Alignment&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45am &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Data basics ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-1-Data_basics.pdf Lecture slides]) ([[Data basics exercise]]) ([[Data basics exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Data pre-processing ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-2-QC_preprocessing.pdf Lecture slides]) ([[Data Preprocess exercise]]) ([[Data Preprocess exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm  &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Alignment ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-3-Alignment.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Alignment ([[Alignment exercise]]) ([[Alignment exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 7 (Day 3)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Variant calling &#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:30am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Functional Variation&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-1-Functional_variation.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:30am-10:15am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Variant calling part 1 ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-2-Preprocessing-variant_calling.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:15am-10:30am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:30am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Preprocessing ([[Postprocess exercise]])  ([[Postprocess_exercise_answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: variant calling part 1 ([[SNP calling exercise part 1]]) ([[SNP_calling_exercise_answers part 1]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: variant calling part 2 ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-3-Variant_filtering.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: variant calling part 2 ([[SNP calling exercise part 2]]) ([[SNP_calling_exercise_answers part 2]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 8 (Day 4)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Assembly, annotation and RNA-seq&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: de novo assembly and genomic annotations ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_4-1-Denovo.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45pm-10:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00pm-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: de novo assembly ([[denovo exercise]]) ([[denovo solution]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: RNAseq ([https://teaching.healthtech.dtu.dk/material/22126/2024/ngs_transcriptomics_kvs_2023_without_solutions_v2.pdf Lecture slides]) &lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2024/ngs_transcriptomics_kvs_2023_with_solutions_v2.pdf Lecture slides with solutions])&amp;lt;/DD&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Kristoffer Vitting-Seerup&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: RNAseq ([[Rnaseq_exercise]]) &amp;lt;!-- ([[Rnaseq_exercise_answers]]) --&amp;gt; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Kristoffer Vitting-Seerup, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 9 (Day 5)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Ancient DNA and 3D genomics&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-10:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Ancient DNA ([https://teaching.healthtech.dtu.dk/material/22126/2026/dtu_adna_2026_red.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Martin Sikora&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00pm-10:15pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:15pm-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Ancient DNA ([[Ancient DNA exercise]]) ([[Ancient_DNA_exercise_answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Martin Sikora, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-2:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: 3D Genomics with Hi-C ([https://teaching.healthtech.dtu.dk/material/22126/2026/3D_Genomics_Workshop.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Juan Rodríguez&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00am-2:15pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:15pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: 3D Genomics with Hi-C ([[Exercise and answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Juan Rodríguez, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 12 (Day 6)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Microbial genomics&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45am &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Use of next-generation (genome) sequencing in clinical microbiology ([https://teaching.healthtech.dtu.dk/22126/images/7/77/Microbial_genomics_course22126_slide1-30_compressed.pdf Lecture slides 1-30])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-11:10am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: ([[ Microbial_genomics_exercise ]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;11:10pm-11:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: Use of next-generation (genome) sequencing in clinical microbiology ([https://teaching.healthtech.dtu.dk/22126/images/6/6d/Microbial_genomics_course22126_slide31-75_compressed.pdf Lecture slides 31-75])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: ([[ Microbial_genomics_exercise ]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 13 (Day 7)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Phylogenomics&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DD&amp;gt; The same exercise page will be used throughout the day: ([[Exercise]]) ([[Solution]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 1 + exercise: Tree thinking ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1_Tree_thinking.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-10:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 2 + exercise: Data ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2_Data.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;11:00am-11:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 3 + exercise: Basic methods ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3_Basic_methods.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00am-1:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 4 + exercise: Models and support ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_4_Models_and_support.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00am-2:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 5 + exercise: Gene trees ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_5_Gene_trees.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;3:00am-3:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 6 + exercise: Molecular dating ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_6_MolecularDating.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 14 (Day 8)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Metabarcoding and group project&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;TBA ([ Lecture])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Luke Holman&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:55am-10:10am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:10am-12:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: TBA ([https://github.com/leholman/25.DTUmetabarcodingExercise/blob/main/README.md Metabarcoding Exercises]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Luke Holman, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:30pm &amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt; Recap Test ([https://teaching.healthtech.dtu.dk/material/22126/2026/Recap_test.pdf Test])([https://teaching.healthtech.dtu.dk/material/22126/2026/Recap_test_Answers.pdf Answers])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:30pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:30pm &amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Projects &amp;amp; Group formation ([https://teaching.healthtech.dtu.dk/material/22126/2026/Poster.pdf Lecture slides] [http://teaching.healthtech.dtu.dk/material/22126/2023/posters.tar.gz Examples from previous courses]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:30pm-4:00pm &amp;lt;/DT&amp;gt;  &lt;br /&gt;
&amp;lt;DD&amp;gt;Projects &amp;amp; Group formation, prepare an outline for tomorrow. please write group names in the [https://docs.google.com/document/d/1W5HzThk4zSi2xAE4dwmtgw35JtyNbwhuizseiLrxLr0/edit?usp=sharing document for 2026]&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 15 (Day 9)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Project consolation, check when your 3 minutes are [https://docs.google.com/spreadsheets/d/1eZeAo0jtpUcJpd7ti8h2ofjVJD8wYOUws9QMZwp0fQ8/edit?usp=sharing Timesheet]&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;DD&amp;gt;You can go to Discord for help, we will be available.&amp;lt;/DD&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-4:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 16 (Day 10)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 19 (Day 11)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 20 (Day 12)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 21 (Day 13)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 22 (Day 14)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project Work &amp;amp; Submit poster&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Q&amp;amp;A: Practical information about the exam&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 23 (Day 15)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Exam&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Written Exam&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Program_2026&amp;diff=600</id>
		<title>Program 2026</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Program_2026&amp;diff=600"/>
		<updated>2026-01-12T09:51:49Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;NOTE: THIS PAGE IS UNDER CONSTRUCTION WITH A NEW TEACHER IN 2026&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;REMEMBER TO BRING A LAPTOP FOR EXERCISES&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lectures will be in person in building [https://maps.app.goo.gl/wH5EW199wrChCmWK7 341] in auditorium 23. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lectures and exercises will take place on Discord (https://discord.gg/Qgw9M3SZA5). Please register with your full name. Will use Discord for online classes and collaboration with your project partners. Rather than emailing questions to the teaching staff, I encourage you to post your questions on discord.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The course has two main parts, the first half is lectures and exercises and the last half is project work ending with the exam on &#039;&#039;&#039;Friday 23rd of January 2026&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For the laptop &#039;&#039;&#039; if you have a secure laptop (e.g. work laptop from Statens Serum Institut for instance), please bring your personal laptop.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=== Course Program - January 2026 ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 5 (Day 1)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Introduction - Next Generation Sequencing&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:30am&amp;lt;/DT&amp;gt;  &lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to course &lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-1-Intro.pdf Lecture slides])&lt;br /&gt;
&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:30am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;dd&amp;gt;Introduction to NGS &lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-2-NGS_basics.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-10:45am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;The NGS revolution&lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-3-NGS_revolution.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:45am-11:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;11:00am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Logging on to our pupil servers ([[Logging on to pupil system]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury , Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:30pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Logging on to our pupil servers ([[Logging on to pupil system]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury , Amanda Gammelby Qvesel, Mads Hartmann  &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:30pm-2:15pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to UNIX &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;([https://teaching.healthtech.dtu.dk/22113/index.php/Unix Video lectures to watch from &amp;quot;Unix intro..&amp;quot; to &amp;quot;Touching upon...&amp;quot;])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;([[Unix Exercises|Unix exercises]] – possible answers [[Unix_answers|here]])&lt;br /&gt;
([[Basic UNIX notes]])&lt;br /&gt;
([[Advanced UNIX and Pipes]])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:15pm-2:30pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:30pm-3:30pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to UNIX (continued)&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;([https://teaching.healthtech.dtu.dk/22113/index.php/Unix Video lectures to watch from &amp;quot;Unix intro..&amp;quot; to &amp;quot;Touching upon...&amp;quot;])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;([[Unix Exercises|Unix exercises]] – possible answers [[Unix_answers|here]])&lt;br /&gt;
([[Basic UNIX notes]])&lt;br /&gt;
([[Advanced UNIX and Pipes]])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;3:30pm-4:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;First look at data&lt;br /&gt;
([[First look exercise]])&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 6 (Day 2)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Data pre-processing &amp;amp; Alignment&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45am &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Data basics ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-1-Data_basics.pdf Lecture slides]) ([[Data basics exercise]]) ([[Data basics exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Data pre-processing ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-2-QC_preprocessing.pdf Lecture slides]) ([[Data Preprocess exercise]]) ([[Data Preprocess exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm  &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Alignment ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-3-Alignment.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Alignment ([[Alignment exercise]]) ([[Alignment exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 7 (Day 3)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Variant calling &#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:30am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Functional Variation&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-1-Functional_variation.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:30am-10:15am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Variant calling part 1 ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-2-Preprocessing-variant_calling.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:15am-10:30am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:30am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Preprocessing ([[Postprocess exercise]])  ([[Postprocess_exercise_answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: variant calling part 1 ([[SNP calling exercise part 1]]) ([[SNP_calling_exercise_answers part 1]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: variant calling part 2 ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-3-Variant_filtering.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: variant calling part 2 ([[SNP calling exercise part 2]]) ([[SNP_calling_exercise_answers part 2]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 8 (Day 4)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Assembly, annotation and RNA-seq&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: de novo assembly and genomic annotations ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_4-1-Denovo.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45pm-10:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00pm-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: de novo assembly ([[denovo exercise]]) ([[denovo solution]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: RNAseq ([https://teaching.healthtech.dtu.dk/material/22126/2024/ngs_transcriptomics_kvs_2023_without_solutions_v2.pdf Lecture slides]) &lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2024/ngs_transcriptomics_kvs_2023_with_solutions_v2.pdf Lecture slides with solutions])&amp;lt;/DD&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Kristoffer Vitting-Seerup&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: RNAseq ([[Rnaseq_exercise]]) &amp;lt;!-- ([[Rnaseq_exercise_answers]]) --&amp;gt; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Kristoffer Vitting-Seerup, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 9 (Day 5)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Ancient DNA and 3D genomics&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-10:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Ancient DNA ([https://teaching.healthtech.dtu.dk/material/22126/2026/dtu_adna_2026_red.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Martin Sikora&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00pm-10:15pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:15pm-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Ancient DNA ([[Ancient DNA exercise]]) ([[Ancient_DNA_exercise_answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Martin Sikora, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-2:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: 3D Genomics with Hi-C ([https://teaching.healthtech.dtu.dk/material/22126/2026/3D_Genomics_Workshop.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Juan Rodríguez&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00am-2:15pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:15pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: 3D Genomics with Hi-C ([[Exercise and answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Juan Rodríguez, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 12 (Day 6)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Microbial genomics&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45am &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Use of next-generation (genome) sequencing in clinical microbiology ([https://teaching.healthtech.dtu.dk/22126/images/7/77/Microbial_genomics_course22126_slide1-30_compressed.pdf Lecture slides 1-30])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: ([[ Microbial_genomics_exercise ]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: Use of next-generation (genome) sequencing in clinical microbiology ([https://teaching.healthtech.dtu.dk/22126/images/6/6d/Microbial_genomics_course22126_slide31-75_compressed.pdf Lecture slides 31-75])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: ([[ Microbial_genomics_exercise ]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 13 (Day 7)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Phylogenomics&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DD&amp;gt; The same exercise page will be used throughout the day: ([[Exercise]]) ([[Solution]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 1 + exercise: Tree thinking ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1_Tree_thinking.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-10:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 2 + exercise: Data ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2_Data.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;11:00am-11:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 3 + exercise: Basic methods ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3_Basic_methods.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00am-1:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 4 + exercise: Models and support ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_4_Models_and_support.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00am-2:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 5 + exercise: Gene trees ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_5_Gene_trees.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;3:00am-3:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 6 + exercise: Molecular dating ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_6_MolecularDating.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 14 (Day 8)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Metabarcoding and group project&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;TBA ([ Lecture])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Luke Holman&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:55am-10:10am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:10am-12:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: TBA ([https://github.com/leholman/25.DTUmetabarcodingExercise/blob/main/README.md Metabarcoding Exercises]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Luke Holman, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:30pm &amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt; Recap Test ([https://teaching.healthtech.dtu.dk/material/22126/2026/Recap_test.pdf Test])([https://teaching.healthtech.dtu.dk/material/22126/2026/Recap_test_Answers.pdf Answers])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:30pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:30pm &amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Projects &amp;amp; Group formation ([https://teaching.healthtech.dtu.dk/material/22126/2026/Poster.pdf Lecture slides] [http://teaching.healthtech.dtu.dk/material/22126/2023/posters.tar.gz Examples from previous courses]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:30pm-4:00pm &amp;lt;/DT&amp;gt;  &lt;br /&gt;
&amp;lt;DD&amp;gt;Projects &amp;amp; Group formation, prepare an outline for tomorrow. please write group names in the [https://docs.google.com/document/d/1W5HzThk4zSi2xAE4dwmtgw35JtyNbwhuizseiLrxLr0/edit?usp=sharing document for 2026]&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 15 (Day 9)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Project consolation, check when your 3 minutes are [https://docs.google.com/spreadsheets/d/1eZeAo0jtpUcJpd7ti8h2ofjVJD8wYOUws9QMZwp0fQ8/edit?usp=sharing Timesheet]&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;DD&amp;gt;You can go to Discord for help, we will be available.&amp;lt;/DD&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-4:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 16 (Day 10)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 19 (Day 11)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 20 (Day 12)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 21 (Day 13)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 22 (Day 14)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project Work &amp;amp; Submit poster&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Q&amp;amp;A: Practical information about the exam&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 23 (Day 15)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Exam&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Written Exam&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=File:Microbial_genomics_course22126_slide31-75_compressed.pdf&amp;diff=599</id>
		<title>File:Microbial genomics course22126 slide31-75 compressed.pdf</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=File:Microbial_genomics_course22126_slide31-75_compressed.pdf&amp;diff=599"/>
		<updated>2026-01-12T09:50:54Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=598</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=598"/>
		<updated>2026-01-12T09:46:17Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a &#039;&#039;Stapholycoccus aureus&#039;&#039; isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to &#039;&#039;Stapholycoccus aureus&#039;&#039;, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results/output_gtdb_from_teacher&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/output_gtdb_from_teacher&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Genomes of the unknown ST have minimum 16,339 SNPs to genomes of ST207 or ST2326, whereas genomes og ST207 are maximum different by 897 SNPs.&lt;br /&gt;
&lt;br /&gt;
Accordingly, the unknown ST is genetically more distant from ST207 and ST2326 than it is apparent from the MLST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a slide from today&#039;s lecture that shows the distribution of genetic distances (pairwise SNP distances) in a collection of 446 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes.&lt;br /&gt;
&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Based on the shown distribution, do you think that the following statements are true or false:&lt;br /&gt;
* A: ST207 and ST2326 are the same strain ?&lt;br /&gt;
* B: ST207 and the unknown ST are the same phylogroup ?&lt;br /&gt;
* C: ST2326 and the unknown ST are different strains ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
* A: True&lt;br /&gt;
* B: True&lt;br /&gt;
* C: True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
There are 7 to 122 SNPs between genomes from the same person (if we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Yes, some genomes from different persons have pairwise SNP-distances that are low relative the the distances between genomes from the same person. A quick search for information on the world wide web may suggest that for &#039;&#039;Pseudomonas aeruginosa&#039;&#039;, SNP-distances less than around 30 SNPs indicates transmission at the hospital.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the five ST2326 genome assemblies using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna &amp;gt; ~/microbial_exercise/output_abricate.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
Are the same AMR genes found in the five genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
No&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Do all found AMR genes have a good match to a database reference gene ? (sequence coverage of &amp;gt; 90% and sequence identity &amp;gt; 95%)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
No, three gene calls fails the criteria for a good match. Following command can be used the find the three gene calls:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/output_abricate.txt  | cut -f1,6,10,11 | awk &#039;$3&amp;lt;=90 || $4&amp;lt;=95&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Program_2026&amp;diff=597</id>
		<title>Program 2026</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Program_2026&amp;diff=597"/>
		<updated>2026-01-12T09:38:40Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;NOTE: THIS PAGE IS UNDER CONSTRUCTION WITH A NEW TEACHER IN 2026&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;REMEMBER TO BRING A LAPTOP FOR EXERCISES&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lectures will be in person in building [https://maps.app.goo.gl/wH5EW199wrChCmWK7 341] in auditorium 23. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lectures and exercises will take place on Discord (https://discord.gg/Qgw9M3SZA5). Please register with your full name. Will use Discord for online classes and collaboration with your project partners. Rather than emailing questions to the teaching staff, I encourage you to post your questions on discord.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The course has two main parts, the first half is lectures and exercises and the last half is project work ending with the exam on &#039;&#039;&#039;Friday 23rd of January 2026&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For the laptop &#039;&#039;&#039; if you have a secure laptop (e.g. work laptop from Statens Serum Institut for instance), please bring your personal laptop.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=== Course Program - January 2026 ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 5 (Day 1)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Introduction - Next Generation Sequencing&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:30am&amp;lt;/DT&amp;gt;  &lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to course &lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-1-Intro.pdf Lecture slides])&lt;br /&gt;
&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:30am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;dd&amp;gt;Introduction to NGS &lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-2-NGS_basics.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-10:45am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;The NGS revolution&lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-3-NGS_revolution.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:45am-11:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;11:00am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Logging on to our pupil servers ([[Logging on to pupil system]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury , Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:30pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Logging on to our pupil servers ([[Logging on to pupil system]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury , Amanda Gammelby Qvesel, Mads Hartmann  &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:30pm-2:15pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to UNIX &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;([https://teaching.healthtech.dtu.dk/22113/index.php/Unix Video lectures to watch from &amp;quot;Unix intro..&amp;quot; to &amp;quot;Touching upon...&amp;quot;])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;([[Unix Exercises|Unix exercises]] – possible answers [[Unix_answers|here]])&lt;br /&gt;
([[Basic UNIX notes]])&lt;br /&gt;
([[Advanced UNIX and Pipes]])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:15pm-2:30pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:30pm-3:30pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to UNIX (continued)&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;([https://teaching.healthtech.dtu.dk/22113/index.php/Unix Video lectures to watch from &amp;quot;Unix intro..&amp;quot; to &amp;quot;Touching upon...&amp;quot;])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;([[Unix Exercises|Unix exercises]] – possible answers [[Unix_answers|here]])&lt;br /&gt;
([[Basic UNIX notes]])&lt;br /&gt;
([[Advanced UNIX and Pipes]])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;3:30pm-4:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;First look at data&lt;br /&gt;
([[First look exercise]])&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 6 (Day 2)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Data pre-processing &amp;amp; Alignment&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45am &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Data basics ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-1-Data_basics.pdf Lecture slides]) ([[Data basics exercise]]) ([[Data basics exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Data pre-processing ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-2-QC_preprocessing.pdf Lecture slides]) ([[Data Preprocess exercise]]) ([[Data Preprocess exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm  &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Alignment ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-3-Alignment.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Alignment ([[Alignment exercise]]) ([[Alignment exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 7 (Day 3)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Variant calling &#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:30am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Functional Variation&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-1-Functional_variation.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:30am-10:15am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Variant calling part 1 ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-2-Preprocessing-variant_calling.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:15am-10:30am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:30am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Preprocessing ([[Postprocess exercise]])  ([[Postprocess_exercise_answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: variant calling part 1 ([[SNP calling exercise part 1]]) ([[SNP_calling_exercise_answers part 1]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: variant calling part 2 ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-3-Variant_filtering.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: variant calling part 2 ([[SNP calling exercise part 2]]) ([[SNP_calling_exercise_answers part 2]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 8 (Day 4)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Assembly, annotation and RNA-seq&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: de novo assembly and genomic annotations ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_4-1-Denovo.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45pm-10:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00pm-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: de novo assembly ([[denovo exercise]]) ([[denovo solution]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: RNAseq ([https://teaching.healthtech.dtu.dk/material/22126/2024/ngs_transcriptomics_kvs_2023_without_solutions_v2.pdf Lecture slides]) &lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2024/ngs_transcriptomics_kvs_2023_with_solutions_v2.pdf Lecture slides with solutions])&amp;lt;/DD&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Kristoffer Vitting-Seerup&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: RNAseq ([[Rnaseq_exercise]]) &amp;lt;!-- ([[Rnaseq_exercise_answers]]) --&amp;gt; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Kristoffer Vitting-Seerup, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 9 (Day 5)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Ancient DNA and 3D genomics&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-10:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Ancient DNA ([https://teaching.healthtech.dtu.dk/material/22126/2026/dtu_adna_2026_red.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Martin Sikora&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00pm-10:15pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:15pm-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Ancient DNA ([[Ancient DNA exercise]]) ([[Ancient_DNA_exercise_answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Martin Sikora, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-2:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: 3D Genomics with Hi-C ([https://teaching.healthtech.dtu.dk/material/22126/2026/3D_Genomics_Workshop.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Juan Rodríguez&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00am-2:15pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:15pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: 3D Genomics with Hi-C ([[Exercise and answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Juan Rodríguez, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 12 (Day 6)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Microbial genomics&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45am &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Use of next-generation (genome) sequencing in clinical microbiology ([https://teaching.healthtech.dtu.dk/22126/images/7/77/Microbial_genomics_course22126_slide1-30_compressed.pdf Lecture slides 1-30])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: ([[ Microbial_genomics_exercise ]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: TBA ([ Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: ([[ Microbial_genomics_exercise ]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 13 (Day 7)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Phylogenomics&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DD&amp;gt; The same exercise page will be used throughout the day: ([[Exercise]]) ([[Solution]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 1 + exercise: Tree thinking ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1_Tree_thinking.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-10:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 2 + exercise: Data ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2_Data.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;11:00am-11:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 3 + exercise: Basic methods ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3_Basic_methods.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00am-1:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 4 + exercise: Models and support ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_4_Models_and_support.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00am-2:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 5 + exercise: Gene trees ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_5_Gene_trees.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;3:00am-3:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture 6 + exercise: Molecular dating ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_6_MolecularDating.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 14 (Day 8)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Metabarcoding and group project&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;TBA ([ Lecture])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Luke Holman&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:55am-10:10am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:10am-12:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: TBA ([https://github.com/leholman/25.DTUmetabarcodingExercise/blob/main/README.md Metabarcoding Exercises]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Luke Holman, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:30pm &amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt; Recap Test ([https://teaching.healthtech.dtu.dk/material/22126/2026/Recap_test.pdf Test])([https://teaching.healthtech.dtu.dk/material/22126/2026/Recap_test_Answers.pdf Answers])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:30pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:30pm &amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Projects &amp;amp; Group formation ([https://teaching.healthtech.dtu.dk/material/22126/2026/Poster.pdf Lecture slides] [http://teaching.healthtech.dtu.dk/material/22126/2023/posters.tar.gz Examples from previous courses]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:30pm-4:00pm &amp;lt;/DT&amp;gt;  &lt;br /&gt;
&amp;lt;DD&amp;gt;Projects &amp;amp; Group formation, prepare an outline for tomorrow. please write group names in the [https://docs.google.com/document/d/1W5HzThk4zSi2xAE4dwmtgw35JtyNbwhuizseiLrxLr0/edit?usp=sharing document for 2026]&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 15 (Day 9)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Project consolation, check when your 3 minutes are [https://docs.google.com/spreadsheets/d/1eZeAo0jtpUcJpd7ti8h2ofjVJD8wYOUws9QMZwp0fQ8/edit?usp=sharing Timesheet]&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;DD&amp;gt;You can go to Discord for help, we will be available.&amp;lt;/DD&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-4:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 16 (Day 10)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 19 (Day 11)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 20 (Day 12)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 21 (Day 13)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 22 (Day 14)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project Work &amp;amp; Submit poster&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Q&amp;amp;A: Practical information about the exam&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 23 (Day 15)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Exam&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Written Exam&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=File:Microbial_genomics_course22126_slide1-30_compressed.pdf&amp;diff=596</id>
		<title>File:Microbial genomics course22126 slide1-30 compressed.pdf</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=File:Microbial_genomics_course22126_slide1-30_compressed.pdf&amp;diff=596"/>
		<updated>2026-01-12T09:34:18Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Program_2026&amp;diff=593</id>
		<title>Program 2026</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Program_2026&amp;diff=593"/>
		<updated>2026-01-11T21:45:52Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;NOTE: THIS PAGE IS UNDER CONSTRUCTION WITH A NEW TEACHER IN 2026&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;REMEMBER TO BRING A LAPTOP FOR EXERCISES&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lectures will be in person in building [https://maps.app.goo.gl/wH5EW199wrChCmWK7 341] in auditorium 23. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lectures and exercises will take place on Discord (https://discord.gg/Qgw9M3SZA5). Please register with your full name. Will use Discord for online classes and collaboration with your project partners. Rather than emailing questions to the teaching staff, I encourage you to post your questions on discord.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The course has two main parts, the first half is lectures and exercises and the last half is project work ending with the exam on &#039;&#039;&#039;Friday 23rd of January 2026&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For the laptop &#039;&#039;&#039; if you have a secure laptop (e.g. work laptop from Statens Serum Institut for instance), please bring your personal laptop.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=== Course Program - January 2026 ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 5 (Day 1)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Introduction - Next Generation Sequencing&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:30am&amp;lt;/DT&amp;gt;  &lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to course &lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-1-Intro.pdf Lecture slides])&lt;br /&gt;
&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:30am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;dd&amp;gt;Introduction to NGS &lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-2-NGS_basics.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-10:45am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;The NGS revolution&lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_1-3-NGS_revolution.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:45am-11:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;11:00am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Logging on to our pupil servers ([[Logging on to pupil system]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury , Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:30pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Logging on to our pupil servers ([[Logging on to pupil system]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury , Amanda Gammelby Qvesel, Mads Hartmann  &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:30pm-2:15pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to UNIX &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;([https://teaching.healthtech.dtu.dk/22113/index.php/Unix Video lectures to watch from &amp;quot;Unix intro..&amp;quot; to &amp;quot;Touching upon...&amp;quot;])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;([[Unix Exercises|Unix exercises]] – possible answers [[Unix_answers|here]])&lt;br /&gt;
([[Basic UNIX notes]])&lt;br /&gt;
([[Advanced UNIX and Pipes]])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:15pm-2:30pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:30pm-3:30pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Introduction to UNIX (continued)&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;([https://teaching.healthtech.dtu.dk/22113/index.php/Unix Video lectures to watch from &amp;quot;Unix intro..&amp;quot; to &amp;quot;Touching upon...&amp;quot;])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;([[Unix Exercises|Unix exercises]] – possible answers [[Unix_answers|here]])&lt;br /&gt;
([[Basic UNIX notes]])&lt;br /&gt;
([[Advanced UNIX and Pipes]])&amp;lt;/DD&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;3:30pm-4:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;First look at data&lt;br /&gt;
([[First look exercise]])&lt;br /&gt;
&amp;lt;DD&amp;gt;Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 6 (Day 2)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Data pre-processing &amp;amp; Alignment&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45am &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Data basics ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-1-Data_basics.pdf Lecture slides]) ([[Data basics exercise]]) ([[Data basics exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Data pre-processing ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-2-QC_preprocessing.pdf Lecture slides]) ([[Data Preprocess exercise]]) ([[Data Preprocess exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm  &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Alignment ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_2-3-Alignment.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Alignment ([[Alignment exercise]]) ([[Alignment exercise answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 7 (Day 3)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Variant calling &#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:30am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Functional Variation&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-1-Functional_variation.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:30am-10:15am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Variant calling part 1 ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-2-Preprocessing-variant_calling.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:15am-10:30am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:30am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Preprocessing ([[Postprocess exercise]])  ([[Postprocess_exercise_answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: variant calling part 1 ([[SNP calling exercise part 1]]) ([[SNP_calling_exercise_answers part 1]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: variant calling part 2 ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_3-3-Variant_filtering.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: variant calling part 2 ([[SNP calling exercise part 2]]) ([[SNP_calling_exercise_answers part 2]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 8 (Day 4)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Assembly, annotation and RNA-seq&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: de novo assembly and genomic annotations ([https://teaching.healthtech.dtu.dk/material/22126/2026/Lecture_4-1-Denovo.pdf Lecture slides]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45pm-10:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00pm-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: de novo assembly ([[denovo exercise]]) ([[denovo solution]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: RNAseq ([https://teaching.healthtech.dtu.dk/material/22126/2024/ngs_transcriptomics_kvs_2023_without_solutions_v2.pdf Lecture slides]) &lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
([https://teaching.healthtech.dtu.dk/material/22126/2024/ngs_transcriptomics_kvs_2023_with_solutions_v2.pdf Lecture slides with solutions])&amp;lt;/DD&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Kristoffer Vitting-Seerup&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: RNAseq ([[Rnaseq_exercise]]) &amp;lt;!-- ([[Rnaseq_exercise_answers]]) --&amp;gt; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Kristoffer Vitting-Seerup, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 9 (Day 5)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Ancient DNA and 3D genomics&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-10:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Ancient DNA ([https://teaching.healthtech.dtu.dk/material/22126/2026/dtu_adna_2026_red.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Martin Sikora&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00pm-10:15pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:15pm-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: Ancient DNA ([[Ancient DNA exercise]]) ([[Ancient_DNA_exercise_answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Martin Sikora, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-2:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: 3D Genomics with Hi-C ([https://teaching.healthtech.dtu.dk/material/22126/2026/3D_Genomics_Workshop.pdf Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Juan Rodríguez&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00am-2:15pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:15pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: 3D Genomics with Hi-C ([[Exercise and answers]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Juan Rodríguez, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 12 (Day 6)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Microbial genomics&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:45am &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;TBA ([ Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:45am-10:00am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: ([[ Microbial_genomics_exercise ]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: TBA ([ Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: ([[ Microbial_genomics_exercise ]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Rasmus Lykke Marvig, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 13 (Day 7)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Phylogenomics&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;TBA ([])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:55am-10:10am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:10am-12:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: TBA ([[Exercise]]) ([[Solution]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; David Duchene&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Lecture: TBA ([Lecture slides])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:00pm-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: TBA ([[Exercises]]) ([[Solution]]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;David Duchene, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 14 (Day 8)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Metabarcoding and group project&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-9:55am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;TBA ([ Lecture])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Luke Holman&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;9:55am-10:10am&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:10am-12:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Exercise: TBA ([[Metabarcoding Exercise]]) ([[Metabarcoding Solution]])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Luke Holman&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039; &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-1:30pm &amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt; Recap Test ([https://teaching.healthtech.dtu.dk/material/22126/2026/Recap_test.pdf Test])([https://teaching.healthtech.dtu.dk/material/22126/2026/Recap_test_Answers.pdf Answers])&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann &amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:30pm-1:45pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:45pm-2:30pm &amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Projects &amp;amp; Group formation ([https://teaching.healthtech.dtu.dk/material/22126/2026/Poster.pdf Lecture slides] [http://teaching.healthtech.dtu.dk/material/22126/2023/posters.tar.gz Examples from previous courses]) &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;2:30pm-4:00pm &amp;lt;/DT&amp;gt;  &lt;br /&gt;
&amp;lt;DD&amp;gt;Projects &amp;amp; Group formation, prepare an outline for tomorrow. please write group names in the [https://docs.google.com/document/d/1W5HzThk4zSi2xAE4dwmtgw35JtyNbwhuizseiLrxLr0/edit?usp=sharing document for 2026]&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 15 (Day 9)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm&amp;lt;/DT&amp;gt; &lt;br /&gt;
&amp;lt;DD&amp;gt;Project consolation, check when your 3 minutes are [https://docs.google.com/spreadsheets/d/1eZeAo0jtpUcJpd7ti8h2ofjVJD8wYOUws9QMZwp0fQ8/edit?usp=sharing Timesheet]&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;DD&amp;gt;You can go to Discord for help, we will be available.&amp;lt;/DD&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;12:00pm-1:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;&#039;&#039;Lunch Break&#039;&#039;&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-4:00pm &amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project &amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 16 (Day 10)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Monday, January 19 (Day 11)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tuesday, January 20 (Day 12)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Wednesday, January 21 (Day 13)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project work&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work&amp;lt;/DD&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;1:00pm-3:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Thursday, January 22 (Day 14)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Project Work &amp;amp; Submit poster&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DT&amp;gt;10:00am-12:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Q&amp;amp;A: Practical information about the exam&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Project work/Office hours&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt; Mick Westbury, Amanda Gammelby Qvesel, Mads Hartmann&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Friday, January 23 (Day 15)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&#039;&#039;Exam&#039;&#039;&lt;br /&gt;
&amp;lt;DL&amp;gt;&lt;br /&gt;
&amp;lt;DT&amp;gt;9:00am-4:00pm&amp;lt;/DT&amp;gt;&lt;br /&gt;
&amp;lt;DD&amp;gt;Written Exam&amp;lt;/DD&amp;gt;&lt;br /&gt;
&amp;lt;/DL&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=592</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=592"/>
		<updated>2026-01-11T21:43:33Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task05: Detection of antimicrobial resistance genes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a &#039;&#039;Stapholycoccus aureus&#039;&#039; isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to &#039;&#039;Stapholycoccus aureus&#039;&#039;, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Genomes of the unknown ST have minimum 16,339 SNPs to genomes of ST207 or ST2326, whereas genomes og ST207 are maximum different by 897 SNPs.&lt;br /&gt;
&lt;br /&gt;
Accordingly, the unknown ST is genetically more distant from ST207 and ST2326 than it is apparent from the MLST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a slide from today&#039;s lecture that shows the distribution of genetic distances (pairwise SNP distances) in a collection of 446 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes.&lt;br /&gt;
&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Based on the shown distribution, do you think that the following statements are true or false:&lt;br /&gt;
* A: ST207 and ST2326 are the same strain ?&lt;br /&gt;
* B: ST207 and the unknown ST are the same phylogroup ?&lt;br /&gt;
* C: ST2326 and the unknown ST are different strains ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
* A: True&lt;br /&gt;
* B: True&lt;br /&gt;
* C: True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
There are 7 to 122 SNPs between genomes from the same person (if we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Yes, some genomes from different persons have pairwise SNP-distances that are low relative the the distances between genomes from the same person. A quick search for information on the world wide web may suggest that for &#039;&#039;Pseudomonas aeruginosa&#039;&#039;, SNP-distances less than around 30 SNPs indicates transmission at the hospital.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the five ST2326 genome assemblies using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna &amp;gt; ~/microbial_exercise/output_abricate.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
Are the same AMR genes found in the five genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
No&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Do all found AMR genes have a good match to a database reference gene ? (sequence coverage of &amp;gt; 90% and sequence identity &amp;gt; 95%)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
No, three gene calls fails the criteria for a good match. Following command can be used the find the three gene calls:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/output_abricate.txt  | cut -f1,6,10,11 | awk &#039;$3&amp;lt;=90 || $4&amp;lt;=95&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=591</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=591"/>
		<updated>2026-01-11T21:42:52Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a &#039;&#039;Stapholycoccus aureus&#039;&#039; isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to &#039;&#039;Stapholycoccus aureus&#039;&#039;, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Genomes of the unknown ST have minimum 16,339 SNPs to genomes of ST207 or ST2326, whereas genomes og ST207 are maximum different by 897 SNPs.&lt;br /&gt;
&lt;br /&gt;
Accordingly, the unknown ST is genetically more distant from ST207 and ST2326 than it is apparent from the MLST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a slide from today&#039;s lecture that shows the distribution of genetic distances (pairwise SNP distances) in a collection of 446 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes.&lt;br /&gt;
&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Based on the shown distribution, do you think that the following statements are true or false:&lt;br /&gt;
* A: ST207 and ST2326 are the same strain ?&lt;br /&gt;
* B: ST207 and the unknown ST are the same phylogroup ?&lt;br /&gt;
* C: ST2326 and the unknown ST are different strains ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
* A: True&lt;br /&gt;
* B: True&lt;br /&gt;
* C: True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
There are 7 to 122 SNPs between genomes from the same person (if we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Yes, some genomes from different persons have pairwise SNP-distances that are low relative the the distances between genomes from the same person. A quick search for information on the world wide web may suggest that for &#039;&#039;Pseudomonas aeruginosa&#039;&#039;, SNP-distances less than around 30 SNPs indicates transmission at the hospital.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the five ST2326 genome assemblies using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna &amp;gt; ~/microbial_exercise/output_abricate.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
Are the same AMR genes found in the five genomes ?&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
No&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Do all found AMR genes have a good match to a database reference gene ? (sequence coverage of &amp;gt; 90% and sequence identity &amp;gt; 95%)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
No, three gene calls fails the criteria for a good match. Following command can be used the find the three gene calls:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/output_abricate.txt  | cut -f1,6,10,11 | awk &#039;$3&amp;lt;=90 || $4&amp;lt;=95&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=590</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=590"/>
		<updated>2026-01-11T21:39:17Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task05: Detection of antimicrobial resistance genes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a &#039;&#039;Stapholycoccus aureus&#039;&#039; isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to &#039;&#039;Stapholycoccus aureus&#039;&#039;, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Genomes of the unknown ST have minimum 16,339 SNPs to genomes of ST207 or ST2326, whereas genomes og ST207 are maximum different by 897 SNPs.&lt;br /&gt;
&lt;br /&gt;
Accordingly, the unknown ST is genetically more distant from ST207 and ST2326 than it is apparent from the MLST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a slide from today&#039;s lecture that shows the distribution of genetic distances (pairwise SNP distances) in a collection of 446 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes.&lt;br /&gt;
&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Based on the shown distribution, do you think that the following statements are true or false:&lt;br /&gt;
* A: ST207 and ST2326 are the same strain ?&lt;br /&gt;
* B: ST207 and the unknown ST are the same phylogroup ?&lt;br /&gt;
* C: ST2326 and the unknown ST are different strains ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
* A: True&lt;br /&gt;
* B: True&lt;br /&gt;
* C: True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
There are 7 to 122 SNPs between genomes from the same person (if we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Yes, some genomes from different persons have pairwise SNP-distances that are low relative the the distances between genomes from the same person. A quick search for information on the world wide web may suggest that for &#039;&#039;Pseudomonas aeruginosa&#039;&#039;, SNP-distances less than around 30 SNPs indicates transmission at the hospital.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the five ST2326 genome assemblies using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna &amp;gt; ~/microbial_exercise/output_abricate.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
Are the AMR genes found in the five genomes ?&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Do all found AMR genes have a good match to a database reference gene ? (sequence coverage of &amp;gt; 90% and sequence identity &amp;gt; 95%)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fef&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=589</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=589"/>
		<updated>2026-01-11T21:32:49Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task05: Detection of antimicrobial resistance genes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a &#039;&#039;Stapholycoccus aureus&#039;&#039; isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to &#039;&#039;Stapholycoccus aureus&#039;&#039;, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Genomes of the unknown ST have minimum 16,339 SNPs to genomes of ST207 or ST2326, whereas genomes og ST207 are maximum different by 897 SNPs.&lt;br /&gt;
&lt;br /&gt;
Accordingly, the unknown ST is genetically more distant from ST207 and ST2326 than it is apparent from the MLST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a slide from today&#039;s lecture that shows the distribution of genetic distances (pairwise SNP distances) in a collection of 446 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes.&lt;br /&gt;
&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Based on the shown distribution, do you think that the following statements are true or false:&lt;br /&gt;
* A: ST207 and ST2326 are the same strain ?&lt;br /&gt;
* B: ST207 and the unknown ST are the same phylogroup ?&lt;br /&gt;
* C: ST2326 and the unknown ST are different strains ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
* A: True&lt;br /&gt;
* B: True&lt;br /&gt;
* C: True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
There are 7 to 122 SNPs between genomes from the same person (if we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Yes, some genomes from different persons have pairwise SNP-distances that are low relative the the distances between genomes from the same person. A quick search for information on the world wide web may suggest that for &#039;&#039;Pseudomonas aeruginosa&#039;&#039;, SNP-distances less than around 30 SNPs indicates transmission at the hospital.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna &amp;gt; ~/microbial_exercise/output_abricate.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fef&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=588</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=588"/>
		<updated>2026-01-11T21:31:27Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task05: Detection of antimicrobial resistance genes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a &#039;&#039;Stapholycoccus aureus&#039;&#039; isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to &#039;&#039;Stapholycoccus aureus&#039;&#039;, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Genomes of the unknown ST have minimum 16,339 SNPs to genomes of ST207 or ST2326, whereas genomes og ST207 are maximum different by 897 SNPs.&lt;br /&gt;
&lt;br /&gt;
Accordingly, the unknown ST is genetically more distant from ST207 and ST2326 than it is apparent from the MLST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a slide from today&#039;s lecture that shows the distribution of genetic distances (pairwise SNP distances) in a collection of 446 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes.&lt;br /&gt;
&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Based on the shown distribution, do you think that the following statements are true or false:&lt;br /&gt;
* A: ST207 and ST2326 are the same strain ?&lt;br /&gt;
* B: ST207 and the unknown ST are the same phylogroup ?&lt;br /&gt;
* C: ST2326 and the unknown ST are different strains ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
* A: True&lt;br /&gt;
* B: True&lt;br /&gt;
* C: True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
There are 7 to 122 SNPs between genomes from the same person (if we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Yes, some genomes from different persons have pairwise SNP-distances that are low relative the the distances between genomes from the same person. A quick search for information on the world wide web may suggest that for &#039;&#039;Pseudomonas aeruginosa&#039;&#039;, SNP-distances less than around 30 SNPs indicates transmission at the hospital.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fef&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=587</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=587"/>
		<updated>2026-01-11T21:30:22Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a &#039;&#039;Stapholycoccus aureus&#039;&#039; isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to &#039;&#039;Stapholycoccus aureus&#039;&#039;, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Genomes of the unknown ST have minimum 16,339 SNPs to genomes of ST207 or ST2326, whereas genomes og ST207 are maximum different by 897 SNPs.&lt;br /&gt;
&lt;br /&gt;
Accordingly, the unknown ST is genetically more distant from ST207 and ST2326 than it is apparent from the MLST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a slide from today&#039;s lecture that shows the distribution of genetic distances (pairwise SNP distances) in a collection of 446 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes.&lt;br /&gt;
&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Based on the shown distribution, do you think that the following statements are true or false:&lt;br /&gt;
* A: ST207 and ST2326 are the same strain ?&lt;br /&gt;
* B: ST207 and the unknown ST are the same phylogroup ?&lt;br /&gt;
* C: ST2326 and the unknown ST are different strains ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
* A: True&lt;br /&gt;
* B: True&lt;br /&gt;
* C: True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
There are 7 to 122 SNPs between genomes from the same person (if we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Yes, some genomes from different persons have pairwise SNP-distances that are low relative the the distances between genomes from the same person. A quick search for information on the world wide web may suggest that for &#039;&#039;Pseudomonas aeruginosa&#039;&#039;, SNP-distances less than around 30 SNPs indicates transmission at the hospital.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=586</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=586"/>
		<updated>2026-01-11T21:29:56Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task04: Whole-genome based determination of genetic relatedness */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Genomes of the unknown ST have minimum 16,339 SNPs to genomes of ST207 or ST2326, whereas genomes og ST207 are maximum different by 897 SNPs.&lt;br /&gt;
&lt;br /&gt;
Accordingly, the unknown ST is genetically more distant from ST207 and ST2326 than it is apparent from the MLST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a slide from today&#039;s lecture that shows the distribution of genetic distances (pairwise SNP distances) in a collection of 446 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes.&lt;br /&gt;
&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Based on the shown distribution, do you think that the following statements are true or false:&lt;br /&gt;
* A: ST207 and ST2326 are the same strain ?&lt;br /&gt;
* B: ST207 and the unknown ST are the same phylogroup ?&lt;br /&gt;
* C: ST2326 and the unknown ST are different strains ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
* A: True&lt;br /&gt;
* B: True&lt;br /&gt;
* C: True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
There are 7 to 122 SNPs between genomes from the same person (if we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Yes, some genomes from different persons have pairwise SNP-distances that are low relative the the distances between genomes from the same person. A quick search for information on the world wide web may suggest that for &#039;&#039;Pseudomonas aeruginosa&#039;&#039;, SNP-distances less than around 30 SNPs indicates transmission at the hospital.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=585</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=585"/>
		<updated>2026-01-11T21:29:16Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task04: Whole-genome based determination of genetic relatedness */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Genomes of the unknown ST have minimum 16,339 SNPs to genomes of ST207 or ST2326, whereas genomes og ST207 are maximum different by 897 SNPs.&lt;br /&gt;
&lt;br /&gt;
Accordingly, the unknown ST is genetically more distant from ST207 and ST2326 than it is apparent from the MLST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a slide from today&#039;s lecture that shows the distribution of genetic distances (pairwise SNP distances) in a collection of 446 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes.&lt;br /&gt;
&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Based on the shown distribution, do you think that the following statements are true or false:&lt;br /&gt;
* A: ST207 and ST2326 are the same strain ?&lt;br /&gt;
* B: ST207 and the unknown ST are the same phylogroup ?&lt;br /&gt;
* C: ST2326 and the unknown ST are different strains ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
* A: True&lt;br /&gt;
* B: True&lt;br /&gt;
* C: True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
There are 7 to 122 SNPs between genomes from the same person (if we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Yes, some genomes from different persons have pairwise SNP-distances that are low relative the the distances between genomes from the same person. A quick search for information on the world wide web may suggest that for Pseudomonas aeruginisa, SNP-distances less than around 30 SNPs indicates transmission at the hospital.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=584</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=584"/>
		<updated>2026-01-11T21:21:39Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task04: Whole-genome based determination of genetic relatedness */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Genomes of the unknown ST have minimum 16,339 SNPs to genomes of ST207 or ST2326, whereas genomes og ST207 are maximum different by 897 SNPs.&lt;br /&gt;
&lt;br /&gt;
Accordingly, the unknown ST is genetically more distant from ST207 and ST2326 than it is apparent from the MLST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a slide from today&#039;s lecture that shows the distribution of genetic distances (pairwise SNP distances) in a collection of 446 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes.&lt;br /&gt;
&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Based on the shown distribution, do you think that the following statements are true or false:&lt;br /&gt;
* A: ST207 and ST2326 are the same strain ?&lt;br /&gt;
* B: ST207 and the unknown ST are the same phylogroup ?&lt;br /&gt;
* C: ST2326 and the unknown ST are different strains ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
* A: True&lt;br /&gt;
* B: True&lt;br /&gt;
* C: True&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=583</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=583"/>
		<updated>2026-01-11T21:19:10Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task04: Whole-genome based determination of genetic relatedness */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Genomes of the unknown ST have minimum 16,339 SNPs to genomes of ST207 or ST2326, whereas genomes og ST207 are maximum different by 897 SNPs.&lt;br /&gt;
&lt;br /&gt;
Accordingly, the unknown ST is genetically more distant from ST207 and ST2326 than it is apparent from the MLST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a slide from today&#039;s lecture that shows the distribution of genetic distances (pairwise SNP distances) in a collection of 446 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes.&lt;br /&gt;
&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
Based on the shown distribution, do you think that the following statements are true or false:&lt;br /&gt;
* ST207 and ST2326 are the same strain ?&lt;br /&gt;
&lt;br /&gt;
Base&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=582</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=582"/>
		<updated>2026-01-11T21:16:24Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task04: Whole-genome based determination of genetic relatedness */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Genomes of the unknown ST have minimum 16,339 SNPs to genomes of ST207 or ST2326, whereas genomes og ST207 are maximum different by 897 SNPs.&lt;br /&gt;
&lt;br /&gt;
Accordingly, the unknown ST is genetically more distant from ST207 and ST2326 than it is apparent from the MLST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below is a slide from today&#039;s lecture that shows the distribution of genetic distances (pairwise SNP distances) in a collection of 446 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes.&lt;br /&gt;
&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=581</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=581"/>
		<updated>2026-01-11T21:11:45Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task04: Whole-genome based determination of genetic relatedness */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Genomes of the unknown ST have minimum 16,339 SNPs to genomes of ST207 or ST2326, whereas genomes og ST207 are maximum different by 897 SNPs.&lt;br /&gt;
&lt;br /&gt;
Accordingly, the unknown ST is a genetic outlier from ST207 and ST2326, and this is not apparent from the MLST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=580</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=580"/>
		<updated>2026-01-11T21:10:32Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task04: Whole-genome based determination of genetic relatedness */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
Genomes of the unknown ST have minimum 16,339 SNPs to genomes of ST207 or ST2326, whereas genomes og ST207 are maximum different by 897 SNPs.&lt;br /&gt;
&lt;br /&gt;
Accordingly, the unknown ST is a genetic outlier from ST207 and ST2326, and this is not apparent from the MLST.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=579</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=579"/>
		<updated>2026-01-11T21:06:11Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task04: Whole-genome based determination of genetic relatedness */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=578</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=578"/>
		<updated>2026-01-11T21:04:51Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task04: Whole-genome based determination of genetic relatedness */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=577</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=577"/>
		<updated>2026-01-11T21:03:28Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task04: Whole-genome based determination of genetic relatedness */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=576</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=576"/>
		<updated>2026-01-11T20:59:59Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task03: Subspecies-level genetic typing of bacterial genomes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ST207 versus ST2326: 1 allele differs&lt;br /&gt;
ST207 versus the unknown ST: 1 allele differs&lt;br /&gt;
ST2326 versus the unknown ST: 2 allele differs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=575</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=575"/>
		<updated>2026-01-11T20:57:37Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task03: Subspecies-level genetic typing of bacterial genomes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Unknown sequence type 6 that has allele combination acsA(38)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
Sequence type 2326 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(202)&lt;br /&gt;
Sequence type 207 that has allele combination acsA(47)        aroE(4) guaA(5) mutL(33)        nuoD(1) ppsA(6) trpE(40)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Answer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=574</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=574"/>
		<updated>2026-01-11T20:54:04Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task03: Subspecies-level genetic typing of bacterial genomes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Answer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Answer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=573</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=573"/>
		<updated>2026-01-11T20:52:18Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task03: Subspecies-level genetic typing of bacterial genomes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and methods may differ the approach and the genetic markers that they use for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=572</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=572"/>
		<updated>2026-01-11T20:49:27Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task02: Species-level taxonomic classification of bacterial genomes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the genomes. Two of these genomes are SH315x12_230929_A01176_AHKHK3DRX3 and SH490x72_241206_A01411_AHM2CHDRX5.&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
What is the average nucleotide identity for the best match for each of these genomes  ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       GCA_023446155.1, s__Flavobacterium sp023446155, 90.92%&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       GCA_021654635.1, s__Mycobacterium kiyosense, 82.85%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and may be based both on different genetic markers and approaches for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=571</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=571"/>
		<updated>2026-01-11T20:44:28Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task02: Species-level taxonomic classification of bacterial genomes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GTDB-Tk is unable to call a species for 11 of the samples. &lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and may be based both on different genetic markers and approaches for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=570</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=570"/>
		<updated>2026-01-11T20:39:41Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task02: Species-level taxonomic classification of bacterial genomes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and may be based both on different genetic markers and approaches for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=569</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=569"/>
		<updated>2026-01-11T20:38:37Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and may be based both on different genetic markers and approaches for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=568</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=568"/>
		<updated>2026-01-11T20:37:43Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task02: Species-level taxonomic classification of bacterial genomes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SH031220x1x74_210120_A00559_AHYKKMDRXX  Escherichia ruysiae&lt;br /&gt;
SH090321x2x74_210615_A01176_AHFKVKDRXY  Escherichia marmotae&lt;br /&gt;
SH178x24_220708_NS500314_AHTFHHAFX3     Klebsiella michiganensis&lt;br /&gt;
SH179x37_220805_A01176_AHG77VDRX2       Citrobacter braakii&lt;br /&gt;
SH182x46_220812_A00559_BHG7JLDRX2       Klebsiella grimontii&lt;br /&gt;
SH185x39_220812_A00559_BHG7JLDRX2       Acinetobacter geminorum&lt;br /&gt;
SH189x45_220812_A00559_BHG7JLDRX2       Mycobacterium intracellulare&lt;br /&gt;
SH204x81_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH204x82_220930_NS500314_AHW7FKAFX3     No species called&lt;br /&gt;
SH214x27_221104_A00559_AHKYCVDRX2       Citrobacter europaeus&lt;br /&gt;
SH214x54_221104_A00559_AHKYCVDRX2       Klebsiella huaxiensis&lt;br /&gt;
SH232x83_230120_A01411_AHKYCLDRX2       Enterococcus_B lactis&lt;br /&gt;
SH249x46_230306_A01411_AHMF5GDRX2       Klebsiella africana&lt;br /&gt;
SH257x03_230317_A00559_AHM5H3DRX2       Enterobacter mori&lt;br /&gt;
SH272x52_230512_A00559_AH5MNFDRX3       Stenotrophomonas maltophilia_AJ&lt;br /&gt;
SH274x36_230421_A00559_AHYGVWDRX2       Klebsiella michiganensis&lt;br /&gt;
SH275x46_230526_A01411_BHC33YDRX3       Klebsiella variicola&lt;br /&gt;
SH283x25_230721_A00559_BHGVVNDRX3       Citrobacter braakii&lt;br /&gt;
SH292x11_230714_A01411_AHGW7MDRX3       Stenotrophomonas maltophilia_G&lt;br /&gt;
SH315x12_230929_A01176_AHKHK3DRX3       No species called&lt;br /&gt;
SH333x35_231006_NB501792_AHMVFTAFX5     Enterobacter intestinihominis&lt;br /&gt;
SH338x33_231110_A00559_AHMTNJDRX3       Klebsiella quasipneumoniae&lt;br /&gt;
SH339x55_231020_NB501792_AHMTK7AFX5     Citrobacter_A sedlakii&lt;br /&gt;
SH344x10_231103_A00559_BHMN2KDRX3       Escherichia marmotae&lt;br /&gt;
SH344x63_231103_A00559_BHMN2KDRX3       Bacillus_A cereus&lt;br /&gt;
SH351x67_231211_A00559_AHMTCTDRX3       Acinetobacter pittii&lt;br /&gt;
SH372x20_240212_A01961_AHVFV3DRX3       Acinetobacter fasciculus&lt;br /&gt;
SH406x40_240426_NB501792_AH5LK3AFX7     Acinetobacter nosocomialis&lt;br /&gt;
SH420x32_240607_A01961_AH7HW2DRX5       Achromobacter ruhlandii&lt;br /&gt;
SH429x69_240628_A01961_AHC7NCDRX5       No species called&lt;br /&gt;
SH432x68_240705_A00559_AHFKFHDRX5       No species called&lt;br /&gt;
SH437x71_240906_A01411_AHGVFVDRX5       Klebsiella planticola&lt;br /&gt;
SH443x95_240809_A00559_AHFL5YDRX5       No species called&lt;br /&gt;
SH463x12_240927_NS500314_AHHJHMAFX7     Citrobacter portucalensis&lt;br /&gt;
SH485x65_241122_A01411_BHM2VFDRX5       No species called&lt;br /&gt;
SH490x72_241206_A01411_AHM2CHDRX5       No species called&lt;br /&gt;
SH512x30_250321_A01961_BHTMCKDRX5       Acinetobacter fasciculus&lt;br /&gt;
SH529x38_250613_LH00793_B22C72LLT1      Klebsiella grimontii&lt;br /&gt;
SH545x01_250516_A01411_AHYJHCDRX5       Serratia nevei&lt;br /&gt;
SH567x14_250926_LH00255_A22YTGHLT3      Klebsiella variicola&lt;br /&gt;
SH623x49_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
SH623x50_251128_LH00255_B22FYTTLT1      No species called&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and may be based both on different genetic markers and approaches for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=567</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=567"/>
		<updated>2026-01-11T20:32:51Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task02: Species-level taxonomic classification of bacterial genomes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, GTDK-Tk uses a lot of memory, so it is not feasible to run the tool at the course servers. Instead, the following command has already been to determine the species of the genomes and the results have been moved to &amp;lt;code&amp;gt;/home/projects/microbial_genomics/premade_task_results&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
mv ~/microbial_exercise/output_gtdb /home/projects/microbial_genomics/premade_task_results/.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and may be based both on different genetic markers and approaches for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=566</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=566"/>
		<updated>2026-01-11T20:27:05Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Use GTDB-Tk to determine the species of the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and may be based both on different genetic markers and approaches for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=565</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=565"/>
		<updated>2026-01-11T20:26:23Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
The reads could represent contamination contamination, but they could also represent misclassifications by Kraken.  &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Use GTDB-Tk to determine the species of the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and may be based both on different genetic markers and approaches for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=564</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=564"/>
		<updated>2026-01-11T20:23:40Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Use GTDB-Tk to determine the species of the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and may be based both on different genetic markers and approaches for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=563</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=563"/>
		<updated>2026-01-11T20:23:07Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500,9 gigabytes&lt;br /&gt;
&amp;lt;/div&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Use GTDB-Tk to determine the species of the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and may be based both on different genetic markers and approaches for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=562</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=562"/>
		<updated>2026-01-11T20:21:57Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
500.9 gigabytes&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Use GTDB-Tk to determine the species of the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and may be based both on different genetic markers and approaches for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=561</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=561"/>
		<updated>2026-01-11T20:20:15Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&lt;br /&gt;
You can use the following command to see if a considerable percentage (1st column) of reads classified to the species-level (6th column) corresponds to the species names presented in Table S3 from Nielsen et al.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/microbial_exercise/SRR28959339.kraken.report.txt | grep -w S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Use GTDB-Tk to determine the species of the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and may be based both on different genetic markers and approaches for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=560</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=560"/>
		<updated>2026-01-11T20:14:04Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by these commands that prints the path to your home directory and takes you there:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo $HOME&lt;br /&gt;
cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Use GTDB-Tk to determine the species of the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and may be based both on different genetic markers and approaches for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=559</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=559"/>
		<updated>2026-01-11T20:12:48Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by this command that takes you to your $HOME:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Use GTDB-Tk to determine the species of the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and may be based both on different genetic markers and approaches for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=558</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=558"/>
		<updated>2026-01-11T20:12:26Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction and getting ready ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is preferred that you should run the commands from your $HOME directory. So start by this command that takes you to your $HOME:&lt;br /&gt;
&amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Use GTDB-Tk to determine the species of the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and may be based both on different genetic markers and approaches for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=557</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=557"/>
		<updated>2026-01-11T20:10:15Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/microbial_exercise/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/SRR28959339.kraken.out.txt &amp;gt; ~/microbial_exercise/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/microbial_exercise/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Use GTDB-Tk to determine the species of the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/microbial_exercise/output_gtdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and may be based both on different genetic markers and approaches for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/microbial_exercise/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/microbial_exercise/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/microbial_exercise/output_parsnp/parsnp.ggr -S ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/microbial_exercise/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=556</id>
		<title>Microbial genomics exercise</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Microbial_genomics_exercise&amp;diff=556"/>
		<updated>2026-01-11T20:06:15Z</updated>

		<summary type="html">&lt;p&gt;Rasmus: /* Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Dear course participants,&lt;br /&gt;
&lt;br /&gt;
In this exercise you will analyse microbial genome sequences using bioinformatics tools that are commonly used for microbial diagnostics and research.&lt;br /&gt;
&lt;br /&gt;
You can run the tools using the provided BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
The paths to the BASH executables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/ctools/bin/kraken.sh&lt;br /&gt;
/home/ctools/bin/kraken_report.sh&lt;br /&gt;
/home/ctools/bin/gtdbtk.sh&lt;br /&gt;
/home/ctools/bin/mlst.sh&lt;br /&gt;
/home/ctools/bin/parsnp.sh&lt;br /&gt;
/home/ctools/bin/abricate.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; should already be part of your standard configured $PATH, but, if not, then you can add it by the following command and you should be able to execute the tools with writing the full path: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/home/ctools/bin:$PATH&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let us image that we are employed at a hospital to provide diagnostics for patient care...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task01: Taxonomic assignment of sequencing reads for detection of microbial pathogens ==&lt;br /&gt;
&lt;br /&gt;
You have found a great prospective observational research study from May 2025 by Nielsen et al. from Aalborg University on the &amp;quot;Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Media:Nielsen et al 2025 Application of rapid Nanopore metagenomic cell-free DNA sequencing to diagnose bloodstream infections.pdf|Click here to see research article by Nielsen et al.]]&lt;br /&gt;
&lt;br /&gt;
Nielsen et al. have deposited microbial DNA sequencing data from 23 positive metagenomic next-generation sequencing tests in National Center for Biotechnology Information (NCBI) Sequence Read Archive (SRA) in [https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1108520/ BioProject PRJNA1108520]. &lt;br /&gt;
&lt;br /&gt;
You can use the prefetch and fasterq-dump tools from the [https://github.com/ncbi/sra-tools SRA Toolkit] to download the data. This has already been done and the data is in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the commands that can be used to acquire the data (this is already done, but you are welcome to try yourselves in your home directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $HOME&lt;br /&gt;
prefetch SRRXXXXXXX&lt;br /&gt;
fasterq-dump SRRXXXXXXX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are named according to the SRA run accessions numbers (SRRXXXXXXXX). After email communication with Nielsen et al., you are able to translate run accession numbers to patient identifiers used in Table S3 (Detailed metadata on the assessment of relevance of mNGS findings) in the article supplementary information [https://teaching.healthtech.dtu.dk/22126/images/6/64/Spectrum.03295-24-s0001.docx available here].&lt;br /&gt;
&lt;br /&gt;
Table that translates run accession numbers to patient identifiers: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! sra_run_accession !! sample_id !! patient_id&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959350 || s001 || p001&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959349 || s002 || p002&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959338 || s004 || p020&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959334 || s006 || p028&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959333 || s008 || p049&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959332 || s009 || p072&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959331 || s013 || p091&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959330 || s014 || p098&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959329 || s015 || p104&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959328 || s016 || p105&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959348 || s029 || p019&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959347 || s031 || p092&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959346 || s033 || p127&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959345 || s034 || p128&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959344 || s041 || p139&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959343 || s042 || p140&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959342 || s043 || p141&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959341 || s044 || p143&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959335 || s057 || p164&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959340 || s058 || p172&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959339 || s059 || p173&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959337 || s060 || p175&lt;br /&gt;
|-&lt;br /&gt;
| SRR28959336 || s061 || p183&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The article does not mention how many microbial DNA sequencing reads that there are in each of the 23 positive metagenomic next-generation sequencing tests.&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Check how many reads are in the FASTQ file for each of the run accessions, .e.g., by using the following command ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wc -l /home/projects/microbial_genomics/task01_sequence_reads/*.fastq | awk &#039;NF==2 {print $2 &amp;quot;: &amp;quot; $1/4}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Solution ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959328.fastq: 174&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959329.fastq: 6489&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959330.fastq: 43&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959331.fastq: 56&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959332.fastq: 188&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959333.fastq: 9&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959334.fastq: 1426&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959335.fastq: 288&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959336.fastq: 839&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959337.fastq: 899&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959338.fastq: 6&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq: 217&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959340.fastq: 1879&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959341.fastq: 12&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959342.fastq: 45&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959343.fastq: 251&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959344.fastq: 2572&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959345.fastq: 69&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959346.fastq: 180&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959347.fastq: 37&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959348.fastq: 224&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959349.fastq: 303&lt;br /&gt;
/home/projects/microbial_genomics/task01_sequence_reads/SRR28959350.fastq: 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you want to try to determine the species the DNA that has been sequenced. For this, you can use Kraken that is a tool for taxonomic classification of DNA sequnece reads. Kraken does this by splitting the sequence read into k-mers that are then matched to a reference database with information about the lowest common ancestor of all organisms whose genomes contain that k-mer. After the matching, Kraken assign the read to the taxon that receives the strongest cumulative k-mer support. Accordingly, the Kraken performance relies on the sequence and taxonomic classification of the genomes that has been used to build the database. In this exercise, we use Kraken 1 (Kraken also comes in a Kraken 2 version) with the relative small MiniKraken DB_8GB database.&lt;br /&gt;
&lt;br /&gt;
Run Kraken for two of the sample files from Nielsen et al., e.g., run Kraken on SRR28959339:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/SRR28959339.fastq &amp;gt; ~/SRR28959339.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/SRR28959339.kraken.out.txt &amp;gt; ~/SRR28959339.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output files contain:&lt;br /&gt;
* .kraken.out: A classification result for each read&lt;br /&gt;
* .kraken.report: A summary report of taxonomic assignments&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How does your result align with the mNGS result in Table S3 from Nielsen et al.?&lt;br /&gt;
&lt;br /&gt;
The size of the MiniKraken DB_8GB database used in this exercise, is around 8 gigabytes. Nielsen et al. uses another approach to taxonomically classify reads, and their approach uses a database consisting of Genome Taxonomy Database (GTDB) representative bacterial and archaeal genomes from release 207 and virus (complete genomes) and fungi (all genomes) from NCBI RefSeq release 215.&lt;br /&gt;
&lt;br /&gt;
==== Question 3 ====&lt;br /&gt;
Check [https://benlangmead.github.io/aws-indexes/k2 this webpage] to see what is the size of a database for Kraken 2 that is based on GTDB relases 226 ?&lt;br /&gt;
&lt;br /&gt;
Your hospital have not yet implemented mNGS, but the hospital already uses NGS to sequence the genomes of bacterial isolates cultivated from clinical specimens. Accordingly, the hospital laboratory has sequenced the genome of a Stapholycoccus aureus isolate and have made 100,000 of the sequence reads available for you in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The hospital laboratory asks you to run Kraken on the 100,000 reads with these commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kraken.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB /home/projects/microbial_genomics/task01_sequence_reads/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1_R1.fastq.gz &amp;gt; ~/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt&lt;br /&gt;
kraken-report.sh -db /home/projects/microbial_genomics/minikraken_20171019_8GB ~/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.out.txt &amp;gt; ~/100K_cap_SH631x88_251212_LH00793_A22G7YYLT1.kraken.report.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The vast majority of reads that could be classified to species-level are assigned to Stapholycoccus aureus, but also a minority of reads are assigned to other species.&lt;br /&gt;
&lt;br /&gt;
==== Question 4 ====&lt;br /&gt;
Do you think that these reads represent contamination of DNA from other species ?&lt;br /&gt;
&lt;br /&gt;
== Task02: Species-level taxonomic classification of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced genomic DNA from single-colony isolates of bacteria cultivated from clinical specimens. The sequence reads have been &#039;&#039;de novo&#039;&#039; assembled with [https://github.com/tseemann/shovill Shovill}], and the genome assemblies are stored in FASTA-formatted files available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/genome_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You want to determine the bacterial species of the assembled genomes.&lt;br /&gt;
&lt;br /&gt;
We can use the [https://github.com/Ecogenomics/GTDBTk GTDB-Tk tool] to assign taxonomic classifications to bacterial genomes based on the [https://gtdb.ecogenomic.org Genome Taxonomy Database (GTDB)].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;gtdbtk.sh -h&amp;lt;/code&amp;gt; to get help information on how to use GTDB-Tk.&lt;br /&gt;
&lt;br /&gt;
Use GTDB-Tk to determine the species of the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gtdbtk.sh classify_wf --extension .fna --cpus 10 --genome_dir /home/projects/microbial_genomics/task02_assemblies --out_dir ~/output_gtdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What species are the genomes ?&lt;br /&gt;
&lt;br /&gt;
== Task03: Subspecies-level genetic typing of bacterial genomes ==&lt;br /&gt;
&lt;br /&gt;
After species identification, it is most often relevant to further genetically group isolates at a subspecies-level. Such groups may be referred to as genotypes, lineages, clone types, clonal complexes, strains, depending on the organism and method used, and may be based both on different genetic markers and approaches for grouping.&lt;br /&gt;
&lt;br /&gt;
Bacterial genomes are commonly grouped using multilocus sequence typing (MLST), which uses the sequences of typically seven gene loci present in all members of a species. The combination of allele numbers assigned to sequence variants at each locus defines the sequence type (ST).&lt;br /&gt;
&lt;br /&gt;
The laboratory has sequenced and de novo assembled the genomes of 36 bacterial isolates of species &#039;&#039;Pseudomonas aeruginosa&#039;&#039;. The assembled genomes are available in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Use tool [https://github.com/tseemann/mlst mlst] by Torsten Seemann to determine the sequence types of the 36 genomes.&lt;br /&gt;
&lt;br /&gt;
Start by inspecting the available options and then run the tool on the genomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mlst.sh -h&lt;br /&gt;
mlst.sh --scheme paeruginosa /home/projects/microbial_genomics/task03_assemblies/*fna &amp;gt; ~/output_mlst.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will find 3 different allele combinations among the 36 genomes. E.g., use this command to see the allele combinations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat output_mlst.txt  | cut -f4-10 |sort | uniq -c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
What allele combinations did you find and what are the correspoonding sequence types ?&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
How many alleles differ between the sequence types ? (ST207 versus ST2326, ST207 versus the unknown ST, ST2326 versus the unknown ST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Task04: Whole-genome based determination of genetic relatedness ==&lt;br /&gt;
&lt;br /&gt;
You used sequence information from seven genes in the previous task; nonetheless, we can improve the resolution of our genomic analysis if we make use of the whole genome sequence. Tool [https://github.com/marbl/parsnp Parsnp] can be used align whole genome sequences and to detect single nucleotide substitution variants in the sequence alignments. In the scope of this task, we refer to such substitution variants as single nucleotide polymorphisms (SNPs).&lt;br /&gt;
&lt;br /&gt;
First, view the Parsnp help information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now want to use Parsnp to compare the 36 &#039;&#039;Pseudomonas aeruginosa&#039;&#039; genomes in &amp;lt;code&amp;gt;/home/projects/microbial_genomics/task03_assemblies&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can use the following command to compare the genomes with Parsnp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parsnp.sh -r ! -d /home/projects/microbial_genomics/task03_assemblies -o ~/output_parsnp -p 10 -c --use-fasttree&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above command produces an output file &#039;&#039;parsnp.ggr&#039;&#039; whcih is a compressed representation of the alignment result.&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/marbl/harvest-tools Harvesttools] to convert alignment into an alignment represented in a multi-FASTA format that include only SNPs positions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
harvesttools.sh -i ~/output_parsnp/parsnp.ggr -S ~/output_parsnp/multi_fasta_alignment_with_SNPs.fasta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use [https://github.com/tseemann/snp-dists snp-dists] to convert the multi-FASTA alignment into SNP-distances, i.e. a measure of the genetic relationship (distance) between the genomes. snp-dists finds pairwise SNP-distances that can be presented in a square matrix (standard representation) or in a list (option &#039;&#039;-m&#039;&#039;).  You can test both with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh ~/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
snp-dists.sh -m ~/output_parsnp/multi_fasta_alignment_with_SNPs.fasta | less -S&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, all pairwise SNP-distances are outputted twice in both the matrix and the list (A versus B and B versus A, respectively).&lt;br /&gt;
&lt;br /&gt;
Parsnp also uses the aligment to make a phylogenetic tree (file &#039;&#039;parsnp.tree&#039;&#039; in output). The tree is in Newick format, and you can, e.g., use [https://itol.embl.de/ iTol] to visualize the tree. Below, I have inserted a visualization of the tree:&lt;br /&gt;
[[File:Full_tree.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
The large genetic distances genomes of the unknown ST to both ST207 and ST2326 makes difficult to see the structure of the tree for genomes of the same ST. Below, I have inserted the same tree but without showing genomes of the unknown ST:&lt;br /&gt;
[[File:STunknown_removed_tree.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
The genomes are named according their ST and the origin of the bacterial isolate. The origin can either be a person (person 1 to 19) or the hospital environment. You may have noticed that the structure of the phylogenetic tree corresponds well to the ST and origin of genomes.  &lt;br /&gt;
&lt;br /&gt;
Now, you want to parse the listed pairwise genetic distances to find out how they are distributed dependent on whether the genomes are from the same ST and/or origin.&lt;br /&gt;
&lt;br /&gt;
We already saw from the phylogenetic tree that genomes of the unknown ST are distant from genomes of ST207 and ST2326. You can use the following command to find the minimum and maximum distances between genomes of the unknown ST and genomes of either ST207 or ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the minimum and maximum distances between genomes of ST207 and ST2326:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v STunknown | sed &#039;s/_/\t/1; s/_/\t/5&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | sed -n &#039;1p;$p&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
Do you think that the grouping by MLST reflects well the genetic distances between genomes ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&lt;br /&gt;
[[File:Slide_pa_distribution.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
You can use the following command to find the distances between genomes from the same person:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | grep -v environment | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1==$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | awk &#039;{sum+=$5}END{print sum/NR}&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ==== &lt;br /&gt;
If we disregard genome 101174x20C_201204_NB501792_AHJF5LAFX2, what is the typical SNP-distance between genomes from bacteria sampled from the same person ?&lt;br /&gt;
&lt;br /&gt;
If two genomes differ by only a small number of SNPs, this suggests they diverged recently from a common ancestor. When such closely related genomes are identified in samples from different persons (patients) within a hospital, it raises the possibility that transmission occurred within the hospital.&lt;br /&gt;
&lt;br /&gt;
You can find the minimum SNP-distance between genomes from different persons with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snp-dists.sh -m multi_fasta_alignment_with_SNPs.fasta  | sed &#039;s/_/\t/2; s/_/\t/6&#039; | awk &#039;$1!=$3&#039; | awk &#039;$2!=$4&#039; | grep -v fna.ref | sort -nrk5 | grep -v environment | tail -n1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
Do some of the observed SNP-distances indicate that there has been transmission of &#039;&#039;Pseudomonas aeruginosa&#039;&#039; at the hospital ?&lt;br /&gt;
&lt;br /&gt;
== Task05: Detection of antimicrobial resistance genes ==&lt;br /&gt;
&lt;br /&gt;
Detection of antimicrobial resistance (AMR) genes is an important part of microbial diagnostics.&lt;br /&gt;
&lt;br /&gt;
The tool [https://github.com/tseemann/abricate Abricate] can be used to screen genome assemblies against curated resistance gene databases.&lt;br /&gt;
&lt;br /&gt;
Inspect the available options and databases with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh -h&lt;br /&gt;
abricate.sh --list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run Abricate on the assembled genomes using the Resfinder database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abricate.sh --db resfinder /home/projects/microbial_genomics/task03_assemblies/ST2326*.fna&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Question 1 ====&lt;br /&gt;
&lt;br /&gt;
==== Question 2 ====&lt;br /&gt;
&lt;br /&gt;
== Supplementary information and files ==&lt;br /&gt;
&lt;br /&gt;
[https://teaching.healthtech.dtu.dk/22126/images/c/cd/Gtdbtk.pdf Article describing GTDB-Tk can be found here]&lt;br /&gt;
&lt;br /&gt;
The BASH executables in &amp;lt;code&amp;gt;/home/ctools/bin&amp;lt;/code&amp;gt; uses Apptainer container images (.sif file format) that are located &amp;lt;code&amp;gt;/home/projects/microbial_genomics/singularity_image_files&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasmus</name></author>
	</entry>
</feed>