def _loci_to_arr(loci, taxdict, mindict):
<EOL>nloci = len(loci)<EOL>maxlen = np.max(np.array([len(locus.split("<STR_LIT:\n>")[<NUM_LIT:0>]) for locus in loci]))<EOL>keep = np.zeros(nloci, dtype=np.bool_)<EOL>arr = np.zeros((nloci, <NUM_LIT:4>, maxlen), dtype=np.float64)<EOL>if len(taxdict) == <NUM_LIT:5>:<EOL><INDENT>arr = np.zeros((nloci, <NUM_LIT:6>, maxlen), dtype=np.float64)<EOL><DEDENT>if isinstance(mindict, int):<EOL><INDENT>mindict = {i: mindict for i in taxdict}<EOL><DEDENT>elif isinstance(mindict, dict):<EOL><INDENT>mindict = {i: mindict[i] for i in taxdict}<EOL><DEDENT>else:<EOL><INDENT>mindict = {i: <NUM_LIT:1> for i in taxdict}<EOL><DEDENT>allowed_names = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>']<EOL>if any([i not in allowed_names for i in taxdict]):<EOL><INDENT>raise IPyradError("<STR_LIT>")<EOL><DEDENT>keys = sorted([i for i in taxdict.keys() if i[<NUM_LIT:0>] == '<STR_LIT:p>'])<EOL>outg = keys[-<NUM_LIT:1>]<EOL>for loc in xrange(nloci):<EOL><INDENT>lines = loci[loc].split("<STR_LIT:\n>")[:-<NUM_LIT:1>]<EOL>names = [i.split()[<NUM_LIT:0>] for i in lines]<EOL>seqs = np.array([list(i.split()[<NUM_LIT:1>]) for i in lines])<EOL>covs = [sum([j in names for j in taxdict[tax]]) >= mindict[tax]for tax in taxdict]<EOL>if all(covs):<EOL><INDENT>keep[loc] = True<EOL>refidx = np.where([i in taxdict[outg] for i in names])[<NUM_LIT:0>]<EOL>refseq = seqs[refidx].view(np.uint8)<EOL>ancestral = np.array([reftrick(refseq, GETCONS2)[:, <NUM_LIT:0>]])<EOL>iseq = _reffreq2(ancestral, refseq, GETCONS2)<EOL>arr[loc, -<NUM_LIT:1>, :iseq.shape[<NUM_LIT:1>]] = iseq <EOL>if len(taxdict) == <NUM_LIT:4>:<EOL><INDENT>for tidx, key in enumerate(keys[:-<NUM_LIT:1>]):<EOL><INDENT>nidx = np.where([i in taxdict[key] for i in names])[<NUM_LIT:0>]<EOL>sidx = seqs[nidx].view(np.uint8)<EOL>iseq = _reffreq2(ancestral, sidx, GETCONS2)<EOL>arr[loc, tidx, :iseq.shape[<NUM_LIT:1>]] = iseq<EOL><DEDENT><DEDENT>else:<EOL><INDENT>iseq = _reffreq2(ancestral, refseq, GETCONS2) <EOL>arr[loc, -<NUM_LIT:1>, :iseq.shape[<NUM_LIT:1>]] = iseq <EOL>nidx = np.where([i in taxdict['<STR_LIT>'] for i in names])[<NUM_LIT:0>]<EOL>sidx = seqs[nidx].view(np.uint8)<EOL>iseq = _reffreq2(ancestral, sidx, GETCONS2)<EOL>arr[loc, <NUM_LIT:0>, :iseq.shape[<NUM_LIT:1>]] = iseq<EOL>nidx = np.where([i in taxdict['<STR_LIT>'] for i in names])[<NUM_LIT:0>]<EOL>sidx = seqs[nidx].view(np.uint8)<EOL>iseq = _reffreq2(ancestral, sidx, GETCONS2)<EOL>arr[loc, <NUM_LIT:1>, :iseq.shape[<NUM_LIT:1>]] = iseq<EOL>nidx = np.where([i in taxdict['<STR_LIT>'] for i in names])[<NUM_LIT:0>]<EOL>nidy = np.where([i in taxdict['<STR_LIT>'] for i in names])[<NUM_LIT:0>]<EOL>sidx = seqs[nidx].view(np.uint8)<EOL>sidy = seqs[nidy].view(np.uint8)<EOL>xseq = _reffreq2(ancestral, sidx, GETCONS2)<EOL>yseq = _reffreq2(ancestral, sidy, GETCONS2)<EOL>mask3 = xseq != <NUM_LIT:0><EOL>mask4 = yseq != <NUM_LIT:0><EOL>xseq[mask4] = <NUM_LIT:0><EOL>yseq[mask3] = <NUM_LIT:0><EOL>arr[loc, <NUM_LIT:2>, :xseq.shape[<NUM_LIT:1>]] = xseq<EOL>arr[loc, <NUM_LIT:3>, :yseq.shape[<NUM_LIT:1>]] = yseq<EOL>nidx = nidx.tolist() + nidy.tolist()<EOL>sidx = seqs[nidx].view(np.uint8)<EOL>iseq = _reffreq2(ancestral, sidx, GETCONS2)<EOL>arr[loc, <NUM_LIT:4>, :iseq.shape[<NUM_LIT:1>]] = iseq<EOL><DEDENT><DEDENT><DEDENT>arr = arr[keep, :, :]<EOL>arr = masknulls(arr)<EOL>return arr, keep<EOL>
return a frequency array from a loci file for all loci with taxa from 
taxdict and min coverage from mindict.