Mercurial > repos > greg > vsnp_statistics
comparison vsnp_statistics.xml @ 1:14e29f7d59ca draft
Uploaded
author | greg |
---|---|
date | Wed, 29 Apr 2020 16:56:10 -0400 |
parents | c21d338dbdc4 |
children | 7fe0cbb8c894 |
comparison
equal
deleted
inserted
replaced
0:c21d338dbdc4 | 1:14e29f7d59ca |
---|---|
2 <description></description> | 2 <description></description> |
3 <requirements> | 3 <requirements> |
4 <requirement type="package" version="0.5.1">humanize</requirement> | 4 <requirement type="package" version="0.5.1">humanize</requirement> |
5 <requirement type="package" version="1.16.5">numpy</requirement> | 5 <requirement type="package" version="1.16.5">numpy</requirement> |
6 <requirement type="package" version="0.25.3">pandas</requirement> | 6 <requirement type="package" version="0.25.3">pandas</requirement> |
7 <requirement type="package" version="1.2.0">xlrd</requirement> | |
8 <requirement type="package" version="1.2.8">xlsxwriter</requirement> | |
7 </requirements> | 9 </requirements> |
8 <command detect_errors="exit_code"><![CDATA[ | 10 <command detect_errors="exit_code"><![CDATA[ |
9 #import os | 11 #import os |
10 #import re | 12 #import re |
11 #set gzipped = 'false' | 13 #set gzipped = 'false' |
12 #set input_type = $input_type_cond.input_type | 14 #set input_type = $input_type_cond.input_type |
13 #set input_idxstats_dir = 'input_idxstats' | 15 #set input_idxstats_dir = 'input_idxstats' |
14 #set input_metrics_dir = 'input_metrics' | 16 #set input_metrics_dir = 'input_metrics' |
15 #set input_reads_dir = 'input_reads' | 17 #set input_reads_dir = 'input_reads' |
16 #set output_dir = 'output' | |
17 mkdir -p $input_idxstats_dir && | 18 mkdir -p $input_idxstats_dir && |
18 mkdir -p $input_metrics_dir && | 19 mkdir -p $input_metrics_dir && |
19 mkdir -p $input_reads_dir && | 20 mkdir -p $input_reads_dir && |
20 mkdir -p $output_dir && | |
21 #if str($input_type) == "single": | 21 #if str($input_type) == "single": |
22 #set read_type_cond = $input_type_cond.read_type_cond | 22 #set read_type_cond = $input_type_cond.read_type_cond |
23 #set read1 = $read_type_cond.read1 | 23 #set read1 = $read_type_cond.read1 |
24 #set read1_identifier = re.sub('[^\s\w\-]', '_', str($read1.element_identifier)) | 24 #set read1_identifier = re.sub('[^\s\w\-]', '_', str($read1.element_identifier)) |
25 #if str($read_type_cond.read_type) == "single": | 25 #if str($read_type_cond.read_type) == "single": |
42 #if $i.is_of_type('fastqsanger.gz'): | 42 #if $i.is_of_type('fastqsanger.gz'): |
43 #set gzipped = 'true' | 43 #set gzipped = 'true' |
44 #end if | 44 #end if |
45 #set filename = $i.file_name | 45 #set filename = $i.file_name |
46 #set identifier = re.sub('[^\s\w\-]', '_', str($i.element_identifier)) | 46 #set identifier = re.sub('[^\s\w\-]', '_', str($i.element_identifier)) |
47 ln -s $filename $input_reads_dir/$identifier && | 47 ln -s '$filename' '$input_reads_dir/$identifier' && |
48 #end for | 48 #end for |
49 #for $i in $input_type_cond.samtools_idxstats_collection: | 49 #for $i in $input_type_cond.samtools_idxstats_collection: |
50 #set filename = $i.file_name | 50 #set filename = $i.file_name |
51 #set identifier = re.sub('[^\s\w\-]', '_', str($i.element_identifier)) | 51 #set identifier = re.sub('[^\s\w\-]', '_', str($i.element_identifier)) |
52 ln -s $filename $input_idxstats_dir/$identifier && | 52 ln -s '$filename' '$input_idxstats_dir/$identifier' && |
53 #end for | 53 #end for |
54 #for $i in $input_type_cond.azc_metrics_collection: | 54 #for $i in $input_type_cond.azc_metrics_collection: |
55 #set dbkey = $i.metadata.dbkey | 55 #set dbkey = $i.metadata.dbkey |
56 #set filename = $i.file_name | 56 #set filename = $i.file_name |
57 #set identifier = re.sub('[^\s\w\-]', '_', str($i.element_identifier)) | 57 #set identifier = re.sub('[^\s\w\-]', '_', str($i.element_identifier)) |
58 ln -s $filename $input_metrics_dir/$identifier && | 58 ln -s '$filename' '$input_metrics_dir/$identifier' && |
59 #end for | 59 #end for |
60 #end if | 60 #end if |
61 python '$__tool_directory__/vsnp_statistics.py' | 61 python '$__tool_directory__/vsnp_statistics.py' |
62 --processes $processes | |
63 --dbkey '$dbkey' | 62 --dbkey '$dbkey' |
64 --gzipped '$gzipped' | 63 --gzipped '$gzipped' |
65 #if str($input_type) == "single": | 64 #if str($input_type) == "single": |
66 #if str($read_type_cond.read_type) == "single": | 65 #if str($read_type_cond.read_type) == "single": |
67 --read1 '${read1_identifier}' | 66 --read1 '${read1_identifier}' |
69 --read1 '${read1_identifier}' | 68 --read1 '${read1_identifier}' |
70 --read2 '${read2_identifier}' | 69 --read2 '${read2_identifier}' |
71 #end if | 70 #end if |
72 --samtools_idxstats '$samtools_idxstats' | 71 --samtools_idxstats '$samtools_idxstats' |
73 --vsnp_azc '$vsnp_azc' | 72 --vsnp_azc '$vsnp_azc' |
74 --output '$output' | |
75 #end if | 73 #end if |
74 --output '$output' | |
76 ]]></command> | 75 ]]></command> |
77 <inputs> | 76 <inputs> |
78 <conditional name="input_type_cond"> | 77 <conditional name="input_type_cond"> |
79 <param name="input_type" type="select" label="Choose the category of the files to be analyzed"> | 78 <param name="input_type" type="select" label="Choose the category of the files to be analyzed"> |
80 <option value="single" selected="true">Single files</option> | 79 <option value="single" selected="true">Single files</option> |
105 <param name="reads_collection" type="data_collection" format="fastqsanger,fastqsanger.gz" collection_type="list" label="Collection of fastqsanger files"/> | 104 <param name="reads_collection" type="data_collection" format="fastqsanger,fastqsanger.gz" collection_type="list" label="Collection of fastqsanger files"/> |
106 <param name="samtools_idxstats_collection" type="data_collection" format="tabular" collection_type="list" label="Collection of samtools idxstats files"/> | 105 <param name="samtools_idxstats_collection" type="data_collection" format="tabular" collection_type="list" label="Collection of samtools idxstats files"/> |
107 <param name="azc_metrics_collection" type="data_collection" format="tabular" collection_type="list" label="Collection of vSNP zero-coverage metrics files"/> | 106 <param name="azc_metrics_collection" type="data_collection" format="tabular" collection_type="list" label="Collection of vSNP zero-coverage metrics files"/> |
108 </when> | 107 </when> |
109 </conditional> | 108 </conditional> |
110 <param name="processes" type="integer" min="1" max="20" value="8" label="Number of processes for job splitting"/> | |
111 </inputs> | 109 </inputs> |
112 <outputs> | 110 <outputs> |
113 <data name="output" format="tabular"> | 111 <data name="output" format="xlsx"/> |
114 <filter>input_type_cond['input_type'] == 'single'</filter> | |
115 </data> | |
116 <collection name="output_collection" type="list"> | |
117 <discover_datasets pattern="__name__" directory="output" format="tabular" /> | |
118 <filter>input_type_cond['input_type'] == 'collection'</filter> | |
119 </collection> | |
120 </outputs> | 112 </outputs> |
121 <tests> | 113 <tests> |
122 <test> | 114 <test> |
123 <param name="read1" value="13-1941-6_S4_L001_R1_600000.fastq.gz" ftype="fastqsanger.gz" dbkey="89"/> | 115 <param name="read1" value="13-1941-6_S4_L001_R1_600000.fastq.gz" ftype="fastqsanger.gz" dbkey="89"/> |
124 <param name="read2" value="13-1941-6_S4_L001_R2_600000.fastq.gz" ftype="fastqsanger.gz" dbkey="89"/> | 116 <param name="read2" value="13-1941-6_S4_L001_R2_600000.fastq.gz" ftype="fastqsanger.gz" dbkey="89"/> |
125 <param name="samtools_idxstats" value="samtools_idxstats.tabular" ftype="tabular" dbkey="89"/> | 117 <param name="samtools_idxstats" value="samtools_idxstats.tabular" ftype="tabular" dbkey="89"/> |
126 <param name="vsnp_azc" value="add_zc_metrics.tabular" ftype="tabular" dbkey="89"/> | 118 <param name="vsnp_azc" value="add_zc_metrics.tabular" ftype="tabular" dbkey="89"/> |
127 <output name="output" file="vsnp_statistics.tabular" ftype="tabular" compare="contains"/> | 119 <output name="output" file="vsnp_statistics.xlsx" ftype="xlsx" compare="sim_size"/> |
128 </test> | 120 </test> |
129 </tests> | 121 </tests> |
130 <help> | 122 <help> |
131 **What it does** | 123 **What it does** |
132 | 124 |
136 of coverage, good SNP count and more. | 128 of coverage, good SNP count and more. |
137 | 129 |
138 **Required options** | 130 **Required options** |
139 | 131 |
140 * **Choose the type for files to be analyzed** - select "Single files" or "Collections of files", then select the appropriate history items (single or paired fastqsanger reads or collections of fastqsanger reads and associated idxstats and vSNP zero coverage metrics files) based on the selected option.. | 132 * **Choose the type for files to be analyzed** - select "Single files" or "Collections of files", then select the appropriate history items (single or paired fastqsanger reads or collections of fastqsanger reads and associated idxstats and vSNP zero coverage metrics files) based on the selected option.. |
141 * **Number of processes for job splitting** - Select the number of processes for splitting the job to shorten execution time. | |
142 </help> | 133 </help> |
143 <citations> | 134 <citations> |
144 <citation type="bibtex"> | 135 <citation type="bibtex"> |
145 @misc{None, | 136 @misc{None, |
146 journal = {None}, | 137 journal = {None}, |