changeset 21:377c1a96aae9 draft

Uploaded
author greg
date Tue, 24 Aug 2021 12:32:50 +0000
parents d4ef7003c539
children 61239720da38
files .shed.yml test-data/vsnp_statistics1.tabular test-data/vsnp_statistics2.tabular test-data/vsnp_statistics4.tabular vsnp_statistics.py
diffstat 5 files changed, 19 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.shed.yml	Tue Aug 24 12:32:50 2021 +0000
@@ -0,0 +1,13 @@
+name: vsnp_statistics
+owner: greg
+description: |
+  Contains a tool that produces an Excel spreadsheet containing statistics for samples and associated metrics files.
+homepage_url: https://github.com/USDA-VS/vSNP
+long_description: |
+  Contains a tool Accepts a single fastqsanger sample, a set of paired read samples, or a collections of samples
+  along with associated SAMtools idxstats and vSNP zero coverage metrics files and extracts information from them
+  to produce an Excel spreadsheet containing statistics for each sample.
+remote_repository_url: https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_statistics
+type: unrestricted
+categories:
+  - Sequence Analysis
--- a/test-data/vsnp_statistics1.tabular	Thu Aug 12 17:08:20 2021 +0000
+++ b/test-data/vsnp_statistics1.tabular	Tue Aug 24 12:32:50 2021 +0000
@@ -1,2 +1,2 @@
-Reference	FASTQ	File Size	Mean Read Length	Mean Read Quality	Reads Passing Q30	Total Reads	All Mapped Reads	Unmapped Reads	Unmapped Reads Percentage of Total	Reference with Coverage	Average Depth of Coverage	Good SNP Count
+# Reference	FASTQ	File Size	Mean Read Length	Mean Read Quality	Reads Passing Q30	Total Reads	All Mapped Reads	Unmapped Reads	Unmapped Reads Percentage of Total	Reference with Coverage	Average Depth of Coverage	Good SNP Count
 89	Mcap_Deer_DE_SRR650221_fastq_gz	1.6 MB	121.0	29.7	      0.53	4317	17063	223	      0.05	8.27%	0.439436	36
--- a/test-data/vsnp_statistics2.tabular	Thu Aug 12 17:08:20 2021 +0000
+++ b/test-data/vsnp_statistics2.tabular	Tue Aug 24 12:32:50 2021 +0000
@@ -1,2 +1,2 @@
-Reference	Read1 FASTQ	File Size	Reads	Mean Read Length	Mean Read Quality	Reads Passing Q30	Read2 FASTQ	File Size	Reads	Mean Read Length	Mean Read Quality	Reads Passing Q30	Total Reads	All Mapped Reads	Unmapped Reads	Unmapped Reads Percentage of Total	Reference with Coverage	Average Depth of Coverage	Good SNP Count
+# Reference	Read1 FASTQ	File Size	Reads	Mean Read Length	Mean Read Quality	Reads Passing Q30	Read2 FASTQ	File Size	Reads	Mean Read Length	Mean Read Quality	Reads Passing Q30	Total Reads	All Mapped Reads	Unmapped Reads	Unmapped Reads Percentage of Total	Reference with Coverage	Average Depth of Coverage	Good SNP Count
 89	13-1941-6_S4_L001_R1_600000_fastq_gz	8.7 KB	25	100.0	65.7	      1.00	13-1941-6_S4_L001_R2_600000_fastq_gz	8.5 KB	25	100.0	66.3	      1.00	50	45	5	      0.10	98.74%	10.338671	611
--- a/test-data/vsnp_statistics4.tabular	Thu Aug 12 17:08:20 2021 +0000
+++ b/test-data/vsnp_statistics4.tabular	Tue Aug 24 12:32:50 2021 +0000
@@ -1,2 +1,2 @@
-Reference	Read1 FASTQ	File Size	Reads	Mean Read Length	Mean Read Quality	Reads Passing Q30	Read2 FASTQ	File Size	Reads	Mean Read Length	Mean Read Quality	Reads Passing Q30	Total Reads	All Mapped Reads	Unmapped Reads	Unmapped Reads Percentage of Total	Reference with Coverage	Average Depth of Coverage	Good SNP Count
+# Reference	Read1 FASTQ	File Size	Reads	Mean Read Length	Mean Read Quality	Reads Passing Q30	Read2 FASTQ	File Size	Reads	Mean Read Length	Mean Read Quality	Reads Passing Q30	Total Reads	All Mapped Reads	Unmapped Reads	Unmapped Reads Percentage of Total	Reference with Coverage	Average Depth of Coverage	Good SNP Count
 89	Unnamed Collection_R1	8.7 KB	25	100.0	65.7	      1.00	Unnamed Collection_R2	8.5 KB	25	100.0	66.3	      1.00	50	46	4	      0.08	0.16%	0.002146	0
--- a/vsnp_statistics.py	Thu Aug 12 17:08:20 2021 +0000
+++ b/vsnp_statistics.py	Tue Aug 24 12:32:50 2021 +0000
@@ -110,7 +110,9 @@
                    'Total Reads', 'All Mapped Reads', 'Unmapped Reads', 'Unmapped Reads Percentage of Total',
                    'Reference with Coverage', 'Average Depth of Coverage', 'Good SNP Count']
     with open(output_file, "w") as outfh:
-        outfh.write("%s\n" % "\t".join(columns))
+        # Make sure the header starts with a # so
+        # MultiQC can properly handle the output.
+        outfh.write("# %s\n" % "\t".join(columns))
         line_items = []
         # Get the current stats and associated files.
         # Get and output the statistics.