# HG changeset patch
# User galaxy-australia
# Date 1666767244 0
# Node ID 234b3e869b16996f50b1609441e8ea8df883485c
"planemo upload for repository https://github.com/usegalaxy-au/tools-au/tree/master/tools/blobtools commit 89d41433582a6470135c026aad07b714eb3145d4"
diff -r 000000000000 -r 234b3e869b16 blobtools_plot.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/blobtools_plot.xml	Wed Oct 26 06:54:04 2022 +0000
@@ -0,0 +1,124 @@
+
+    Generate Blobtools plot
+    
+        blobtools
+    
+    
+	  macros.xml
+    
+    
+    
+     
+    
+    
+	    
+	    
+		
+		
+                
+                
+                
+	        
+                
+                
+                
+                
+                      
+                      
+                
+                
+                          
+                          
+                          
+                          
+                          
+                          
+                          
+                
+                
+	    
+    
+    
+
+	    
+	    
+	    
+    
+
+    
+	 
+	     
+            
+	    
+	    
+            
+        
+    
+     - Sort order for plotting [default: span] 1) span  : plot with decreasing span 2) count : plot with decreasing count
+- hist  - Data for histograms [default: span] 1) span  : span-weighted histograms 2) count : count histograms
+- rank  - Taxonomic rank used for colouring of blobs [default: phylum] (Supported: species, genus, family, order,phylum, superkingdom)	
+- taxrule  - Taxrule which has been used for computing taxonomy (Supported: bestsum, bestsumorder) [default: bestsum]
+- format FORMAT -  Figure format for plot (png, pdf, eps, jpeg,ps, svg, svgz, tiff) [default: png]
+- label GROUPS - Relabel (taxonomic) groups, can be used several times. e.g. "A=Actinobacteria,Proteobacteria
+- colours COLOURFILE - File containing colours for (taxonomic) groups. This allows having more than 9 colours.
+- exclude GROUPS - Exclude these (taxonomic) groups (also works for 'other') e.g. "Actinobacteria,Proteobacteria,other"
+- refcov  - File containing number of "total" and "mapped" reads per coverage file. (e.g.: bam0,900,100). If provided, info will be used in read coverage plot(s).
+-catcolour  - Colour plot based on categories from FILE (format : "seq category").
+
+
+**Command line Example:**
+
+- blobtools plot -i example_blobDB.json -o output_file_preifix
+
+**Output**
+
+- Coverage PNG file
+- Read Coverage PNG file
+- Statistic file
+ 
+.. class:: infomark
+	    
+**Contributor**
+
+Galaxy Australia wrapped the Blobtools: the original software is available in this `Github repository `_.
+
+**References**
+ 
+     ]]>
+     
+        DOI: 10.12688/f1000research.12232.1
+     
+
diff -r 000000000000 -r 234b3e869b16 blobtools_view.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/blobtools_view.xml	Wed Oct 26 06:54:04 2022 +0000
@@ -0,0 +1,103 @@
+
+    Transform BlobDB json file into view format
+    
+        blobtools
+    	
+    
+	  macros.xml
+    
+    
+    
+     
+    &1
+
+	    ]]>
+    
+	    
+	    
+		    
+		        
+		        
+		    
+		    
+			  
+			  
+		          
+                          
+                          
+			  
+                          
+		    
+		    
+		    
+		    
+	    
+    
+    
+	    
+    
+
+    
+	 
+	     
+	    
+	    
+         
+    
+    `_.
+
+**References**
+
+     ]]>
+     
+        DOI: 10.12688/f1000research.12232.1
+    
+
diff -r 000000000000 -r 234b3e869b16 macros.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Wed Oct 26 06:54:04 2022 +0000
@@ -0,0 +1,30 @@
+
+    
+	   
+		   blobtools
+		   matplotlib
+           
+   
+   
+     
+        
+        
+     
+   
+  
+      &1 | head -1       
+      ]]>
+  
+  
+	  
+	  
+	  
+  
+  
+	  
+  
+  
+	export MPLCONFIGDIR="/tmp"
+  
+
diff -r 000000000000 -r 234b3e869b16 test-data/test.blobDB.json
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test.blobDB.json	Wed Oct 26 06:54:04 2022 +0000
@@ -0,0 +1,1 @@
+{"title": "example/test.blobDB.json", "assembly_f": "/home/mthang/tools/blobtools/example/assembly.fna", "lineages": {"979556": {"species": "Microbacterium testaceum", "genus": "Microbacterium", "family": "Microbacteriaceae", "order": "Micrococcales", "phylum": "Actinobacteria", "superkingdom": "Bacteria"}, "6252": {"species": "Ascaris lumbricoides", "genus": "Ascaris", "family": "Ascarididae", "order": "Rhabditida", "phylum": "Nematoda", "superkingdom": "Eukaryota"}, "232323": {"species": "Hypsibius dujardini", "genus": "Hypsibius", "family": "Hypsibiidae", "order": "Parachela", "phylum": "Tardigrada", "superkingdom": "Eukaryota"}}, "order_of_blobs": ["contig_1", "contig_2", "contig_3", "contig_4", "contig_5", "contig_6", "contig_7", "contig_8", "contig_9", "contig_10"], "dict_of_blobs": {"contig_1": {"name": "contig_1", "length": 756, "n_count": 0, "agct_count": 756, "gc": 0.2606, "covs": {"bam0": 120.8277}, "read_cov": {"bam0": 369}, "hits": {"tax0": [{"name": "contig_1", "taxId": "979556", "score": 200.0}]}, "taxonomy": {"bestsum": {"species": {"tax": "Microbacterium testaceum", "score": 200.0, "c_index": 0}, "genus": {"tax": "Microbacterium", "score": 200.0, "c_index": 0}, "family": {"tax": "Microbacteriaceae", "score": 200.0, "c_index": 0}, "order": {"tax": "Micrococcales", "score": 200.0, "c_index": 0}, "phylum": {"tax": "Actinobacteria", "score": 200.0, "c_index": 0}, "superkingdom": {"tax": "Bacteria", "score": 200.0, "c_index": 0}}}}, "contig_2": {"name": "contig_2", "length": 1060, "n_count": 0, "agct_count": 1060, "gc": 0.2623, "covs": {"bam0": 197.1055}, "read_cov": {"bam0": 844}, "hits": {"tax0": [{"name": "contig_2", "taxId": "979556", "score": 500.0}, {"name": "contig_2", "taxId": "979556", "score": 1000.0}, {"name": "contig_2", "taxId": "979556", "score": 500.0}, {"name": "contig_2", "taxId": "979556", "score": 300.0}]}, "taxonomy": {"bestsum": {"species": {"tax": "Microbacterium testaceum", "score": 2300.0, "c_index": 0}, "genus": {"tax": "Microbacterium", "score": 2300.0, "c_index": 0}, "family": {"tax": "Microbacteriaceae", "score": 2300.0, "c_index": 0}, "order": {"tax": "Micrococcales", "score": 2300.0, "c_index": 0}, "phylum": {"tax": "Actinobacteria", "score": 2300.0, "c_index": 0}, "superkingdom": {"tax": "Bacteria", "score": 2300.0, "c_index": 0}}}}, "contig_3": {"name": "contig_3", "length": 602, "n_count": 0, "agct_count": 602, "gc": 0.2342, "covs": {"bam0": 77.3078}, "read_cov": {"bam0": 188}, "hits": {"tax0": [{"name": "contig_3", "taxId": "979556", "score": 10000.0}]}, "taxonomy": {"bestsum": {"species": {"tax": "Microbacterium testaceum", "score": 10000.0, "c_index": 0}, "genus": {"tax": "Microbacterium", "score": 10000.0, "c_index": 0}, "family": {"tax": "Microbacteriaceae", "score": 10000.0, "c_index": 0}, "order": {"tax": "Micrococcales", "score": 10000.0, "c_index": 0}, "phylum": {"tax": "Actinobacteria", "score": 10000.0, "c_index": 0}, "superkingdom": {"tax": "Bacteria", "score": 10000.0, "c_index": 0}}}}, "contig_4": {"name": "contig_4", "length": 951, "n_count": 0, "agct_count": 951, "gc": 0.3155, "covs": {"bam0": 545.5981}, "read_cov": {"bam0": 2096}, "hits": {"tax0": [{"name": "contig_4", "taxId": "979556", "score": 1000.0}]}, "taxonomy": {"bestsum": {"species": {"tax": "Microbacterium testaceum", "score": 1000.0, "c_index": 0}, "genus": {"tax": "Microbacterium", "score": 1000.0, "c_index": 0}, "family": {"tax": "Microbacteriaceae", "score": 1000.0, "c_index": 0}, "order": {"tax": "Micrococcales", "score": 1000.0, "c_index": 0}, "phylum": {"tax": "Actinobacteria", "score": 1000.0, "c_index": 0}, "superkingdom": {"tax": "Bacteria", "score": 1000.0, "c_index": 0}}}}, "contig_5": {"name": "contig_5", "length": 614, "n_count": 0, "agct_count": 614, "gc": 0.329, "covs": {"bam0": 183.8478}, "read_cov": {"bam0": 456}, "hits": {"tax0": [{"name": "contig_5", "taxId": "6252", "score": 2000.0}]}, "taxonomy": {"bestsum": {"species": {"tax": "Ascaris lumbricoides", "score": 2000.0, "c_index": 0}, "genus": {"tax": "Ascaris", "score": 2000.0, "c_index": 0}, "family": {"tax": "Ascarididae", "score": 2000.0, "c_index": 0}, "order": {"tax": "Rhabditida", "score": 2000.0, "c_index": 0}, "phylum": {"tax": "Nematoda", "score": 2000.0, "c_index": 0}, "superkingdom": {"tax": "Eukaryota", "score": 2000.0, "c_index": 0}}}}, "contig_6": {"name": "contig_6", "length": 216, "n_count": 0, "agct_count": 216, "gc": 0.1944, "covs": {"bam0": 59.5953}, "read_cov": {"bam0": 52}, "hits": {"tax0": [{"name": "contig_6", "taxId": "232323", "score": 2000.0}, {"name": "contig_6", "taxId": "6252", "score": 2000.0}, {"name": "contig_6", "taxId": "979556", "score": 2000.0}, {"name": "contig_6", "taxId": "232323", "score": 2000.0}]}, "taxonomy": {"bestsum": {"species": {"tax": "Hypsibius dujardini", "score": 4000.0, "c_index": 2}, "genus": {"tax": "Hypsibius", "score": 4000.0, "c_index": 2}, "family": {"tax": "Hypsibiidae", "score": 4000.0, "c_index": 2}, "order": {"tax": "Parachela", "score": 4000.0, "c_index": 2}, "phylum": {"tax": "Tardigrada", "score": 4000.0, "c_index": 2}, "superkingdom": {"tax": "Eukaryota", "score": 6000.0, "c_index": 1}}}}, "contig_7": {"name": "contig_7", "length": 4060, "n_count": 0, "agct_count": 4060, "gc": 0.2584, "covs": {"bam0": 61.2776}, "read_cov": {"bam0": 1005}, "hits": {"tax0": [{"name": "contig_7", "taxId": "6252", "score": 2000.0}]}, "taxonomy": {"bestsum": {"species": {"tax": "Ascaris lumbricoides", "score": 2000.0, "c_index": 0}, "genus": {"tax": "Ascaris", "score": 2000.0, "c_index": 0}, "family": {"tax": "Ascarididae", "score": 2000.0, "c_index": 0}, "order": {"tax": "Rhabditida", "score": 2000.0, "c_index": 0}, "phylum": {"tax": "Nematoda", "score": 2000.0, "c_index": 0}, "superkingdom": {"tax": "Eukaryota", "score": 2000.0, "c_index": 0}}}}, "contig_8": {"name": "contig_8", "length": 2346, "n_count": 0, "agct_count": 2346, "gc": 0.2801, "covs": {"bam0": 106.364}, "read_cov": {"bam0": 1008}, "hits": {"tax0": [{"name": "contig_8", "taxId": "6252", "score": 2000.0}, {"name": "contig_8", "taxId": "979556", "score": 2000.0}]}, "taxonomy": {"bestsum": {"species": {"tax": "unresolved", "score": 2000.0, "c_index": 1}, "genus": {"tax": "unresolved", "score": 2000.0, "c_index": 1}, "family": {"tax": "unresolved", "score": 2000.0, "c_index": 1}, "order": {"tax": "unresolved", "score": 2000.0, "c_index": 1}, "phylum": {"tax": "unresolved", "score": 2000.0, "c_index": 1}, "superkingdom": {"tax": "unresolved", "score": 2000.0, "c_index": 1}}}}, "contig_9": {"name": "contig_9", "length": 1599, "n_count": 0, "agct_count": 1599, "gc": 0.2439, "covs": {"bam0": 85.7676}, "read_cov": {"bam0": 554}, "hits": {"tax0": [{"name": "contig_9", "taxId": "6252", "score": 200.0}]}, "taxonomy": {"bestsum": {"species": {"tax": "Ascaris lumbricoides", "score": 200.0, "c_index": 0}, "genus": {"tax": "Ascaris", "score": 200.0, "c_index": 0}, "family": {"tax": "Ascarididae", "score": 200.0, "c_index": 0}, "order": {"tax": "Rhabditida", "score": 200.0, "c_index": 0}, "phylum": {"tax": "Nematoda", "score": 200.0, "c_index": 0}, "superkingdom": {"tax": "Eukaryota", "score": 200.0, "c_index": 0}}}}, "contig_10": {"name": "contig_10", "length": 6273, "n_count": 0, "agct_count": 6273, "gc": 0.3067, "covs": {"bam0": 336.4195}, "read_cov": {"bam0": 8525}, "hits": {}, "taxonomy": {"bestsum": {"species": {"tax": "no-hit", "score": 0.0, "c_index": 0}, "genus": {"tax": "no-hit", "score": 0.0, "c_index": 0}, "family": {"tax": "no-hit", "score": 0.0, "c_index": 0}, "order": {"tax": "no-hit", "score": 0.0, "c_index": 0}, "phylum": {"tax": "no-hit", "score": 0.0, "c_index": 0}, "superkingdom": {"tax": "no-hit", "score": 0.0, "c_index": 0}}}}}, "length": 18477, "seqs": 10, "n_count": 0, "nodesDB_f": null, "covLibs": {"bam0": {"name": "bam0", "fmt": "bam", "f": "/home/mthang/tools/blobtools/example/mapping_1.sorted.bam", "cov_sum": 1774.110884383095, "reads_total": 15313, "reads_mapped": 15313, "reads_unmapped": 0, "mean_cov": 177.4110884383095}}, "hitLibs": {"tax0": {"name": "tax0", "fmt": "tax", "f": "/home/mthang/tools/blobtools/example/blast.out"}}, "taxrules": ["bestsum"], "version": "1.1.1", "min_score": 0.0, "min_diff": 0.0, "tax_collision_random": false}
\ No newline at end of file
diff -r 000000000000 -r 234b3e869b16 test-data/test.blobDB.json.bestsum.phylum.p8.span.100.blobplot.bam0.png
diff -r 000000000000 -r 234b3e869b16 test-data/test.blobDB.json.bestsum.phylum.p8.span.100.blobplot.read_cov.bam0.png
diff -r 000000000000 -r 234b3e869b16 test-data/test.blobDB.json.bestsum.phylum.p8.span.100.blobplot.stats.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test.blobDB.json.bestsum.phylum.p8.span.100.blobplot.stats.txt	Wed Oct 26 06:54:04 2022 +0000
@@ -0,0 +1,9 @@
+## 1.1.1
+## bam0=/home/mthang/tools/blobtools/example/mapping_1.sorted.bam
+# name	colour	count_visible	count_visible_perc	span_visible	span_visible_perc	n50	gc_mean	gc_std	bam0_mean	bam0_std	bam0_read_map	bam0_read_map_p
+all	None	10	100.0%	18,477	100.0%	4,060	0.27	0.039	177.4	146.7	15,097	98.6%
+Nematoda	#1f77b4	3	100.0%	6,273	100.0%	4,060	0.28	0.037	110.3	53.0	2,015	13.2%
+no-hit	#d3d3d3	1	100.0%	6,273	100.0%	6,273	0.31	0.0	336.4	0.0	8,525	55.7%
+Actinobacteria	#ff7f0e	4	100.0%	3,369	100.0%	951	0.27	0.03	235.2	184.3	3,497	22.8%
+unresolved	#d62728	1	100.0%	2,346	100.0%	2,346	0.28	0.0	106.4	0.0	1,008	6.6%
+Tardigrada	#9467bd	1	100.0%	216	100.0%	216	0.19	0.0	59.6	0.0	52	0.3%
\ No newline at end of file
diff -r 000000000000 -r 234b3e869b16 test-data/test.blobDB.table.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test.blobDB.table.txt	Wed Oct 26 06:54:04 2022 +0000
@@ -0,0 +1,21 @@
+## 1.1.1
+## assembly	: /home/mthang/tools/blobtools/example/assembly.fna
+## coverage	 bam0 - /home/mthang/tools/blobtools/example/mapping_1.sorted.bam
+## taxonomy	 tax0 - /home/mthang/tools/blobtools/example/blast.out
+## nodesDB	: None
+## taxrule	: bestsum
+## min_score	: 0.0
+## min_diff	: 0.0
+## tax_collision_random	: False
+##
+# name	length	GC	N	bam0	phylum.t.6%s	phylum.s.7%s	phylum.c.8
+contig_1	756	0.2606	0	120.8277	Actinobacteria	200.0	0
+contig_2	1060	0.2623	0	197.1055	Actinobacteria	2300.0	0
+contig_3	602	0.2342	0	77.3078	Actinobacteria	10000.0	0
+contig_4	951	0.3155	0	545.5981	Actinobacteria	1000.0	0
+contig_5	614	0.329	0	183.8478	Nematoda	2000.0	0
+contig_6	216	0.1944	0	59.5953	Tardigrada	4000.0	2
+contig_7	4060	0.2584	0	61.2776	Nematoda	2000.0	0
+contig_8	2346	0.2801	0	106.364	unresolved	2000.0	1
+contig_9	1599	0.2439	0	85.7676	Nematoda	200.0	0
+contig_10	6273	0.3067	0	336.4195	no-hit	0.0	0
\ No newline at end of file