varvamp 1.1__tar.gz → 1.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {varvamp-1.1 → varvamp-1.1.2}/PKG-INFO +1 -1
- {varvamp-1.1 → varvamp-1.1.2}/varvamp/__init__.py +1 -1
- {varvamp-1.1 → varvamp-1.1.2}/varvamp/command.py +5 -2
- {varvamp-1.1 → varvamp-1.1.2}/varvamp/scripts/blast.py +2 -2
- {varvamp-1.1 → varvamp-1.1.2}/varvamp/scripts/logging.py +3 -1
- {varvamp-1.1 → varvamp-1.1.2}/varvamp/scripts/primers.py +2 -2
- {varvamp-1.1 → varvamp-1.1.2}/varvamp/scripts/qpcr.py +4 -4
- {varvamp-1.1 → varvamp-1.1.2}/varvamp.egg-info/PKG-INFO +1 -1
- {varvamp-1.1 → varvamp-1.1.2}/README.md +0 -0
- {varvamp-1.1 → varvamp-1.1.2}/setup.cfg +0 -0
- {varvamp-1.1 → varvamp-1.1.2}/setup.py +0 -0
- {varvamp-1.1 → varvamp-1.1.2}/varvamp/__main__.py +0 -0
- {varvamp-1.1 → varvamp-1.1.2}/varvamp/scripts/__init__.py +0 -0
- {varvamp-1.1 → varvamp-1.1.2}/varvamp/scripts/alignment.py +0 -0
- {varvamp-1.1 → varvamp-1.1.2}/varvamp/scripts/consensus.py +0 -0
- {varvamp-1.1 → varvamp-1.1.2}/varvamp/scripts/default_config.py +0 -0
- {varvamp-1.1 → varvamp-1.1.2}/varvamp/scripts/get_config.py +0 -0
- {varvamp-1.1 → varvamp-1.1.2}/varvamp/scripts/param_estimation.py +0 -0
- {varvamp-1.1 → varvamp-1.1.2}/varvamp/scripts/regions.py +0 -0
- {varvamp-1.1 → varvamp-1.1.2}/varvamp/scripts/reporting.py +0 -0
- {varvamp-1.1 → varvamp-1.1.2}/varvamp/scripts/scheme.py +0 -0
- {varvamp-1.1 → varvamp-1.1.2}/varvamp.egg-info/SOURCES.txt +0 -0
- {varvamp-1.1 → varvamp-1.1.2}/varvamp.egg-info/dependency_links.txt +0 -0
- {varvamp-1.1 → varvamp-1.1.2}/varvamp.egg-info/entry_points.txt +0 -0
- {varvamp-1.1 → varvamp-1.1.2}/varvamp.egg-info/not-zip-safe +0 -0
- {varvamp-1.1 → varvamp-1.1.2}/varvamp.egg-info/requires.txt +0 -0
- {varvamp-1.1 → varvamp-1.1.2}/varvamp.egg-info/top_level.txt +0 -0
|
@@ -180,8 +180,11 @@ def shared_workflow(args, log_file):
|
|
|
180
180
|
# estimate threshold or number of ambiguous bases if args were not supplied
|
|
181
181
|
if args.threshold is None or args.n_ambig is None:
|
|
182
182
|
args.threshold, args.n_ambig = param_estimation.get_parameters(preprocessed_alignment, args, log_file)
|
|
183
|
-
if args.mode == "qpcr" and args.
|
|
184
|
-
|
|
183
|
+
if args.mode == "qpcr" and args.pn_ambig is None:
|
|
184
|
+
if args.n_ambig == 0:
|
|
185
|
+
args.pn_ambig = 0
|
|
186
|
+
if args.n_ambig > 0:
|
|
187
|
+
args.pn_ambig = args.n_ambig - 1
|
|
185
188
|
with open(log_file, "a") as f:
|
|
186
189
|
print(f"Automatic parameter selection set -pa {args.pn_ambig}.", file=f)
|
|
187
190
|
|
|
@@ -58,7 +58,7 @@ def create_BLAST_query_qpcr(qpcr_scheme_candidates, data_dir):
|
|
|
58
58
|
query_path = os.path.join(data_dir, "BLAST_query.fasta")
|
|
59
59
|
with open(query_path, "w") as query:
|
|
60
60
|
for amp in qpcr_scheme_candidates:
|
|
61
|
-
for primer_type in ["
|
|
61
|
+
for primer_type in ["PROBE", "LEFT", "RIGHT"]:
|
|
62
62
|
name = f"{primer_type}_{qpcr_scheme_candidates[amp][primer_type][1]}_{qpcr_scheme_candidates[amp][primer_type][2]}"
|
|
63
63
|
if name in already_written:
|
|
64
64
|
continue
|
|
@@ -174,7 +174,7 @@ def predict_non_specific_amplicons_worker(amp, blast_df, max_length, mode):
|
|
|
174
174
|
primers = [data[2], data[3]]
|
|
175
175
|
elif mode == "qpcr":
|
|
176
176
|
primers = []
|
|
177
|
-
for primer_type in ["
|
|
177
|
+
for primer_type in ["PROBE", "LEFT", "RIGHT"]:
|
|
178
178
|
primers.append(f"{primer_type}_{data[primer_type][1]}_{data[primer_type][2]}")
|
|
179
179
|
# subset df for primers
|
|
180
180
|
df_amp_primers = blast_df[blast_df["query"].isin(primers)]
|
|
@@ -173,7 +173,7 @@ def raise_arg_errors(args, log_file):
|
|
|
173
173
|
if args.mode == "qpcr":
|
|
174
174
|
if args.pn_ambig < 0:
|
|
175
175
|
raise_error(
|
|
176
|
-
"number of ambiguous characters in the qPCR probe cannot be
|
|
176
|
+
"number of ambiguous characters in the qPCR probe cannot be negative.",
|
|
177
177
|
log_file,
|
|
178
178
|
exit=True
|
|
179
179
|
)
|
|
@@ -283,6 +283,7 @@ def confirm_config(args, log_file):
|
|
|
283
283
|
"QPRIMER_DIFF",
|
|
284
284
|
"QPROBE_TEMP_DIFF",
|
|
285
285
|
"QPROBE_DISTANCE",
|
|
286
|
+
"END_OVERLAP",
|
|
286
287
|
"QAMPLICON_LENGTH",
|
|
287
288
|
"QAMPLICON_GC",
|
|
288
289
|
"QAMPLICON_DEL_CUTOFF"
|
|
@@ -379,6 +380,7 @@ def confirm_config(args, log_file):
|
|
|
379
380
|
("max base penalty", config.PRIMER_MAX_BASE_PENALTY),
|
|
380
381
|
("primer permutation penalty", config.PRIMER_PERMUTATION_PENALTY),
|
|
381
382
|
("qpcr flanking primer difference", config.QPRIMER_DIFF),
|
|
383
|
+
("probe and primer end overlap", config.END_OVERLAP),
|
|
382
384
|
("qpcr deletion size still considered for deltaG calculation", config.QAMPLICON_DEL_CUTOFF),
|
|
383
385
|
("maximum difference between primer and blast db", config.BLAST_MAX_DIFF),
|
|
384
386
|
("multiplier of the maximum length for non-specific amplicons", config.BLAST_SIZE_MULTI),
|
|
@@ -350,9 +350,9 @@ def create_primer_dictionary(primer_candidates, direction):
|
|
|
350
350
|
|
|
351
351
|
for primer in primer_candidates:
|
|
352
352
|
if direction == "+":
|
|
353
|
-
direction_name = "
|
|
353
|
+
direction_name = "LEFT"
|
|
354
354
|
elif direction == "-":
|
|
355
|
-
direction_name = "
|
|
355
|
+
direction_name = "RIGHT"
|
|
356
356
|
primer_name = f"{direction_name}_{primer_idx}"
|
|
357
357
|
primer_dict[primer_name] = primer
|
|
358
358
|
primer_idx += 1
|
|
@@ -82,7 +82,7 @@ def get_qpcr_probes(kmers, ambiguous_consensus, alignment_cleaned):
|
|
|
82
82
|
# create probe dictionary
|
|
83
83
|
if "+" in direction:
|
|
84
84
|
if filter_probe_direction_dependent(kmer[0]):
|
|
85
|
-
probe_name = f"PROBE_{probe_idx}
|
|
85
|
+
probe_name = f"PROBE_{probe_idx}_LEFT"
|
|
86
86
|
three_prime_penalty = primers.calc_3_prime_penalty("+", per_base_mismatches)
|
|
87
87
|
probe_candidates[probe_name] = [kmer[0], kmer[1], kmer[2],
|
|
88
88
|
base_penalty + permutation_penalty + three_prime_penalty,
|
|
@@ -90,7 +90,7 @@ def get_qpcr_probes(kmers, ambiguous_consensus, alignment_cleaned):
|
|
|
90
90
|
probe_idx += 1
|
|
91
91
|
if "-" in direction:
|
|
92
92
|
if filter_probe_direction_dependent(primers.rev_complement(kmer[0])):
|
|
93
|
-
probe_name = f"PROBE_{probe_idx}
|
|
93
|
+
probe_name = f"PROBE_{probe_idx}_RIGHT"
|
|
94
94
|
three_prime_penalty = primers.calc_3_prime_penalty("-", per_base_mismatches)
|
|
95
95
|
probe_candidates[probe_name] = [primers.rev_complement(kmer[0]), kmer[1], kmer[2],
|
|
96
96
|
base_penalty + permutation_penalty + three_prime_penalty,
|
|
@@ -208,13 +208,13 @@ def assess_amplicons(left_subset, right_subset, qpcr_probes, probe, majority_con
|
|
|
208
208
|
if not hardfilter_amplicon(majority_consensus, left_primer, right_primer):
|
|
209
209
|
continue
|
|
210
210
|
# ... the probe is close enough to the primer on the same strand
|
|
211
|
-
if "
|
|
211
|
+
if "LEFT" in probe:
|
|
212
212
|
if not qpcr_probes[probe][1] in range(
|
|
213
213
|
left_primer[2] + config.QPROBE_DISTANCE[0],
|
|
214
214
|
left_primer[2] + config.QPROBE_DISTANCE[1] + 1
|
|
215
215
|
):
|
|
216
216
|
continue
|
|
217
|
-
elif "
|
|
217
|
+
elif "RIGHT" in probe:
|
|
218
218
|
if not right_primer[1] in range(
|
|
219
219
|
qpcr_probes[probe][2] + config.QPROBE_DISTANCE[0],
|
|
220
220
|
qpcr_probes[probe][2] + config.QPROBE_DISTANCE[1] + 1
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|