Description Usage Arguments Value Examples
This method computes the semantic similarity between two named samples annotated with a group of ontolgy terms belonging to the same ontology
1 2 3 4 5 |
object |
instance of class |
sample1 |
A sample ID with its annotations available in a data frame |
sample2 |
A sample ID with its annotations available in a data frame |
annotated_df |
data frame with annotations obtained using entityFinder. The data frame should have at least a column named 'sample_id' with the sample identifier and a column named 'term_url' with the URL of the ontology terms annotating the sample. The ontology terms must belong to the ontology loaded in the Similarity class. |
The semantic similarity between the samples sample1 and sample2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | sim <- new('Similarity')
pairwiseConfig(sim) <- listSimilarities()$pairwiseMeasures[9]
groupConfig(sim) <- listSimilarities()$groupwiseMeasures[3]
ef <- new('EntityFinder')
opts <- CMoptions()
obo <- system.file('extdata', 'sample.cs.obo', package='OnassisJavaLibs')
ontology(sim) <- obo
sample_dict <- CMdictionary(inputFileOrDb=obo, outputDir=getwd(), synonymType='ALL')
sra_chip_seq <- readRDS(system.file('extdata', 'vignette_data', 'GEO_human_chip.rds',
package='Onassis'))
chipseq_dict_annot <- EntityFinder(sra_chip_seq[1:20,c('sample_accession', 'title',
'experiment_attribute', 'sample_attribute', 'description')], dictionary=sample_dict,
options=opts)
s <- samplesim(sim, as.character(as.vector(chipseq_dict_annot$sample_id[1])),
as.character(as.vector(chipseq_dict_annot$sample_id[7])) , chipseq_dict_annot)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.