comparison hubArchiveCreator.xml @ 18:d786bca6a75d draft

planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 3007f4ce1d6e8ac8324970d355f028b9394e2a5f
author rmarenco
date Fri, 30 Sep 2016 18:33:03 -0400
parents c02720d1afee
children 40469b265ddb
comparison
equal deleted inserted replaced
17:c02720d1afee 18:d786bca6a75d
54 54
55 #set data_dict = {"name": $name} 55 #set data_dict = {"name": $name}
56 #silent data_dict.update($extra_data_dict) 56 #silent data_dict.update($extra_data_dict)
57 57
58 ## Add the ordering by taking the tool form indexes 58 ## Add the ordering by taking the tool form indexes
59 #silent $data_dict.update({"order_index": $order_index + 1}) 59 #silent $data_dict.update({"order_index": $order_index})
60 60
61 #silent $data_parameter_dict.update({$false_path: $data_dict}) 61 #silent $data_parameter_dict.update({$false_path: $data_dict})
62 62
63 #end def 63 #end def
64
65
66 ## Get the number of digits from tracks, to have a unique integer from group index and track index
67
68 #set temp_max_digit = 0
69
70 #for $g in $group
71 #if len($g.format) > $temp_max_digit
72 #silent temp_max_digit = len($g.format)
73 #end if
74 #end for
75
76 #set nb_digits_max_track = len(str($temp_max_digit))
77
78 ## END Get the number of digits
64 79
65 #for $i_g, $g in enumerate( $group ) 80 #for $i_g, $g in enumerate( $group )
66 #for $i, $f in enumerate( $g.format ) 81 #for $i, $f in enumerate( $g.format )
82 ## Create the order index using index_group+1 concatenated with index_track
83 #set index_group_final = str($i_g + 1)
84 #set index_track_final = str($index_group_final) + str($i).zfill($nb_digits_max_track)
67 85
68 ## For each format, we have a few mandatory fields we store in a dict 86 ## For each format, we have a few mandatory fields we store in a dict
69 #set track_color = str($f.formatChoice.track_color) 87 #set track_color = str($f.formatChoice.track_color)
70 #set group_name = str($g.group_name) 88 #set group_name = str($g.group_name)
71 89
77 #set bam_index = $f.formatChoice.BAM.metadata.bam_index 95 #set bam_index = $f.formatChoice.BAM.metadata.bam_index
78 96
79 ## Add Bam format specific fields 97 ## Add Bam format specific fields
80 #silent extra_data_dict.update({"index": $bam_index}) 98 #silent extra_data_dict.update({"index": $bam_index})
81 99
82 #silent $prepare_json($f.formatChoice.BAM, $i, extra_data_dict) 100 #silent $prepare_json($f.formatChoice.BAM, $index_track_final, extra_data_dict)
83 #end if 101 #end if
84 #if $f.formatChoice.format_select == "bed" 102 #if $f.formatChoice.format_select == "bed"
85 #if $f.formatChoice.bedChoice.bed_select == "bed" 103 #if $f.formatChoice.bedChoice.bed_select == "bed"
86 --bed $f.formatChoice.bedChoice.BED 104 --bed $f.formatChoice.bedChoice.BED
87 #silent $prepare_json($f.formatChoice.bedChoice.BED, $i, 105 #silent $prepare_json($f.formatChoice.bedChoice.BED, $index_track_final,
88 extra_data_dict) 106 extra_data_dict)
89 #end if 107 #end if
90 #if $f.formatChoice.bedChoice.bed_select == "bed_simple_repeats_option" 108 #if $f.formatChoice.bedChoice.bed_select == "bed_simple_repeats_option"
91 --bedSimpleRepeats $f.formatChoice.bedChoice.BED_simple_repeats 109 --bedSimpleRepeats $f.formatChoice.bedChoice.BED_simple_repeats
92 #silent $prepare_json($f.formatChoice.bedChoice.BED_simple_repeats, $i, 110 #silent $prepare_json($f.formatChoice.bedChoice.BED_simple_repeats, $index_track_final,
93 extra_data_dict) 111 extra_data_dict)
94 #end if 112 #end if
95 #end if 113 #end if
96 #if $f.formatChoice.format_select == "psl" 114 #if $f.formatChoice.format_select == "psl"
97 --psl $f.formatChoice.PSL 115 --psl $f.formatChoice.PSL
98 #silent $prepare_json($f.formatChoice.PSL, $i, 116 #silent $prepare_json($f.formatChoice.PSL, $index_track_final,
99 extra_data_dict) 117 extra_data_dict)
100 #end if 118 #end if
101 #if $f.formatChoice.format_select == "bigwig" 119 #if $f.formatChoice.format_select == "bigwig"
102 --bigwig $f.formatChoice.BIGWIG 120 --bigwig $f.formatChoice.BIGWIG
103 #silent $prepare_json($f.formatChoice.BIGWIG, $i, 121 #silent $prepare_json($f.formatChoice.BIGWIG, $index_track_final,
104 extra_data_dict) 122 extra_data_dict)
105 #end if 123 #end if
106 #if $f.formatChoice.format_select == "gff3" 124 #if $f.formatChoice.format_select == "gff3"
107 --gff3 $f.formatChoice.GFF3 125 --gff3 $f.formatChoice.GFF3
108 #silent $prepare_json($f.formatChoice.GFF3, $i, 126 #silent $prepare_json($f.formatChoice.GFF3, $index_track_final,
109 extra_data_dict) 127 extra_data_dict)
110 #end if 128 #end if
111 #if $f.formatChoice.format_select == "gtf" 129 #if $f.formatChoice.format_select == "gtf"
112 ## Add also GTF from Agustus? See https://github.com/ENCODE-DCC/kentUtils/issues/8 130 ## Add also GTF from Agustus? See https://github.com/ENCODE-DCC/kentUtils/issues/8
113 --gtf $f.formatChoice.GTF 131 --gtf $f.formatChoice.GTF
114 #silent $prepare_json($f.formatChoice.GTF, $i, 132 #silent $prepare_json($f.formatChoice.GTF, $index_track_final,
115 extra_data_dict) 133 extra_data_dict)
116 #end if 134 #end if
117 #end for 135 #end for
118 #end for 136 #end for
119 137