Repository 'poppunk'
hg clone https://toolshed.g2.bx.psu.edu/repos/johnlees/poppunk

Changeset 0:d3c2de4d003a (2019-05-15)
Next changeset 1:88ea7ea4b3d2 (2019-05-15)
Commit message:
Uploaded
added:
poppunk_cluster.xml
b
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
[
b'@@ -0,0 +1,284 @@\n+<tool id="poppunk_cluster" name="PopPUNK (cluster)" version="1.1.6">\n+   <description>Cluster bacterial genomes</description>\n+\n+   <requirements>\n+        <requirement type="package" version="1.1.6">poppunk</requirement>\n+     </requirements>\n+\n+    <version_command><![CDATA[\n+poppunk --version\n+    ]]></version_command>\n+\n+    <command detect_errors="exit_code"><![CDATA[\n+       ##Set up input files\n+       ##echo "$input_assemblies" | tr \',\' \'\\n\' > r_files.txt\n+       #for $input in $input_assemblies\n+       ln -s $input $input.element_identifier && echo $input.element_identifier >> r_files.txt; \n+       #end for\n+\n+       ## command line 1 (create db)\n+       echo "\n+       poppunk \n+       --create-db \n+       --r-files r_files.txt \n+       --output poppunk_db \n+       --threads \\${GALAXY_SLOTS:-1} \n+       --min-k $min_k \n+       --max-k $max_k \n+       --k-step $k_step \n+       --sketch-size $sketch_size \n+       --max-a-dist $max_a_dist \n+       #if $ignore_length\n+       --ignore_length \n+       #end if\n+       --no-stream \n+       " > poppunk_1.sh\n+\n+       && sh poppunk_1.sh\n+\n+       ## command line 2 (fit model)\n+       && echo "\n+       poppunk \n+       --fit-model \n+       --distances poppunk_db/poppunk_db.dists \n+       --ref-db poppunk_db \n+       --output poppunk_db \n+\n+       ## mode\n+       #if str( $model.model_mode ) == "gmm":\n+       --K ${model.K} \n+       #end if\n+       #if str( $model.model_mode ) == "dbscan":\n+       --dbscan \n+       --D $model.D \n+       --min-cluster-prop $model.min_cluster_prop \n+       #end if\n+\n+       #if not $no_full_db or $refine.refine_model\n+       --full-db \n+       #end if\n+\n+       #if not $refine.refine_model:\n+         #if $external_clusters\n+         --external-clustering $external_clusters\n+         #end if\n+\n+         ## viz\n+         #if $cytoscape:\n+         --cytoscape \n+         #end if\n+         #if $viz.microreact:\n+         --microreact \n+         --rapidnj rapidnj \n+         --perplexity $viz.perplexity \n+         #end if\n+         #if ($cytoscape or $viz.microreact) and $info_csv:\n+         --info-csv $info_csv \n+         #end if\n+       #end if\n+\n+       " > poppunk_2.sh\n+\n+       && sh poppunk_2.sh\n+\n+       ## command line 3 (refine)\n+       #if $refine.refine_model:\n+         && echo "\n+         poppunk \n+         --refine-model \n+         --distances poppunk_db/poppunk_db.dists \n+         --ref-db poppunk_db \n+         --output poppunk_db \n+         --threads \\${GALAXY_SLOTS:-1} \n+         --pos-shift $refine.pos_shift\n+         --neg-shift $refine.neg_shift\n+\n+         #if not $no_full_db\n+         --full-db \n+         #end if\n+\n+         #if $external_clusters\n+         --external-clustering $external_clusters\n+         #end if\n+\n+         ## viz\n+         #if $cytoscape:\n+         --cytoscape \n+         #end if\n+         #if $viz.microreact:\n+         --microreact \n+         --rapidnj rapidnj \n+         --perplexity $viz.perplexity \n+         #end if\n+         #if ($cytoscape or $viz.microreact) and $info_csv:\n+         --info-csv $info_csv \n+         #end if\n+\n+         " > poppunk_3.sh\n+\n+         && sh poppunk_3.sh;\n+       #end if\n+\n+       ]]></command>\n+\n+    <inputs>\n+\n+       <!-- input files -->\n+       <param name="input_assemblies" type="data" format="fasta" multiple="true" label="FASTA datasets (assemblies)">\n+       </param>\n+\n+       <!-- model type -->\n+       <conditional name="model">\n+         <param name="model_mode" type="select" label="Choose a model to use" help="See documentation or description below for advice, if default does not work." display="radio">\n+           <option value="gmm" selected="true">GMM</option>\n+           <option value="dbscan">DBSCAN</option>\n+         </param>\n+         <!-- model options -->\n+         <when value="gmm">\n+           <param name="K" type="integer" value="3" min="2" max="10" label="Number of mixture components">\n+           </param>\n+         </when>\n+         <when '..b'output name="distances" ftype=\'png\' file="distances.png" />\n+          <output name="references" file="refs.txt" />\n+          <output name="gmm_plot" ftype=\'png\' file="gmm_fit.png" />\n+          <output name="gmm_contours" ftype=\'pdf\' file="gmm_contours.pdf" />\n+       </test>\n+    </tests>\n+\n+    <help><![CDATA[\n+**What it does**\n+\n+PopPUNK will calculate core and accessory distance between input assemblies using variable length k-mers. A model will be fitted to all of these distances to determine genetic clusters for all inpits.\n+\n+------\n+\n+**Description**\n+\n+       The most important thing to check is that in the output plot the component (blob) closest to the origin has been correctly identified - this should be checked in the cluster/model plot output. If it has not, you may wish to try another model. Some broad advice:\n+\n+  * DBSCAN is a good default, but may lead to unclassified points (black). If there are a large number of these consider another model.\n+  * GMM will work well with well-separated components and an appropriate choice of K (consider increasing it based on the number of components that can be seen).\n+  * The refine mode should be added in recombining species, which can be seen from the output plots if the coloured components are overlapping, or if there is a blur of points rather than discrete blobs of points..\n+       ]]></help>\n+\n+    <citations>\n+       <citation type=\'bibtex\'>\n+@article{Lees01022019,\n+  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.},\n+  title = {Fast and flexible bacterial genomic epidemiology with PopPUNK},\n+  volume = {29},\n+  number = {2},\n+  pages = {304-316},\n+  year = {2019},\n+  doi = {10.1101/gr.241455.118},\n+  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\xe2\x80\x99 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\xe2\x80\x99 diverse evolutionary patterns. PopPUNK can process 103\xe2\x80\x93104 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.},\n+  URL = {http://genome.cshlp.org/content/29/2/304.abstract},\n+  eprint = {http://genome.cshlp.org/content/29/2/304.full.pdf+html},\n+  journal = {Genome Research}\n+          }</citation>\n+    </citations>\n+</tool>\n'