annotate smap_delineate.xml @ 0:7d416d98d2c9 draft default tip

Uploaded
author ieguinoa
date Tue, 22 Mar 2022 13:49:39 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
1 <tool id="smap_delineate" name="SMAP delineate (BETA)" version="4.5.0">
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
2 <requirements>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
3 <requirement type="package">ngs-smap</requirement>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
4 </requirements>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
5 <command detect_errors="exit_code"><![CDATA[
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
6 ## delineate
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
7 #set $name = 'smap_out'
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
8 mkdir alignments_dir;
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
9 #set $input_list = []
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
10 #import re
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
11 #for $i, $input in enumerate($input_bams):
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
12 #set $safename = re.sub('[^\w\-_]', '_', $input.element_identifier)
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
13 #if $safename in $input_list:
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
14 #set $safename = str($safename) + "." + str($i)
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
15 #end if
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
16 ln -sf '${input}' 'alignments_dir/${safename}.bam' &&
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
17 ln -sf '${input.metadata.bam_index}' 'alignments_dir/${safename}.bai' &&
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
18 #end for
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
19 smap delineate alignments_dir
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
20 -n $name
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
21 -mapping_orientation $mapping_orientation
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
22 -p "\${GALAXY_SLOTS:-1}"
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
23 --plot_type png
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
24 --plot $plot
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
25 ## --name 2n_ind_GBS-SE
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
26 --min_cluster_length $min_cluster_length
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
27 --max_cluster_length $max_cluster_length
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
28 --min_stack_depth $min_stack_depth
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
29 --max_stack_depth $max_stack_depth
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
30 --min_cluster_depth $min_cluster_depth
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
31 --max_cluster_depth $max_cluster_depth
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
32 --max_stack_number $max_stack_number
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
33 --min_stack_depth_fraction $min_stack_depth_fraction
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
34 --completeness $completeness
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
35 --max_smap_number $max_smap_number
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
36 ;
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
37 ## output name is
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
38 ##set $str_completeness = str(float($completeness))
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
39 ##set $str_max_smap_number = str($max_smap_number)
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
40 ###set $out_name = 'final_stack_positions_$name_C$str_completeness\_SMAP$max_smap_number\_CL$min_cluster_length\_$max_stack_depth.bed'
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
41 ##echo $out_name;
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
42 mkdir stack_positions_out;
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
43 mv *.bed stack_positions_out/;
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
44 mkdir visualizations_out;
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
45 mv *.png visualizations_out/;
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
46 mkdir tsv_files_out;
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
47 mv *.tsv tsv_files_out/;
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
48 ]]></command>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
49 <inputs>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
50 <param name="input_bams" type="data" optional="false" label="GFF3 File" help="GFF3 file" format="bam" multiple="true"/>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
51 <param argument="--mapping_orientation" type="select" label="Should strandedness of read mapping be considered for haplotyping?">
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
52 <option value="ignore" selected="True">Ignore strandedness</option>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
53 <option value="stranded">Consider strandedness</option>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
54 </param>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
55 <param argument="--plot" type="select" label="Select which plots are to be generated.">
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
56 <option value="summary" selected="True">Summary (plots with information for all samples)</option>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
57 <option value="all">All (per sample plots)</option>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
58 <option value="nothing">Nothing</option>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
59 </param>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
60 <param argument="--min_mapping_quality" type="integer" value="30" label="Minimum .bam mapping quality to retain reads for analysis"/>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
61 <param argument="--undefined_representation" label="Value to use for non-existing or masked data" type="text" value="NaN"/>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
62 <param argument="--min_stack_depth" type="integer" value="0" label="Minimum number of reads per Stack per sample. " help="Recommended value is 3"/>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
63 <param argument="--max_stack_depth" type="text" value="inf" label="Maximum number of reads per Stack per sample" help="Recommended value is 1500"/>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
64 <param argument="--min_cluster_length" type="integer" value="0" label="Minimum Stack and StackCluster length" help="Can be used to remove Stacks and StackClusters that are either too short compared to the original read length. For separately mapped and merged reads, the minimum length may be about one-third of the original read length (trimmed, before merging and mapping)."/>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
65 <param argument="--max_cluster_length" type="text" value="inf" label="Maximum Stack and StackCluster length" help="Can be used to remove Stacks and StackClusters that are either too long compared to the original read length. For separately mapped reads, the maximum mapped length may be about 1.5 times the original read length (trimmed, before mapping). For merged reads, the maximum mapped length may be about 2.2 times the original read length (trimmed, before merging and mapping)"/>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
66 <param argument="--max_stack_number" type="text" value="inf" label="Maximum number of Stacks per StackCluster" help="Recommended value is 2 for diploid individuals, 4 for tetraploid individuals, 20 for Pool-Seq"/>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
67 <param argument="--min_stack_depth_fraction" type="float" value="0.0" label="Threshold (%) for minimum relative Stack depth per StackCluster" help="Removes spuriously mapped reads from StackClusters, and controls for noise in the number of SMAPs per locus. The StackCluster total read depth and number of SMAPs is recalculated based on the retained Stacks per StackCluster per sample. Recommended values are 10.0 for individuals and 5.0 for Pool-Seq"/>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
68 <param argument="--min_cluster_depth" value="0" type="integer" label="Minimum total number of reads per StackCluster per sample." help="Sum of all Stacks per StackCluster calculated after filtering out the Stacks with Stack Depth Fraction smaller than min. relative stack depth . A good reference value is 10 for individual diploid samples, 20 for tetraploids, and 30 for Pool-Seq"/>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
69 <param argument="--max_cluster_depth" type="text" value="inf" label="Maximum total number of reads per StackCluster per sample." help="Sum of all Stacks per StackCluster calculated after filtering out the Stacks with Stack Depth Fraction smaller than min. relative stack dept. Used to filter out loci with excessively high read depth"/>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
70 <param argument="--completeness" type="float" value="0" label="Completeness" help="TODO"/>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
71 <param argument="--max_smap_number" type="text" value="inf" label="Max smap number" help="TODO"/>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
72 </inputs>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
73 <outputs>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
74 <collection name="final_stack_positions" type="list" label="${tool.name} on ${on_string}: Final stack positions">
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
75 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.bed" ext="bed" directory="stack_positions_out/"/>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
76 </collection>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
77 <collection name="plots_generated" type="list" label="${tool.name} on ${on_string}: Plots generated">
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
78 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.png" ext="png" directory="visualizations_out/"/>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
79 </collection>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
80 <collection name="stack_saturation" type="list" label="${tool.name} on ${on_string}: Stack saturation">
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
81 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.tsv" ext="tsv" directory="tsv_files_out/"/>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
82 </collection>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
83 </outputs>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
84 <help><![CDATA[
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
85 TODO: Fill in help.
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
86 ]]></help>
7d416d98d2c9 Uploaded
ieguinoa
parents:
diff changeset
87 </tool>