<commit_before>---
layout: post
title: "Visualising metagenomic data in context of pan genome"
description: ""
category: clinical-metagenomics
tags: [pangenomes]
---
{% include JB/setup %}

Basic attempt at a heatmap seems to neatly reveal the pathogen "barcode", as well as possible mixtures:

	library(ggplot2)
	depths<-read.table("depths.txt", header=TRUE)
	depths_filtered <- subset(depths, depths$AlignedBasesGtZero  / depths$BlockLength > 0.5)
	ggplot(depths_filtered, aes(x=Block, y=Sample)) + geom_tile(aes(fill = MedianCoverage)) + scale_fill_gradient(low="green", high="red")

The coverage depth range isn't quite right yet. It looks different at 600dpi than when looked at as a bitmap image.

It would be nicer if the blocks could be brought together to reduce the total number of blocks.

It's quite nice if there's still a gradient from core genome -> pan genome -> strain-specific genome.

Could do something like: for each block with the same number of genomes, order blocks together which appear in the same genomes. Quite simple. Although this would make some blocks harder to see?
<commit_msg>Updates<commit_after>---
layout: post
title: "Visualising metagenomic data in context of pan genome"
description: ""
category: clinical-metagenomics
tags: [pangenomes]
---
{% include JB/setup %}

Basic attempt at a heatmap seems to neatly reveal the pathogen "barcode", as well as possible mixtures:

	library(ggplot2)
	depths<-read.table("depths.txt", header=TRUE)
	depths_filtered <- subset(depths, depths$AlignedBasesGtZero  / depths$BlockLength > 0.5)
	ggplot(depths_filtered, aes(x=Block, y=Sample)) + geom_tile(aes(fill = MedianCoverage)) + scale_fill_gradient(low="green", high="red")

The coverage depth range isn't quite right yet. It looks different at 600dpi than when looked at as a bitmap image.

It would be nicer if the blocks could be brought together to reduce the total number of blocks.

It's quite nice if there's still a gradient from core genome -> pan genome -> strain-specific genome.

Could do something like: for each block with the same number of genomes, order blocks together which appear in the same genomes. Quite simple. Although this would make some (missing) blocks harder to see?

{'fraction_non_alphanumeric': 0.08445642407906559, 'fraction_numerical': 0.005390835579514825, 'mean_word_length': 5.018918918918919, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3142534', 'n_tokens_mistral': 679, 'n_tokens_neox': 614, 'n_words': 277}