This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(Biostrings) | |
library(BSgenome.Hsapiens.UCSC.hg19) | |
#نأخذ الكروموزوم 1 كمثال | |
Hsapiens$chr1 | |
# 249250621-letter "DNAString" instance | |
#seq: NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN...NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN | |
# لنفرض أننا مهتمين بسلسلة الجينات ABCA4, ACADM و GBA | |
genes <- Views(Hsapiens$chr1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DNAs <- c("ACCT-NACG", "ACGTTCGA","TCACCGAGACTTACGAC") | |
dnaSet <- DNAStringSet(DNAs) | |
dnaSet | |
# A DNAStringSet instance of length 3 | |
# width seq | |
#[1] 9 ACCT-NACG | |
#[2] 8 ACGTTCGA | |
#[3] 17 TCACCGAGACTTACGAC | |
#يمكن القيام بعمليات على مجموعة من السلاسل مع بعض |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ds <- DNAString("GCAAAGT-TT-C") | |
length(ds) | |
# [1] 12 | |
ds[1:3] | |
# 3-letter "DNAString" instance | |
#seq: GCA | |
ds[3:1] | |
# 3-letter "DNAString" instance |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(Biostrings) | |
bs <- BString("This is a normal string") # BString انشاء كائن | |
ds <- DNAString("GCAAAGT-TT-C") # DNAString انشاء كائن | |
rs <- RNAString("GCAAAGU-UU-C") # RNAString انشاء كائن | |
rs2 <- RNAString(ds) # RNAString إلى DNAString تحويل | |
aas <- AAString(ds) # AAString انشاء كائن |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DoDAVIDGOAnnotation <-function(topics,pval=0.05,GOlimit=5){ | |
clusters<-1:ncol(topics) | |
Groups<-c(); | |
Annot<-c(); | |
pvalue<-c(); | |
counts<-c(); | |
for(clus in clusters){ | |
#Get the genes in that cluster |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Usage example: | |
#EntrezID<-c("2114","9757","5886","9373","6921","4088","7006","6196","10054","10945") | |
#EnsemblID<-EntrezToEnsembl(EntrezID) | |
EntrezToEnsembl<-function(EntrezID){ | |
require(biomaRt); | |
ensemble<-useMart("ensembl"); | |
hsp<-useDataset(mart=ensemble,dataset="hsapiens_gene_ensembl"); | |
ids<-getBM(filters= "entrezgene", | |
attributes= c("entrezgene","ensembl_gene_id", "external_gene_id","description"), |
NewerOlder