def get_fasta_fps(fasta_dir, fasta_files):
 fasta_filepaths = []
 for curr_file in fasta_files:
  curr_fp = join(fasta_dir, curr_file)
  try:
   file_test = open(curr_fp, 'U')
   file_test.close()
  except IOError:
   raise IOError(('Unable to open %s' % curr_fp))
  fasta_filepaths.append(curr_fp)
 return fasta_filepaths

def get_fasta_fps ( fasta_dir , fasta_files ) : fasta_filepaths = [ ] for curr_file in fasta_files : curr_fp = join ( fasta_dir , curr_file ) try : file_test = open ( curr_fp , 'U' ) file_test . close ( ) except IOError : raise IOError ( ( 'Unable to open %s' % curr_fp ) ) fasta_filepaths . append ( curr_fp ) return fasta_filepaths
returns list of fasta filepaths fasta_dir: directory of fasta files to check fasta_files: list of fasta filenames to open .