Browse code

Updating sequenceMap documentation

WilliamMc authored on 15/05/2020 18:13:43
Showing 5 changed files

... ...
@@ -10,6 +10,7 @@ export(scaledHydropathyGlobal)
10 10
 export(scaledHydropathyLocal)
11 11
 export(sequenceCheck)
12 12
 export(sequenceMap)
13
+export(sequenceMapCoordinates)
13 14
 export(sequencePlot)
14 15
 export(structuralTendency)
15 16
 export(structuralTendencyPlot)
... ...
@@ -46,6 +46,7 @@
46 46
 #' @return A ggplot. Can be plotted immediatly or
47 47
 #'   additional layers can be added.
48 48
 #' @export
49
+#' @seealso \code{\link{sequenceMapCoordinates}} for mapping coordinates
49 50
 #'
50 51
 
51 52
 sequenceMap <- function(
... ...
@@ -1,3 +1,27 @@
1
+#' Sequence Map Coordinates
2
+#'
3
+#' This is a function used to create a coordinate grid for the
4
+#'   \code{\link{sequenceMap}} function. It is based on the length of the
5
+#'   sequence being mapped, and how many residues per line are specified.
6
+#'   The function wraps the sequence to have a number of columns that is
7
+#'   the sequence length / number of residues per row, rounded up. \cr\cr
8
+#'   This is intended for use within the sequenceMap function, however, this
9
+#'   can also be used to identify the coordinates of residues within the ggplot
10
+#'   coordinate plane for addition annotations.
11
+#'
12
+#' @inheritParams sequenceMap
13
+#' @inheritParams sequenceCheck
14
+#'
15
+#' @return A data frame with rows containing the amino acid sequence, residue
16
+#'   position within the sequence, as well as the row and column of each
17
+#'   residue within the ggplot output of sequenceMap().
18
+#'
19
+#' @seealso \code{\link{sequenceMapCoordinates}} for mapping coordinates
20
+#' @export
21
+
22
+
23
+
24
+
1 25
 sequenceMapCoordinates <-
2 26
   function(sequence,
3 27
            nbResidues = 30) {
... ...
@@ -73,3 +73,6 @@ A ggplot. Can be plotted immediatly or
73 73
 This is a graphical function used to visualize data along an
74 74
   amino acid sequence.
75 75
 }
76
+\seealso{
77
+\code{\link{sequenceMapCoordinates}} for mapping coordinates
78
+}
76 79
new file mode 100644
... ...
@@ -0,0 +1,37 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/sequenceMapCoordinates.R
3
+\name{sequenceMapCoordinates}
4
+\alias{sequenceMapCoordinates}
5
+\title{Sequence Map Coordinates}
6
+\usage{
7
+sequenceMapCoordinates(sequence, nbResidues = 30)
8
+}
9
+\arguments{
10
+\item{sequence}{amino acid sequence as a single character string
11
+or vector of single characters.
12
+It also supports a single character string that specifies
13
+the locaion of a .fasta or .fa file.}
14
+
15
+\item{nbResidues}{numeric value, 30 by default.
16
+The number of residues to display on each row of the plot.
17
+It is not reccomended to be over 50 or under 10 for standard sequences.
18
+Optimal value may vary between sequences of extreme lengths.}
19
+}
20
+\value{
21
+A data frame with rows containing the amino acid sequence, residue
22
+  position within the sequence, as well as the row and column of each
23
+  residue within the ggplot output of sequenceMap().
24
+}
25
+\description{
26
+This is a function used to create a coordinate grid for the
27
+  \code{\link{sequenceMap}} function. It is based on the length of the
28
+  sequence being mapped, and how many residues per line are specified.
29
+  The function wraps the sequence to have a number of columns that is
30
+  the sequence length / number of residues per row, rounded up. \cr\cr
31
+  This is intended for use within the sequenceMap function, however, this
32
+  can also be used to identify the coordinates of residues within the ggplot
33
+  coordinate plane for addition annotations.
34
+}
35
+\seealso{
36
+\code{\link{sequenceMapCoordinates}} for mapping coordinates
37
+}