@@ -73,8 +73,8 @@ out_dir = skm.io.define_output_dir(
7373)
7474
7575if (
76- config ["learnapp " ]["selection" ] != "top_hit"
77- and config ["learnapp " ]["threshold" ] == "None"
76+ config ["learn_apply " ]["selection" ] != "top_hit"
77+ and config ["learn_apply " ]["threshold" ] == "None"
7878):
7979 raise Exception (
8080 "The only selection method that allows for None is `top_hit`. Other methods inherently use a threshold"
@@ -99,11 +99,11 @@ rule all:
9999 join (out_dir , "learn" , "kmer-counts-total.csv" ),
100100 # Fragmentation outputs (only if enabled)
101101 expand (join (out_dir , "fragmented" , "{nb}.fasta" ), nb = FAS )
102- if config ["learnapp " ]["fragmentation" ]
102+ if config ["learn_apply " ]["fragmentation" ]
103103 else [],
104104 # expand(join(out_dir, "vector_frag", "{nb}.npz"), nb=FAS)
105105 expand (join (out_dir , "vector" , "vector_frag" , "{nb}.npz" ), nb = FAS )
106- if config ["learnapp " ]["fragmentation" ]
106+ if config ["learn_apply " ]["fragmentation" ]
107107 else [],
108108 # Forward evaluation scores
109109 expand (
@@ -112,7 +112,7 @@ rule all:
112112 "evaluate" ,
113113 (
114114 "eval_apply_sequences"
115- if not config ["learnapp " ]["fragmentation" ]
115+ if not config ["learn_apply " ]["fragmentation" ]
116116 else "eval_apply_frag"
117117 ),
118118 "seq-annotation-scores-{nb}.csv.gz" ,
@@ -126,7 +126,7 @@ rule all:
126126 "evaluate" ,
127127 (
128128 "eval_apply_reversed"
129- if not config ["learnapp " ]["fragmentation" ]
129+ if not config ["learn_apply " ]["fragmentation" ]
130130 else "eval_apply_reversed_frag"
131131 ),
132132 "seq-annotation-scores-{nb}.csv.gz" ,
@@ -149,7 +149,7 @@ use rule unzip from process with:
149149 zipped = join (input_dir , "zipped" , "{uz}.gz" ),
150150
151151
152- if config ["learnapp " ]["fragmentation" ]:
152+ if config ["learn_apply " ]["fragmentation" ]:
153153
154154 rule fragmentation :
155155 input :
@@ -161,11 +161,11 @@ if config["learnapp"]["fragmentation"]:
161161 message :
162162 "Fragmenting sequences in {input.fasta}. Output written to {output.fasta_out}."
163163 params :
164- version = config ["learnapp " ]["version" ],
165- frag_length = config ["learnapp " ]["frag_length" ],
166- location = config ["learnapp " ]["location" ],
167- min_length = config ["learnapp " ]["min_length" ],
168- seed = config ["learnapp " ]["seed" ],
164+ version = config ["learn_apply " ]["version" ],
165+ frag_length = config ["learn_apply " ]["frag_length" ],
166+ location = config ["learn_apply " ]["location" ],
167+ min_length = config ["learn_apply " ]["min_length" ],
168+ seed = config ["learn_apply " ]["seed" ],
169169 script :
170170 resource_path ("snekmer" , "scripts" , "learn_fragment.py" )
171171
@@ -224,7 +224,7 @@ rule eval_apply_reverse_seqs:
224224 data = join (
225225 out_dir ,
226226 "vector" ,
227- ("vector" if not config ["learnapp " ]["fragmentation" ] else "vector_frag" ),
227+ ("vector" if not config ["learn_apply " ]["fragmentation" ] else "vector_frag" ),
228228 "{nb}.npz" ,
229229 ),
230230 annotation = expand ("{an}" , an = annot_files ),
@@ -235,7 +235,7 @@ rule eval_apply_reverse_seqs:
235235 "evaluate" ,
236236 (
237237 "eval_apply_reversed"
238- if not config ["learnapp " ]["fragmentation" ]
238+ if not config ["learn_apply " ]["fragmentation" ]
239239 else "eval_apply_reversed_frag"
240240 ),
241241 "seq-annotation-scores-{nb}.csv.gz" ,
@@ -254,7 +254,7 @@ rule reverse_decoy_evaluations:
254254 "evaluate" ,
255255 (
256256 "eval_apply_reversed"
257- if not config ["learnapp " ]["fragmentation" ]
257+ if not config ["learn_apply " ]["fragmentation" ]
258258 else "eval_apply_reversed_frag"
259259 ),
260260 "seq-annotation-scores-{nb}.csv.gz" ,
@@ -276,7 +276,7 @@ rule eval_apply_sequences:
276276 data = join (
277277 out_dir ,
278278 "vector" ,
279- ("vector" if not config ["learnapp " ]["fragmentation" ] else "vector_frag" ),
279+ ("vector" if not config ["learn_apply " ]["fragmentation" ] else "vector_frag" ),
280280 "{nb}.npz" ,
281281 ),
282282 annotation = expand ("{an}" , an = annot_files ),
@@ -287,7 +287,7 @@ rule eval_apply_sequences:
287287 "evaluate" ,
288288 (
289289 "eval_apply_sequences"
290- if not config ["learnapp " ]["fragmentation" ]
290+ if not config ["learn_apply " ]["fragmentation" ]
291291 else "eval_apply_frag"
292292 ),
293293 "seq-annotation-scores-{nb}.csv.gz" ,
@@ -306,7 +306,7 @@ rule evaluate:
306306 "evaluate" ,
307307 (
308308 "eval_apply_sequences"
309- if not config ["learnapp " ]["fragmentation" ]
309+ if not config ["learn_apply " ]["fragmentation" ]
310310 else "eval_apply_frag"
311311 ),
312312 "seq-annotation-scores-{nb}.csv.gz" ,
@@ -320,7 +320,7 @@ rule evaluate:
320320 message :
321321 "Calculating global confidence scores based on Apply results. Output written to {output.eval_glob}."
322322 params :
323- modifier = config ["learnapp " ]["conf_weight_modifier" ],
323+ modifier = config ["learn_apply " ]["conf_weight_modifier" ],
324324 script :
325325 resource_path ("snekmer" , "scripts" , "learn_evaluate_sequences.py" )
326326
0 commit comments