comparison read_group_macros.xml @ 6:09a7281d24c5 draft

planemo upload commit 00a7926c285bc4a339bd7deebf40b28f39c7d947-dirty
author devteam
date Tue, 21 Jul 2015 14:12:49 -0400
parents fbf460831036
children d8c9597bfb09
comparison
equal deleted inserted replaced
5:fbf460831036 6:09a7281d24c5
1 <macros> 1 <macros>
2 <!-- Import this at the top of your command block and then 2 <!-- Import this at the top of your command block and then
3 define rg_auto_name. --> 3 define rg_auto_name. -->
4 <token name="@define_read_group_helpers@"> 4 <token name="@define_read_group_helpers@">
5 #import re
6 #def identifier_or_name($input1) 5 #def identifier_or_name($input1)
7 #if hasattr($input1, 'element_identifier') 6 #if hasattr($input1, 'element_identifier')
8 #return $input1.element_identifier 7 #return $input1.element_identifier
9 #else 8 #else
10 #return $input1.name.rstrip('.gz').rstrip('.fastq').rstrip('.fq') 9 #return $input1.name.rstrip('.gz').rstrip('.fastq').rstrip('.fq')
11 #end if 10 #end if
12 #end def 11 #end def
13 12
14 #def clean(name) 13 #def clean(name)
14 #import re
15 #set $name_clean = re.sub('[^\w\-_\.]', '_', $name) 15 #set $name_clean = re.sub('[^\w\-_\.]', '_', $name)
16 #return $name_clean 16 #return $name_clean
17 #end def 17 #end def
18 18
19 #def read_group_name_default($input1, $input2=None) 19 #def read_group_name_default($input1, $input2=None)
77 #set $rg_pl = '' 77 #set $rg_pl = ''
78 #end if 78 #end if
79 79
80 #if $rg_param('read_group_lb_conditional') is None 80 #if $rg_param('read_group_lb_conditional') is None
81 #set $rg_lb = '' 81 #set $rg_lb = ''
82 #elif $rg_param('read_group_lb_conditional')do_auto_name 82 #elif $rg_param('read_group_lb_conditional').do_auto_name
83 #set $rg_lb = $rg_auto_name 83 #set $rg_lb = $rg_auto_name
84 #else 84 #else
85 #set $rg_lb = str($rg_param('read_group_lb_conditional').LB) 85 #set $rg_lb = str($rg_param('read_group_lb_conditional').LB)
86 #end if 86 #end if
87 87
145 <yield /> 145 <yield />
146 </when> 146 </when>
147 </xml> 147 </xml>
148 <xml name="read_group_id_param"> 148 <xml name="read_group_id_param">
149 <param name="ID" type="text" value="" size="20" label="Read group identifier (ID)" help="This value must be unique among multiple samples in your experiment" optional="false"> 149 <param name="ID" type="text" value="" size="20" label="Read group identifier (ID)" help="This value must be unique among multiple samples in your experiment" optional="false">
150 <validator type="empty_field" /> 150 <validator type="empty_field" />
151 </param> 151 </param>
152 </xml> 152 </xml>
153 <xml name="read_group_id_conditional"> 153 <xml name="read_group_id_conditional">
154 <conditional name="read_group_id_conditional"> 154 <conditional name="read_group_id_conditional">
155 <expand macro="read_group_auto_name_conditional"> 155 <expand macro="read_group_auto_name_conditional">