Skip to contents

This function reads a file with amino acid substitutions. The format of should be the same one as requested by the web version of Align-GVGD.

Usage

read_substitutions(
  file = stop("`file` must be specified"),
  amino_acid_code = c("one_letter", "three_letter")
)

Arguments

file

The path to a file with amino acid substitutions.

amino_acid_code

The type of symbol used for amino acids in the returned output.

Value

A tibble listing the amino acids substitutions.

Examples

# "sub.txt" is an example file containing missense substitutions formatted
# according to the requirements indicated in http://agvgd.hci.utah.edu/help.php.
my_file <- system.file("extdata", "sub.txt", package = "agvgd")
cat(readLines(my_file), sep = "\n")
#> P2S
#> P2R
#> P2L
#> P2T
#> P2A
#> P2V
#> P2G
#> P2I
#> P2F
#> P2Y
#> P2C
#> P2H
#> P2Q
#> P2N
#> P2K
#> P2D
#> P2E
#> P2M
#> P2W
#> 

read_substitutions(file = my_file)
#> # A tibble: 19 × 4
#>      res   poi ref   sub  
#>    <int> <int> <chr> <chr>
#>  1     2    NA P     S    
#>  2     2    NA P     R    
#>  3     2    NA P     L    
#>  4     2    NA P     T    
#>  5     2    NA P     A    
#>  6     2    NA P     V    
#>  7     2    NA P     G    
#>  8     2    NA P     I    
#>  9     2    NA P     F    
#> 10     2    NA P     Y    
#> 11     2    NA P     C    
#> 12     2    NA P     H    
#> 13     2    NA P     Q    
#> 14     2    NA P     N    
#> 15     2    NA P     K    
#> 16     2    NA P     D    
#> 17     2    NA P     E    
#> 18     2    NA P     M    
#> 19     2    NA P     W    

# lee2010_sub.txt is a file containing the missense variants studied by
# Lee et al. (2010): https://doi.org/10.1158/0008-5472.CAN-09-4563.
read_substitutions(file = system.file("extdata", "lee2010_sub.txt", package = "agvgd"))
#> # A tibble: 117 × 4
#>      res   poi ref   sub  
#>    <int> <int> <chr> <chr>
#>  1  1647    NA N     K    
#>  2  1651    NA S     F    
#>  3  1652    NA M     T    
#>  4  1652    NA M     I    
#>  5  1653    NA V     M    
#>  6  1655    NA S     F    
#>  7  1656    NA G     D    
#>  8  1662    NA F     S    
#>  9  1663    NA M     L    
#> 10  1663    NA M     K    
#> # ℹ 107 more rows