<commit_before>---
layout: post
title: "Constructing bacterial pan-genomes"
description: ""
category: clinical-metagenomics
tags: [pangenome]
---
{% include JB/setup %}

# Pan-genome construction notebook

## 31/10/2012

65 genome alignment has taken 9 hours to do nucmer alignments, and the MugsyWGA step is still running (~8 hours elapsed), so far about 4Mb of pan-genome available so I figure it's less than 50% of the way through.

On to the visualisation on some test data:

* Align some WGS reads and metagenomics reads against pan-genome
* Write R script to display as heatmap (colour = coverage)
* Then think about how to align regular whole-genomes
  * MUMMER
  * BLAT (psl2bam.py to simplify)
* Try fixed length blocks and variable length blocks

Example input to R:

	Block Sample MeanDepth PercentCoveredByReads
	Block1 Sample1 40 99
	Block2 Sample2 30 98
	Block3 Sample3 40 99

Just try it and see how it works? Exclude gapped characters from % covered by reads.

Options for depth-counting (all_ecoli_shig_pangenome.fasta):
  GATK 
  samtools depth
  BEDtools
  VarScan2
 
Try piping samtools depth into a script first.

Script: depth.py

Mugsy finally finished running on the 65 genomes set, final pan-genome size 25Mb, 113k blocks. (is this reasonable?)

Now run all the metagenomics samples across the test pan-genome and depth script and get visualisation working.

Issues:
* pan-genomes have hyphens in, probably best to remove these as they won't map well?




<commit_msg>Formatting<commit_after>---
layout: post
title: "Constructing bacterial pan-genomes"
description: ""
category: clinical-metagenomics
tags: [pangenome]
---
{% include JB/setup %}

# Pan-genome construction notebook

## 31/10/2012

65 genome alignment has taken 9 hours to do nucmer alignments, and the MugsyWGA step is still running (~8 hours elapsed), so far about 4Mb of pan-genome available so I figure it's less than 50% of the way through.

On to the visualisation on some test data:

* Align some WGS reads and metagenomics reads against pan-genome
* Write R script to display as heatmap (colour = coverage)
* Then think about how to align regular whole-genomes
  * MUMMER
  * BLAT (psl2bam.py to simplify)
* Try fixed length blocks and variable length blocks

Example input to R:

	Block Sample MeanDepth PercentCoveredByReads
	Block1 Sample1 40 99
	Block2 Sample2 30 98
	Block3 Sample3 40 99

Just try it and see how it works? Exclude gapped characters from % covered by reads.

Options for depth-counting:
* GATK  DepthOfCoverage
* samtools depth
* BEDtools
* VarScan2
 
Try piping samtools depth into a Python script first.

Script: depth.py

Mugsy finally finished running on the 65 genomes set, final pan-genome size 25Mb, 113k blocks. (is this reasonable?)

Now run all the metagenomics samples across the test pan-genome and depth script and get visualisation working.

Issues:
* pan-genomes have hyphens in, probably best to remove these as they won't map well?





{'fraction_non_alphanumeric': 0.05684493777329297, 'fraction_numerical': 0.028254288597376387, 'mean_word_length': 4.226713532513181, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2010583', 'n_tokens_mistral': 978, 'n_tokens_neox': 857, 'n_words': 417}