One and two point frequencies of a specified column or specified columns are computed for a given alignment.

1 2 3 |

`aln` |
alignment |

`i` |
reference column for the frequency computation |

`j2` |
columns to compute the two point frequency together with column |

`lett` |
character vector containing the unique alphabet of the alignment |

`cluster` |
snow cluster object created with |

The columns `j2`

are the specified columns (not `i`

) to compute the frequencies and the rows represent all possible two letter pairs according to the alphabet. The computation of `freq2p()`

is parallelized using `parLapply()`

from the package snow. If `cluster`

is left at its default value the computation is carried out in serial.

A matrix is returned for the `freq2p()`

. For `freq1p()`

, if no `i`

is specified, a matrix containing the frequencies of the symbols in the alignment is returned. For a certain `i`

a vector with the respective frequencies of the symbols is the result.

Franziska Hoffgaard, Philipp Weil

Tierney, Rossini, Li (2009) *Int J Parallel Proc* 37, 78–90.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
seqa<-unlist(strsplit("PQITLWQRPLVTIKIGGQL",split=""))
seqb<-unlist(strsplit("PQITLWKRPLVTIRIGGQL",split=""))
seqc<-unlist(strsplit("PQITLWQRPLVTIKIGGQL",split=""))
aln<-matrix(c(seqa,seqb,seqc),nrow=3,byrow=TRUE)
f1<-freq1p(aln)
f1a<-freq1p(aln, 1)
f2<-freq2p(1, aln, 2:10)
## Not run:
## Cluster example
clu<-makeCluster(2)
f2<-freq2p(1, aln, 2:10, cluster=clu)
stopCluster(clu)
## End(Not run)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.