comparison shapeit_phase.xml @ 5:ceb05c9e6d0a draft

planemo upload for repository https://github.com/CPGRZA/cpgr_ancestry commit 919e9937cdb568591f89a412e22a1124bbb56f77-dirty
author sanbi-uwc
date Mon, 17 Sep 2018 06:06:18 -0400
parents 39e075021957
children 9edc0fb317f7
comparison
equal deleted inserted replaced
4:39e075021957 5:ceb05c9e6d0a
1 <tool id="shapeit_phase" name="shapeit_phase" version="0.4.0"> 1 <tool id="shapeit_phase" name="shapeit_phase" version="0.5.0">
2 <description>genomic data with or without reference panel</description> 2 <description>genomic data with or without reference panel</description>
3 3
4 <requirements> 4 <requirements>
5 <requirement type="package" version="2.r837">shapeit</requirement> 5 <requirement type="package" version="2.r837">shapeit</requirement>
6 </requirements> 6 </requirements>
7 <stdio> 7 <stdio>
8 <exit_code range="1:" /> 8 <exit_code range="1:" />
9 </stdio> 9 </stdio>
10 10
11 <command><![CDATA[ 11 <command><![CDATA[
12 #if str($use_ref_panel) == "use_ref_panel_yes" and str($use_ref_panel.ref_panel_from_table) == "ref_panel_from_table_yes" and str($input_files.input_type_select) == 'plink_bed_bim_fam_list': 12 #if str($use_ref_panel.use_ref_panel_select) == "use_ref_panel_yes" and str($use_ref_panel.ref_panel_from_table.ref_panel_from_table_select) == "ref_panel_from_table_yes" and str($input_files.input_type_select) == 'plink_bed_bim_fam_list':
13 # this is all expecting 1000GP-style reference data
14 PART=`head -1 myfile.bim | cut -f1` && 13 PART=`head -1 myfile.bim | cut -f1` &&
15 REF_DIR='${use_genetic_map.map_from_table.fields.path}' && 14 echo "Working on PART: $PART" &&
16 REF_PREFIX='${use_genetic_map.map_from_table.fields.reference_prefix}' && 15 REF_DIR='${use_genetic_map.genetic_map_from_table.map_from_table.fields.path}' &&
17 if [ -f "\${REF_DIR}/\${REF_PREFIX}_\${PART}.hap.gz" ] \; then 16 REF_PREFIX='${use_genetic_map.genetic_map_from_table.map_from_table.fields.reference_prefix}' &&
18 HAP="\${REF_DIR}/\${REF_PREFIX}_\${PART}.hap.gz" && 17 SAMPLE_PREFIX="\$REF_DIR/${use_genetic_map.genetic_map_from_table.map_from_table.fields.sample_prefix}" &&
19 LEGEND="\${REF_DIR}/\${REF_PREFIX}_\${PART}.legend.gz" && 18 SAMPLE=`ls \$SAMPLE_PREFIX*.sample` &&
20 SAMPLE="\${REF_DIR}/\${REF_PREFIX}.sample" ; 19 if [ ! -f "\$SAMPLE" ] ; then
20 echo "Failed to find valid sample file at \$SAMPLE" >&2 &&
21 exit 1 ;
21 fi && 22 fi &&
22 MAP_PREFIX='${use_genetic_map.map_from_table.fields.map_prefix}' && 23 HAP="\${REF_DIR}/\${REF_PREFIX}\${PART}.hap.gz" &&
23 MAP=`ls \${REF_DIR}/\${MAP_PREFIX}_\${PART}_*` && 24 if [ -f "\$HAP" ] ; then
25 echo "Failed to find valid .hap file at \$HAP" >&2 &&
26 exit 1 ;
27 fi &&
28 LEGEND="\${REF_DIR}/\${REF_PREFIX}\${PART}.legend.gz" &&
29 if [ -f "\$LEGEND ] ; then
30 echo "Failed to find valid .legend file at \$LEGEND" >&2 &&
31 exit 1 ;
32 fi &&
33 MAP_PREFIX='${use_genetic_map.genetic_map_from_table.map_from_table.fields.map_prefix}' &&
34 MAP=`ls \${REF_DIR}/\${MAP_PREFIX}\${PART}_*` &&
24 if [ ! -f "\${MAP}" ] ; then 35 if [ ! -f "\${MAP}" ] ; then
25 echo "Failed to find valid map file at \${MAP}" >&2 && 36 echo "Failed to find valid map file at \${MAP}" >&2 &&
26 exit 1 ; 37 exit 1 ;
27 fi && 38 fi &&
39 #end if
40 #if $input_files.input_type_select == "plink_bed_bim_fam_list":
41 echo "COLLECTION NAME:" ${input_files.plink_bed_etc_list.name} &&
42 #for $dat in $input_files.plink_bed_etc_list:
43 echo NAME '${dat.name}' &&
44 #end for
45 ln -s '${input_files.plink_bed_etc_list[0]}' input.plink_bed &&
46 ln -s '${input_files.plink_bed_etc_list[1]}' input.plink_bim &&
47 ln -s '${input_files.plink_bed_etc_list[2]}' input.plink_fam &&
48 echo "BED file" &&
49 ls -l input.plink_bed &&
50 echo "BIM file" &&
51 head -2 input.plink_bim &&
52 echo "FAM file" &&
53 head -2 input.plink_fam &&
28 #end if 54 #end if
29 55
30 shapeit 56 shapeit
31 57
32 #if $input_files.input_type_select == "vcf": 58 #if $input_files.input_type_select == "vcf":
37 --missing_code $input_files.plink_missing_code 63 --missing_code $input_files.plink_missing_code
38 #end if 64 #end if
39 #else if $input_files.input_type_select == "plink_bed_bim_fam": 65 #else if $input_files.input_type_select == "plink_bed_bim_fam":
40 --input-bed ${input_files.plink_bed} ${input_files.plink_bim} ${input_files.plink_fam} 66 --input-bed ${input_files.plink_bed} ${input_files.plink_bim} ${input_files.plink_fam}
41 #else if $input_files.input_type_select == "plink_bed_bim_fam_list": 67 #else if $input_files.input_type_select == "plink_bed_bim_fam_list":
42 --input-bed '${input_files.plink_bed_etc_list}[0]' '${input_files.plink_bed_etc_list}[1]' '${input_files.plink_bed_etc_list}[2]' 68 --input-bed input.plink_bed input.plink_bim input.plink_fam
43 #else if $input_files.inputy_type_select == "oxford_gen_sample": 69 #else if $input_files.inputy_type_select == "oxford_gen_sample":
44 --input-gen ${input_files.oxford_gen} ${input_files.oxford_sample} 70 --input-gen ${input_files.oxford_gen} ${input_files.oxford_sample}
45 #if $input_files.oxford_threshold != "0.9": 71 #if $input_files.oxford_threshold != "0.9":
46 --input-thr $input_files.oxford_threshold 72 --input-thr $input_files.oxford_threshold
47 #end if 73 #end if
48 #end if 74 #end if
49 75
50 #if $use_genetic_map.use_genetic_map_select == "use_genetic_map_yes": 76 #if $use_genetic_map.use_genetic_map_select == "use_genetic_map_yes":
51 #if $use_genetic_map.genetic_map_from_table_select == "genetic_map_from_table_yes": 77 #if $use_genetic_map.genetic_map_from_table.genetic_map_from_table_select == "genetic_map_from_table_yes":
52 --input-map \$MAP 78 --input-map \$MAP
53 else: 79 #else:
54 --input-map $use_genetic_map.genetic_map 80 --input-map $use_genetic_map.genetic_map
55 #end if 81 #end if
56 #else if $use_genetic_map.rho != "0.0004": 82 #else if $use_genetic_map.rho != "0.0004":
57 --rho $use_genetic_map.rho 83 --rho $use_genetic_map.rho
58 #end if 84 #end if
59 85
60 #if $use_ref_panel.use_ref_panel_select == "use_ref_panel_yes": 86 #if $use_ref_panel.use_ref_panel_select == "use_ref_panel_yes":
61 #if $use_ref_panel.ref_panel_from_table_select == "ref_panel_from_table_yes": 87 #if $use_ref_panel.ref_panel_from_table.ref_panel_from_table_select == "ref_panel_from_table_yes":
62 --input-ref \$HAP \$LEGEND \$SAMPLE 88 --input-ref \$HAP \$LEGEND \$SAMPLE
63 #else 89 #else
64 --input-ref $use_ref_panel.ref_panel_from_table.ref_panel_haps $use_ref_panel.ref_panel_from_table.ref_panel_legend $use_ref_panel.ref_panel_from_table.ref_panel_sample 90 --input-ref $use_ref_panel.ref_panel_from_table.ref_panel_haps $use_ref_panel.ref_panel_from_table.ref_panel_legend $use_ref_panel.ref_panel_from_table.ref_panel_sample
65 #end if 91 #end if
66 #if $use_ref_panel.disable_mcmc_iterations == "disable_mcmc_iterations_yes": 92 #if $use_ref_panel.disable_mcmc_iterations == "disable_mcmc_iterations_yes":