comparison vsnp_sample_names.xml @ 1:895d18fcfebe draft

Uploaded
author greg
date Tue, 27 Oct 2020 18:21:55 +0000
parents f75e2ac7b6cd
children a56648c94fd3
comparison
equal deleted inserted replaced
0:f75e2ac7b6cd 1:895d18fcfebe
2 <description></description> 2 <description></description>
3 <command detect_errors="exit_code"><![CDATA[ 3 <command detect_errors="exit_code"><![CDATA[
4 #import os 4 #import os
5 #import re 5 #import re
6 #set output_dir = 'output' 6 #set output_dir = 'output'
7 mkdir -p $output_dir 7 mkdir -p $output_dir &&
8 #if str($input_type_cond.input_type) == "single": 8 #if str($input_type_cond.input_type) == "single":
9 ## We may have a single read or a pair, but in 9 ## We may have a single read or a pair, but in
10 ## either case we want the same base file name. 10 ## either case we want the same base file name.
11 #set sample_name = $os.path.basename($input_type_cond.read.element_identifier) 11 #set sample_name = $os.path.basename($input_type_cond.read.element_identifier)
12 #if $sample_name.find(".") > 0: 12 #if $sample_name.find(".") > 0:
13 #set sample_name = $sample_name.split(".")[0] 13 #set sample_name = $sample_name.split(".")[0]
14 #end if 14 #end if
15 #if $sample_name.find("_") > 0: 15 #if $sample_name.find("_") > 0:
16 #set sample_name = $sample_name.split("_")[0] 16 #set sample_name = $sample_name.split("_")[0]
17 #end if 17 #end if
18 echo $sample_name > $output 18 && echo '$sample_name' > '$output'
19 #else: 19 #else:
20 #for $i in $input_type_cond.reads_collection: 20 #for $i in $input_type_cond.reads_collection:
21 #set sample_name = $os.path.basename($i.element_identifier) 21 #set sample_name = $os.path.basename($i.element_identifier)
22 #if $sample_name.find(".") > 0: 22 #if $sample_name.find(".") > 0:
23 #set sample_name = $sample_name.split(".")[0] 23 #set sample_name = $sample_name.split(".")[0]
24 #end if 24 #end if
25 #set output_file = $os.path.join($output_dir, $sample_name) 25 #set output_file = $os.path.join($output_dir, $sample_name)
26 && echo $sample_name > $output_file 26 && echo '$sample_name' > '$output_file'
27 #end for 27 #end for
28 #end if 28 #end if
29 ]]></command> 29 ]]></command>
30 <inputs> 30 <inputs>
31 <conditional name="input_type_cond"> 31 <conditional name="input_type_cond">