parameters: (ffasta)
return_statement: return fastas
docstring: read fasta file, return a dict with key as seq_id and value as seq
docstring_summary: read fasta file, return a dict with key as seq_id and value as seq
docstring_tokens: read fasta file return a dict with key as seq_id and value as seq
function: def getFastaID2Seq(ffasta):
    """
    read fasta file, return a dict with key as seq_id and value as seq
    """
    import os
    assert os.path.exists(ffasta), "File not found: %s\n" % ffasta
    fastas = {};
    f_fin = open(ffasta, 'r');
    entries = f_fin.read().split('>');
    f_fin.close();
    for entry in entries[1:]:
      words = entry.split("\n");
      fastas[words[0]] = words[1];
  
    return fastas;
function_tokens: def getFastaID2Seq ( ffasta ) : import os assert os . path . exists ( ffasta ) , "File not found: %s\n" % ffasta fastas = { } f_fin = open ( ffasta , 'r' ) entries = f_fin . read ( ) . split ( '>' ) f_fin . close ( ) for entry in entries [ 1 : ] : words = entry . split ( "\n" ) fastas [ words [ 0 ] ] = words [ 1 ] return fastas