Definition of a class that can deals with generation of mutated DNA sequences given an interval, a variant and an anchor point.
class VariantSeqExtractor:
def __init__(self, fasta_file):
…
def extract(self, interval, variant, anchor, keep_length=True):
“””
interval: define a new class Interval()
Variant: define a a new class Variant() in analogy to cyvcf2
keep_length: returned sequence will have the same length as the interval
...[AGAC|AGATG]C...
[ interval ]
| anchor point
GA -> G variant
If not keep_length:
return (“AGAC|AGATG”, “AGACAGTG”)
else:
return (“AGAC|AGATG”, “AGACAGTGC”)
Returns
A tuple of sequences with ref and alt
“””
pass
Definition of a class that can deals with generation of mutated DNA sequences given an interval, a variant and an anchor point.