def load_linker_sequences(linker_fname):
 global linkerlengths
 if (not os.path.getsize(linker_fname)):
  raise RuntimeError((("File empty? '" + linker_fname) + "'"))
 fh = open(linker_fname, 'r')
 linkerseqs = read_fasta(fh)
 if (len(linkerseqs) == 0):
  raise RuntimeError((linker_fname + ': no sequence found?'))
 for i in linkerseqs:
  if (i.name in linkerlengths):
   raise RuntimeError((((linker_fname + ": sequence '") + i.name) + "' present multiple times. Aborting."))
  linkerlengths[i.name] = len(i.sequence)
 fh.close()

def load_linker_sequences ( linker_fname ) : global linkerlengths if ( not os . path . getsize ( linker_fname ) ) : raise RuntimeError ( ( ( "File empty? '" + linker_fname ) + "'" ) ) fh = open ( linker_fname , 'r' ) linkerseqs = read_fasta ( fh ) if ( len ( linkerseqs ) == 0 ) : raise RuntimeError ( ( linker_fname + ': no sequence found?' ) ) for i in linkerseqs : if ( i . name in linkerlengths ) : raise RuntimeError ( ( ( ( linker_fname + ": sequence '" ) + i . name ) + "' present multiple times. Aborting." ) ) linkerlengths [ i . name ] = len ( i . sequence ) fh . close ( )
loads all linker sequences into memory .