# HG changeset patch # User johnlees # Date 1557945851 14400 # Node ID d3c2de4d003aedc709fc53480a0c913a1dd8a659 Uploaded diff -r 000000000000 -r d3c2de4d003a poppunk_cluster.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/poppunk_cluster.xml Wed May 15 14:44:11 2019 -0400 @@ -0,0 +1,284 @@ + + Cluster bacterial genomes + + + poppunk + + + + + r_files.txt + #for $input in $input_assemblies + ln -s $input $input.element_identifier && echo $input.element_identifier >> r_files.txt; + #end for + + ## command line 1 (create db) + echo " + poppunk + --create-db + --r-files r_files.txt + --output poppunk_db + --threads \${GALAXY_SLOTS:-1} + --min-k $min_k + --max-k $max_k + --k-step $k_step + --sketch-size $sketch_size + --max-a-dist $max_a_dist + #if $ignore_length + --ignore_length + #end if + --no-stream + " > poppunk_1.sh + + && sh poppunk_1.sh + + ## command line 2 (fit model) + && echo " + poppunk + --fit-model + --distances poppunk_db/poppunk_db.dists + --ref-db poppunk_db + --output poppunk_db + + ## mode + #if str( $model.model_mode ) == "gmm": + --K ${model.K} + #end if + #if str( $model.model_mode ) == "dbscan": + --dbscan + --D $model.D + --min-cluster-prop $model.min_cluster_prop + #end if + + #if not $no_full_db or $refine.refine_model + --full-db + #end if + + #if not $refine.refine_model: + #if $external_clusters + --external-clustering $external_clusters + #end if + + ## viz + #if $cytoscape: + --cytoscape + #end if + #if $viz.microreact: + --microreact + --rapidnj rapidnj + --perplexity $viz.perplexity + #end if + #if ($cytoscape or $viz.microreact) and $info_csv: + --info-csv $info_csv + #end if + #end if + + " > poppunk_2.sh + + && sh poppunk_2.sh + + ## command line 3 (refine) + #if $refine.refine_model: + && echo " + poppunk + --refine-model + --distances poppunk_db/poppunk_db.dists + --ref-db poppunk_db + --output poppunk_db + --threads \${GALAXY_SLOTS:-1} + --pos-shift $refine.pos_shift + --neg-shift $refine.neg_shift + + #if not $no_full_db + --full-db + #end if + + #if $external_clusters + --external-clustering $external_clusters + #end if + + ## viz + #if $cytoscape: + --cytoscape + #end if + #if $viz.microreact: + --microreact + --rapidnj rapidnj + --perplexity $viz.perplexity + #end if + #if ($cytoscape or $viz.microreact) and $info_csv: + --info-csv $info_csv + #end if + + " > poppunk_3.sh + + && sh poppunk_3.sh; + #end if + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + no_full_db == True + + + model['model_mode'] == 'gmm' + + + model['model_mode'] == 'gmm' + + + model['model_mode'] == 'dbscan' + + + refine['refine_model'] == True + + + cytoscape == True + + + cytoscape == True + + + viz['microreact'] == True + + + viz['microreact'] == True + + + viz['microreact'] == True + + + + + + + + + + + + + + + + + + + + + + +@article{Lees01022019, + author = {Lees, John A. and Harris, Simon R. and Tonkin-Hill, Gerry and Gladstone, Rebecca A. and Lo, Stephanie W. and Weiser, Jeffrey N. and Corander, Jukka and Bentley, Stephen D. and Croucher, Nicholas J.}, + title = {Fast and flexible bacterial genomic epidemiology with PopPUNK}, + volume = {29}, + number = {2}, + pages = {304-316}, + year = {2019}, + doi = {10.1101/gr.241455.118}, + abstract ={The routine use of genomics for disease surveillance provides the opportunity for high-resolution bacterial epidemiology. Current whole-genome clustering and multilocus typing approaches do not fully exploit core and accessory genomic variation, and they cannot both automatically identify, and subsequently expand, clusters of significantly similar isolates in large data sets spanning entire species. Here, we describe PopPUNK (Population Partitioning Using Nucleotide K-mers), a software implementing scalable and expandable annotation- and alignment-free methods for population analysis and clustering. Variable-length k-mer comparisons are used to distinguish isolates’ divergence in shared sequence and gene content, which we demonstrate to be accurate over multiple orders of magnitude using data from both simulations and genomic collections representing 10 taxonomically widespread species. Connections between closely related isolates of the same strain are robustly identified, despite interspecies variation in the pairwise distance distributions that reflects species’ diverse evolutionary patterns. PopPUNK can process 103–104 genomes in a single batch, with minimal memory use and runtimes up to 200-fold faster than existing model-based methods. Clusters of strains remain consistent as new batches of genomes are added, which is achieved without needing to reanalyze all genomes de novo. This facilitates real-time surveillance with consistent cluster naming between studies and allows for outbreak detection using hundreds of genomes in minutes. Interactive visualization and online publication is streamlined through the automatic output of results to multiple platforms. PopPUNK has been designed as a flexible platform that addresses important issues with currently used whole-genome clustering and typing methods, and has potential uses across bacterial genetics and public health research.}, + URL = {http://genome.cshlp.org/content/29/2/304.abstract}, + eprint = {http://genome.cshlp.org/content/29/2/304.full.pdf+html}, + journal = {Genome Research} + } + +