Name |
Type |
Description |
map_to_chr_location |
rshell |
Scriptlibrary("biomaRt")
#select ensembl
entrez_ids<-file[,gene_ids_column]
ensembl = useMart("ensembl")
#select human
ensembl = useDataset("hsapiens_gene_ensembl",mart=ensembl)
#biomart<-getBM(attributes = c("entrezgene","hgnc_symbol", "strand", "chromosome_name", "start_position","end_position", "transcript_start","transcript_end"), filters = "entrezgene", values = entrez_ids, mart = ensembl)
biomart_1<-getBM(attributes = c("entrezgene","hgnc_symbol", "strand", "chromosome_name", "start_position","end_position", "transcript_start","transcript_end"), filters = "entrezgene", values = entrez_ids[1:round(length(entrez_ids)/3)], mart = ensembl)
biomart_2<-getBM(attributes = c("entrezgene","hgnc_symbol", "strand", "chromosome_name", "start_position","end_position", "transcript_start","transcript_end"), filters = "entrezgene", values = entrez_ids[(round(length(entrez_ids)/3)+1):round(length(entrez_ids)/1.5)], mart = ensembl)
biomart_3<-getBM(attributes = c("entrezgene","hgnc_symbol", "strand", "chromosome_name", "start_position","end_position", "transcript_start","transcript_end"), filters = "entrezgene", values = entrez_ids[(round(length(entrez_ids)/1.5)+1):length(entrez_ids)], mart = ensembl)
biomart<-rbind(biomart_1,biomart_2,biomart_3)
#write.table(biomart, paste("htt_assoc_proteins_biomart",Sys.time(),".txt",sep=""), col.names=TRUE, row.names=FALSE,sep="\t")
biomart$entrezgene<-as.numeric(biomart$entrezgene)
dput(biomart, mapped_file_biomart);
print("biomart calling done") R Serverlocalhost:6311 |
compute_promoter_region_with_strand |
rshell |
Scripta<-unique(biomart$entrezgene)
mat<-matrix(NA, nrow=dim(biomart)[1], ncol=10)
colnames(mat)<-c(colnames(biomart),"promoter_start","promoter_end")
for (i in 1:dim(biomart)[1] ) {
if(biomart[i,3] > 0 ) {
promoter_start<-as.numeric(biomart$transcript_start[i])-upstream
promoter_end<-as.numeric(biomart$transcript_start[i])+downstream
mat[i,]<-c(biomart[i,1],as.character(biomart[i,2]),biomart[i,3],as.character(biomart[i,4]), biomart[i,5],biomart[i,6], biomart[i,7], biomart [i,8],promoter_start,promoter_end)
}
if(biomart[i,3] < 0 ) {
promoter_start<-as.numeric(biomart$transcript_end[i])+upstream
promoter_end<-as.numeric(biomart$transcript_end[i])-downstream
mat[i,]<-c(biomart[i,1],as.character(biomart[i,2]),biomart[i,3],as.character(biomart[i,4]), biomart[i,5],biomart[i,6], biomart[i,7], biomart[i,8],promoter_end,promoter_start)
}
}
#output_file<- paste("htt_assoc_proteins_biomart_promoter_region_50_50_",Sys.time(),".txt",sep="")
#write.table(mat,output_file, col.names=TRUE, row.names=FALSE, sep="\t")
#textFile<-mat
dput(mat, textFile)
print("promoter region done") R Serverlocalhost:6311 |
read_files |
rshell |
Script#setwd(dir)
con <- textConnection(tmp_table)
file<-read.table(con, header=TRUE, sep="\t")
#sep="\t",
print(file) R Serverlocalhost:6311 |
Text_constant |
stringconstant |
Value2000 |
Text_constant_2 |
stringconstant |
Value5000 |
Column |
stringconstant |
Value1 |
Table |
stringconstant |
Value"gene_id" "logFC" "p.value" "adj.p.value"
3310 0.79670154147447 0.0197088853582369 0.0551655687021221
7849 0.175788068220962 0.176318404255761 0.31608230104836
441263 -0.0960325907429525 0.129265382310857 0.2499497148588 |
Comments (0)
No comments yet
Log in to make a comment