Find doppelgangers based on "smoking gun" phenotypes - those that should be unique to each patient.
Source:R/smokingGunFinder.R
smokingGunFinder.Rd
Checks all pairwise combinations of samples for values of the "smoking" gun phenotypes that are identical.
Arguments
- eset.pair
a list of ExpressionSets, with two elements. If the two elements are identical, the function will check for duplicate IDs within one element. If not identical, it will check for duplicate IDs between elements.
- smokingguns
phenoData column names found in multiple elements of eset.pair that may contain "smoking guns" such as identifiers that should be unique to each sample.
- transFun
a function to apply to IDs before comparing. By default apply no transformation.
- separator
Separator between dataset name and sample name. Dataset names are added to sample names to keep track of dataset of origin.
Value
Returns an adjacency matrix for samples where matches have value 1, non-matches have value zero. Value for a sample against itself is NA.
Examples
example("phenoFinder")
#>
#> phnFnd> library(curatedOvarianData)
#>
#> phnFnd> data(GSE32063_eset)
#>
#> phnFnd> data(GSE17260_eset)
#>
#> phnFnd> esets2 <- list(JapaneseB=GSE32063_eset,
#> phnFnd+ Yoshihara2010=GSE17260_eset)
#>
#> phnFnd> ## standardize the sample ids to improve matching based on clinical annotation
#> phnFnd> esets2 <- lapply(esets2, function(X){
#> phnFnd+ X$alt_sample_name <- paste(X$sample_type, gsub("[^0-9]", "", X$alt_sample_name), sep="_")
#> phnFnd+
#> phnFnd+ ## Removal of columns that cannot possibly match also helps duplicated patients to stand out
#> phnFnd+ pData(X) <- pData(X)[, !grepl("uncurated_author_metadata", colnames(pData(X)))]
#> phnFnd+ X <- X[, 1:20] ##speed computations
#> phnFnd+ return(X) })
#>
#> phnFnd> ## See first six samples in both rows and columns
#> phnFnd> phenoFinder(esets2)[1:6, 1:6]
#> GSM432220 GSM432221 GSM432222 GSM432223 GSM432224 GSM432225
#> GSM795125 0.2351904 0.1014047 0.3525417 0.7274151 0.2189890 0.27397077
#> GSM795126 0.5404524 0.2588727 0.4083015 0.4079720 0.2927870 0.74123368
#> GSM795127 0.3791279 0.5008562 0.4983502 0.4981226 0.6385506 0.04416984
#> GSM795128 0.2351904 0.1014047 0.3525417 0.3523760 0.2189890 0.27397077
#> GSM795129 0.1076309 0.2395470 0.2190910 0.2189890 0.3643260 0.16030839
#> GSM795130 0.2603947 0.1344290 0.1077761 0.1076793 0.2489234 0.29544860
smokingGunFinder(esets2, "days_to_death")
#> GSM432220 GSM432221 GSM432222 GSM432223 GSM432224 GSM432225 GSM432226
#> GSM795125 0 0 0 1 0 0 0
#> GSM795126 0 0 0 0 0 1 0
#> GSM795127 0 0 0 0 0 0 1
#> GSM795128 0 0 0 0 0 0 0
#> GSM795129 0 0 0 0 0 0 0
#> GSM795130 0 0 0 0 0 0 0
#> GSM795131 0 0 0 0 0 0 0
#> GSM795132 0 0 0 0 0 1 0
#> GSM795133 0 0 0 0 0 0 0
#> GSM795134 0 0 1 0 0 0 0
#> GSM795135 0 0 0 0 0 0 0
#> GSM795136 0 0 0 0 0 0 0
#> GSM795137 0 0 0 0 0 0 0
#> GSM795138 0 0 0 0 0 0 0
#> GSM795139 0 0 0 0 0 0 0
#> GSM795140 0 0 0 0 0 0 0
#> GSM795141 0 0 0 0 0 0 0
#> GSM795142 0 0 0 0 0 0 0
#> GSM795143 0 0 0 0 0 0 0
#> GSM795144 0 0 0 0 0 0 0
#> GSM432227 GSM432228 GSM432229 GSM432230 GSM432231 GSM432232 GSM432233
#> GSM795125 0 0 0 0 0 0 0
#> GSM795126 0 0 0 0 0 0 0
#> GSM795127 0 0 0 0 0 0 0
#> GSM795128 0 0 0 0 0 0 0
#> GSM795129 0 0 1 0 0 0 0
#> GSM795130 0 0 0 0 0 1 0
#> GSM795131 0 0 0 0 0 0 0
#> GSM795132 0 0 0 0 0 0 0
#> GSM795133 1 0 0 0 0 0 0
#> GSM795134 0 0 0 0 0 0 0
#> GSM795135 0 0 0 0 0 1 0
#> GSM795136 0 0 0 0 0 0 0
#> GSM795137 0 0 0 0 0 0 0
#> GSM795138 0 0 0 0 0 0 0
#> GSM795139 0 0 0 0 0 0 0
#> GSM795140 0 0 0 0 0 0 0
#> GSM795141 0 0 0 0 0 0 0
#> GSM795142 0 0 0 0 0 0 0
#> GSM795143 0 0 0 0 0 0 0
#> GSM795144 0 0 0 0 0 0 0
#> GSM432234 GSM432235 GSM432236 GSM432237 GSM432238 GSM432239
#> GSM795125 0 0 0 0 0 0
#> GSM795126 0 0 0 0 0 0
#> GSM795127 0 0 0 0 0 0
#> GSM795128 0 0 0 0 0 0
#> GSM795129 0 0 0 0 0 0
#> GSM795130 0 0 0 0 0 0
#> GSM795131 0 0 0 0 0 0
#> GSM795132 0 0 0 0 0 0
#> GSM795133 0 0 0 0 0 0
#> GSM795134 0 0 0 0 1 0
#> GSM795135 0 0 0 0 0 0
#> GSM795136 0 0 0 0 0 0
#> GSM795137 0 0 0 0 0 0
#> GSM795138 0 0 0 0 0 0
#> GSM795139 0 0 0 0 0 0
#> GSM795140 0 0 0 0 0 0
#> GSM795141 0 0 0 0 0 0
#> GSM795142 0 0 0 0 0 0
#> GSM795143 0 0 0 0 0 0
#> GSM795144 0 0 0 0 0 0