Commit dffb83c5 authored by jkvis's avatar jkvis

temp. Fixed duplicates in transpositions: this needs re-thinking when refactoring

parent 98670dd8
......@@ -127,9 +127,12 @@ def var_to_dna_var(s1, s2, var, seq_list=[], weight_position=1):
'$' not in s1[var.reference_start - ins_length:var.reference_start] and
'$' not in s2[var.sample_start:var.sample_end] and
s1[var.reference_start - ins_length:var.reference_start] ==
s2[var.sample_start:var.sample_end] and
s2[var.sample_start - ins_length:var.sample_start] ==
s2[var.sample_start:var.sample_end]):
# NOTE: We may want to omit the inserted / deleted sequence and
# use the ranges instead.
return DNAVar(start=var.reference_start - ins_length + 1,
end=var.reference_end, type='dup', shift=shift,
sample_start=var.sample_start + 1, sample_end=var.sample_end,
......@@ -310,6 +313,7 @@ def describe_dna(s1, s2):
s2_swig[0], s2_swig[1], extractor.TYPE_DNA)
for variant in extracted.variants:
if variant.type & extractor.TRANSPOSITION_OPEN:
if not in_transposition:
seq_list = ISeqList()
......
......@@ -94,7 +94,7 @@ for line in lines:
else:
sequences[label] = [string.strip()]
literature = {
standard = {
'Amel': [],
'CSF1P0': ['AGAT'],
'D10S1248': ['GGAA'],
......@@ -123,7 +123,7 @@ literature = {
#select = 'D13S317'
#unit_list = literature[select]
#unit_list = standard[select]
#reference = sequences[select][0]
#sample = sequences[select][14]
#description, rep_start, rep_end = describe_repeats(reference, sample, unit_list)
......@@ -152,7 +152,7 @@ for sequence in sequences:
# for unit in units:
# unit_list.append(unit)
unit_list = literature[sequence]
unit_list = standard[sequence]
reference = sequences[sequence][0]
print sequence + ':',
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment