def parse_CPS_file(lines):
 chimeras = []
 for line in lines:
  record = line.split()
  try:
   id = record[1]
   parent1 = record[2]
   parent2 = record[3]
   verdict = record[10]
  except IndexError:
   raise ValueError('Error parsing ChimeraSlayer CPS file.')
  if (verdict == 'YES'):
   chimeras.append((id, [parent1, parent2]))
 return chimeras

def parse_CPS_file ( lines ) : chimeras = [ ] for line in lines : record = line . split ( ) try : id = record [ 1 ] parent1 = record [ 2 ] parent2 = record [ 3 ] verdict = record [ 10 ] except IndexError : raise ValueError ( 'Error parsing ChimeraSlayer CPS file.' ) if ( verdict == 'YES' ) : chimeras . append ( ( id , [ parent1 , parent2 ] ) ) return chimeras
parse the cps file from chimeraslayer .