Skip to content

Commit

Permalink
Updated data variable name (conflict with other R variable/function)
Browse files Browse the repository at this point in the history
  • Loading branch information
rrrlw committed Jan 25, 2019
1 parent e741423 commit d805104
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
14 changes: 14 additions & 0 deletions data/sample_seq.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# save a data frame containing 4 AMP names and sequences from
# the Antimicrobial Peptide Database (APD3)
# URL: https://aps.unmc.edu/AP/main.php
sample_seq <- data.frame(Name = c("Aurein 2.2",
"Cecropin A-Magainin 2 Hybrid",
"Uperin 3.5",
"Citropin 1.1",
"CPF-ST3"),
Seq = c("GLFDIVKKVVGALGSL",
"KWKLFKKIKFLHSAKKF",
"GVGDLIRKAVSVIKNIV",
"GLFDVIKKVASVIGGL",
"GLLGPLLKIAAKVGSNLL"),
stringsAsFactors = FALSE)
14 changes: 0 additions & 14 deletions data/sequence.R

This file was deleted.

12 changes: 6 additions & 6 deletions vignettes/intro.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The following code loads the helixvis package and the sample data that comes wit
library("helixvis")
# load dataset containing example peptides
data("sequence")
data("sample_seq")
```

## Background
Expand All @@ -50,10 +50,10 @@ With helixvis, generating helical wheels takes a single line of code, as follows

```{r wheel, fig.width = 4, fig.height = 4}
# print sequence that will be drawn
print(sequence[1, ])
print(sample_seq[1, ])
# draw helical wheel
draw_wheel(sequence$Seq[1])
draw_wheel(sample_seq$Seq[1])
```

By default: nonpolar residues (e.g. glycine, tryptophan) will be colored grey; polar residues (e.g. serine, threonine) will be colored yellow; acidic residues with a negative charge at physiologic pH (e.g. aspartic acid, glutamic acid) will be colored red; and basic residues with a positive charge at physiologic pH (e.g. lysine, arginine) will be colored blue.
Expand All @@ -62,7 +62,7 @@ The one-letter code for each residue can also be overlaid on each residue by set

```{r wheelcol, fig.width = 4, fig.height = 4}
# draw helical wheel with custom color scheme
draw_wheel(sequence$Seq[1], col = c("pink", "orange", "white", "black"),
draw_wheel(sample_seq$Seq[1], col = c("pink", "orange", "white", "black"),
labels = TRUE, label.col = "blue")
```

Expand All @@ -76,10 +76,10 @@ The following code blocks and figures reproduce the figures from the Helical Whe

```{r wenxiang, fig.width = 4, fig.height = 4}
# draw wenxiang diagram
draw_wenxiang(sequence$Seq[1])
draw_wenxiang(sample_seq$Seq[1])
# draw wenxiang diagram with custom color scheme
draw_wenxiang(sequence$Seq[1], col = c("pink", "orange", "white", "black"),
draw_wenxiang(sample_seq$Seq[1], col = c("pink", "orange", "white", "black"),
labels = TRUE, label.col = "blue")
```

Expand Down

0 comments on commit d805104

Please sign in to comment.