def _make_position(location_string, offset=0):
 if (location_string == '?'):
  return SeqFeature.UnknownPosition()
 try:
  return SeqFeature.ExactPosition(max(0, (offset + int(location_string))))
 except ValueError:
  pass
 if location_string.startswith('<'):
  try:
   return SeqFeature.BeforePosition(max(0, (offset + int(location_string[1:]))))
  except ValueError:
   pass
 elif location_string.startswith('>'):
  try:
   return SeqFeature.AfterPosition(max(0, (offset + int(location_string[1:]))))
  except ValueError:
   pass
 elif location_string.startswith('?'):
  try:
   return SeqFeature.UncertainPosition(max(0, (offset + int(location_string[1:]))))
  except ValueError:
   pass
 raise NotImplementedError(("Cannot parse location '%s'" % location_string))

def _make_position ( location_string , offset = 0 ) : if ( location_string == '?' ) : return SeqFeature . UnknownPosition ( ) try : return SeqFeature . ExactPosition ( max ( 0 , ( offset + int ( location_string ) ) ) ) except ValueError : pass if location_string . startswith ( '<' ) : try : return SeqFeature . BeforePosition ( max ( 0 , ( offset + int ( location_string [ 1 : ] ) ) ) ) except ValueError : pass elif location_string . startswith ( '>' ) : try : return SeqFeature . AfterPosition ( max ( 0 , ( offset + int ( location_string [ 1 : ] ) ) ) ) except ValueError : pass elif location_string . startswith ( '?' ) : try : return SeqFeature . UncertainPosition ( max ( 0 , ( offset + int ( location_string [ 1 : ] ) ) ) ) except ValueError : pass raise NotImplementedError ( ( "Cannot parse location '%s'" % location_string ) )
turn a swiss location position into a seqfeature position object .