Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indel support: dataloader-utility: VariantSeqExtractor #2

Open
krrome opened this issue Jun 13, 2018 · 0 comments
Open

indel support: dataloader-utility: VariantSeqExtractor #2

krrome opened this issue Jun 13, 2018 · 0 comments

Comments

@krrome
Copy link
Contributor

krrome commented Jun 13, 2018

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant