aa_granges | R Documentation |
Convert tabled amino acid ranges to a GRanges object to facilitate the overlap with protein domains from Uniprot database.
aa_granges(tab)
tab |
a |
extdata <- system.file("extdata", package="svbams") fusions <- readRDS(file.path(extdata, "valid_fusions.rds")) tab <- fusionTable2(fusions) extdata2 <- system.file("extdata", package="svbams") up <- readRDS(file.path(extdata2, "uniprot.rds")) up2 <- uniprotFeatures(up, tab, strwrap.width=20) ## check that none of the short descriptions are too long nchar.desc <- nchar(up2$short.desc) gene1.in.up <- tab$gene.5prime %in% up2$hugo gene2.in.up <- tab$gene.3prime %in% up2$hugo bothin.up <- gene1.in.up & gene2.in.up tab <- tab[bothin.up, ] ## the aa_len field of the amino acid in uniprot might have a zero-based index ## -- it is one smaller than the length we've recorded ## coerce to GRanges tumor_aa_ranges <- aa_granges(tab) identical(as.character(seqnames(tumor_aa_ranges)), rep(c("ERBB4", "IKZF2"), each=2)) domain_aa_ranges <- GRanges(up2$hugo, IRanges(up2$start, up2$end), chromosome=up2$seqnames, description=up2$description, short.desc=up2$short.desc, aa_len=up2$aa_len) domains <- subsetByOverlaps(domain_aa_ranges, tumor_aa_ranges, type="within") domains
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.