Construct a table containing direct links to UniProt and AlphaFold pages for individual proteins.

makeDbLinkTable(
  df,
  idCol,
  speciesCommon,
  addSpeciesSpecificColumns = TRUE,
  convTablePomBase = NULL,
  convTableWormBase = NULL,
  removeSuffix = TRUE,
  signifDigits = 4
)

Arguments

df

data.frame with at least a column containing protein identifiers (UniProt IDs).

idCol

Character scalar giving the column name of the column in df containing protein identifiers. Each element of this column should be a string, which can represent multiple protein IDs separated by semicolons. See examples for an illustration.

speciesCommon

Character scalar, providing the common species name (e.g., "mouse", "roundworm", "fission yeast").

addSpeciesSpecificColumns

Logical scalar, indicating whether to add species-specific columns (whenever applicable).

convTablePomBase

Conversion table between UniProt IDs and PomBase IDs. Only used if speciesCommon is "fission yeast". A suitably formatted conversion table can be generated using getConvTable(type = "PomBase").

convTableWormBase

Conversion table between UniProt IDs and WormBase IDs. Only used if speciesCommon is "roundworm". A suitably formatted conversion table can be generated using getConvTable(type = "WormBase").

removeSuffix

Logical scalar indicating whether suffixes of the form -[0-9]+ should be removed from the protein ID before generating the URL. Currently only influencing the AlphaFold, ComplexPortal and BioGRID URLs.

signifDigits

Numeric scalar giving the number of significant digits to round numeric columns to. If NULL, no rounding will be performed.

Value

A data.frame with database links for the proteins.

Author

Charlotte Soneson

Examples

pbconv <- getConvTable(type = "PomBase")
makeDbLinkTable(data.frame(id = c("B5BP45", "O13282")), idCol = "id",
                           speciesCommon = "fission yeast",
                           convTablePomBase = pbconv)
#>       id
#> 1 B5BP45
#> 2 O13282
#>                                                                        UniProt
#> 1 <a href="https://www.uniprot.org/uniprot/B5BP45" target="_blank"> B5BP45</a>
#> 2 <a href="https://www.uniprot.org/uniprot/O13282" target="_blank"> O13282</a>
#>                                                                        AlphaFold
#> 1 <a href="https://alphafold.ebi.ac.uk/entry/B5BP45" target="_blank"> B5BP45</a>
#> 2 <a href="https://alphafold.ebi.ac.uk/entry/O13282" target="_blank"> O13282</a>
#>                                                                                           ComplexPortal
#> 1 <a href="https://www.ebi.ac.uk/complexportal/complex/search?query=B5BP45" target="_blank"> B5BP45</a>
#> 2 <a href="https://www.ebi.ac.uk/complexportal/complex/search?query=O13282" target="_blank"> O13282</a>
#>                                                                                              BioGRID
#> 1 <a href="https://thebiogrid.org/search.php?search=B5BP45&organism=all" target="_blank"> B5BP45</a>
#> 2 <a href="https://thebiogrid.org/search.php?search=O13282&organism=all" target="_blank"> O13282</a>
#>                                                                               PomBase
#> 1 <a href="https://www.pombase.org/gene/SPBC460.01c" target="_blank"> SPBC460.01c</a>
#> 2 <a href="https://www.pombase.org/gene/SPCC5E4.03c" target="_blank"> SPCC5E4.03c</a>

wbconv <- getConvTable(type = "WormBase")
makeDbLinkTable(data.frame(gid = c("eps-8", "epi-1"),
                           pid = c("Q7YTG1;O18250", "C1P641;C1P640")),
                idCol = "pid", speciesCommon = "roundworm",
                convTableWormBase = wbconv)
#>     gid           pid
#> 1 eps-8 Q7YTG1;O18250
#> 2 epi-1 C1P641;C1P640
#>                                                                                                                                                     UniProt
#> 1 <a href="https://www.uniprot.org/uniprot/Q7YTG1" target="_blank"> Q7YTG1</a>;<a href="https://www.uniprot.org/uniprot/O18250" target="_blank"> O18250</a>
#> 2 <a href="https://www.uniprot.org/uniprot/C1P641" target="_blank"> C1P641</a>;<a href="https://www.uniprot.org/uniprot/C1P640" target="_blank"> C1P640</a>
#>                                                                                                                                                       AlphaFold
#> 1 <a href="https://alphafold.ebi.ac.uk/entry/Q7YTG1" target="_blank"> Q7YTG1</a>;<a href="https://alphafold.ebi.ac.uk/entry/O18250" target="_blank"> O18250</a>
#> 2 <a href="https://alphafold.ebi.ac.uk/entry/C1P641" target="_blank"> C1P641</a>;<a href="https://alphafold.ebi.ac.uk/entry/C1P640" target="_blank"> C1P640</a>
#>                                                                                                                                                                                                 ComplexPortal
#> 1 <a href="https://www.ebi.ac.uk/complexportal/complex/search?query=Q7YTG1" target="_blank"> Q7YTG1</a>;<a href="https://www.ebi.ac.uk/complexportal/complex/search?query=O18250" target="_blank"> O18250</a>
#> 2 <a href="https://www.ebi.ac.uk/complexportal/complex/search?query=C1P641" target="_blank"> C1P641</a>;<a href="https://www.ebi.ac.uk/complexportal/complex/search?query=C1P640" target="_blank"> C1P640</a>
#>                                                                                                                                                                                                 BioGRID
#> 1 <a href="https://thebiogrid.org/search.php?search=Q7YTG1&organism=all" target="_blank"> Q7YTG1</a>;<a href="https://thebiogrid.org/search.php?search=O18250&organism=all" target="_blank"> O18250</a>
#> 2 <a href="https://thebiogrid.org/search.php?search=C1P641&organism=all" target="_blank"> C1P641</a>;<a href="https://thebiogrid.org/search.php?search=C1P640&organism=all" target="_blank"> C1P640</a>
#>                                                                                                   WormBase
#> 1 <a href="https://wormbase.org/species/c_elegans/gene/WBGene00001330" target="_blank"> WBGene00001330</a>
#> 2 <a href="https://wormbase.org/species/c_elegans/gene/WBGene00001328" target="_blank"> WBGene00001328</a>