original_docstring: Create a SeqPosition object from a reference sequence.
docstring: Create a SeqPosition object from a reference sequence.
docstring_tokens: Create a SeqPosition object from a reference sequence .
code: def from_reference(
          cls, x : int, rel_to : str, approximate : bool, reference : Seq
      ) -> 'SeqPosition':
          """Create a SeqPosition object from a reference sequence."""
  
          # If the rel_to FIVE PRIME then reverse coordinates to make it
          # relative to the three prime position.
          if rel_to == FIVE_PRIME:
              x = len(reference) - x
  
          return SeqPosition(
              x,
              approximate=approximate,
              reference=reference)
code_tokens: def from_reference ( cls , x : int , rel_to : str , approximate : bool , reference : Seq ) -> 'SeqPosition' : if rel_to == FIVE_PRIME : x = len ( reference ) - x return SeqPosition ( x , approximate = approximate , reference = reference )
short_docstring: Create a SeqPosition object from a reference sequence.
short_docstring_tokens: Create a SeqPosition object from a reference sequence .
comment: """Create a SeqPosition object from a reference sequence."""$SEP$# If the rel_to FIVE PRIME then reverse coordinates to make it$SEP$# relative to the three prime position.