-
Notifications
You must be signed in to change notification settings - Fork 3
/
Global.R
152 lines (132 loc) · 6.33 KB
/
Global.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
options(warn=-1)
options(scipen = 19)
par(family="Times")
library(shiny)
#library(IRanges)#IRanges
#library(plotly)
#library(LDheatmap)
#library(chopsticks)
#library(foreach)
#library(ape)
#library(pegas)
#library(plyr)
#library(dplyr)
#library(tidyr)
#library(gridExtra)
##library(ggtree)
#library(grid)
##library(snpStats)
##library(genetics)
library(shinycssloaders)
#library(shinysky)
#library(shinyWidgets)
#library(shinydisconnect)
#library(Biostrings)
#library(GenomicRanges)
#library(XML)
#library(data.table)
library(shinydashboard)
#library(stringr)
#library(RLumShiny)
#library(ggplot2)
#library(clusterProfiler)
#library(DT)
#library(enrichplot)
#library(S4Vectors)
#library(circlize)
#library(shinyjqui)
#library(cowplot)
`%>%` <- magrittr::`%>%`
`%dopar%` <- foreach::`%dopar%`
#source("fetchSnp.R")
#source("fetchSnpAllele.R")
#source("ld.heatmap.R")
#source("phylo.R")
#source("nucDiv.R")
#source("GBrowser.R")
#source("anaReg.R")
#source("geneStru.R")
#source("snpInfo.R")
#source("validReg.R")
source("box_format.R")
source("Homepage.R")
#source("alleleFreq.R")
#gff <- data.table::fread("./data/zh13.gff", sep = "\t", data.table = FALSE)
#snp.lst <- read.table("./data/snp.RData.lst", head=T, as.is=T, sep="\t")
load("./data/gene.info.RData")
load("./data/w82Rdata/w82.gene.info.RData")
soya.info <- read.table("./data/all.soya.txt", head=T, as.is=T, sep="\t", quote="")
soynm <- read.table("./info/Williams82SNP/Wm82nm.txt", sep = "\t", as.is = T, header = F)
soynm <- as.character(soynm)
all.soya.cho <- paste(soya.info$ID, soya.info$Species, sep=", ")
all.soya.cho <- paste0(gsub(",.+", "", all.soya.cho) , ", ", soya.info$Names, ", ", gsub(".+,", "", all.soya.cho))
all.soya.cho <- c("Improved cultivar", "Landrace", "Glycine soja", all.soya.cho)
chrInfo <- read.table("./data/chrInfo.txt", head=T, as.is=T, sep="\t")
#soya.tree <- read.table("./data/soya.tree.txt", head=T, as.is=T, sep="\t", row.names = 1)
mutationtypes <- c("3_prime_UTR_variant", "5_prime_UTR_premature_start_codon_gain_variant", "5_prime_UTR_variant",
"downstream_gene_variant","initiator_codon_variant", "initiator_codon_variant&splice_region_variant",
"intergenic_region", "intragenic_variant", "intron_variant", "missense_variant",
"missense_variant&splice_region_variant", "non_coding_transcript_exon_variant",
"non_coding_transcript_variant", "splice_acceptor_variant&intron_variant",
"splice_donor_variant&intron_variant"," splice_region_variant",
"splice_region_variant&intron_variant", "splice_region_variant&non_coding_transcript_exon_variant",
"splice_region_variant&stop_retained_variant", "splice_region_variant&synonymous_variant",
"start_lost", "start_lost&splice_region_variant", "stop_gained", "stop_gained&splice_region_variant",
"stop_lost","stop_lost&splice_region_variant", "stop_retained_variant", "synonymous_variant", "upstream_gene_variant"
)
mutationtypes82<- c("3_prime_UTR_variant",
"5_prime_UTR_premature_start_codon_gain_variant",
"5_prime_UTR_variant",
"downstream_gene_variant",
"initiator_codon_variant",
"initiator_codon_variant&splice_region_variant",
"intergenic_region",
"intron_variant",
"missense_variant",
"missense_variant&splice_region_variant",
"splice_acceptor_variant&intron_variant",
"splice_acceptor_variant&splice_region_variant&intron_variant",
"splice_donor_variant&intron_variant",
"splice_donor_variant&splice_region_variant&intron_variant",
"splice_region_variant",
"splice_region_variant&intron_variant",
"splice_region_variant&stop_retained_variant",
"splice_region_variant&synonymous_variant",
"start_lost",
"start_lost&splice_region_variant",
"stop_gained",
"stop_gained&splice_region_variant",
"stop_lost",
"stop_lost&splice_region_variant",
"stop_retained_variant",
"synonymous_variant",
"upstream_gene_variant")
chrInfow <- read.table("./data/w82Rdata/chrInfo_82.txt", head=T, as.is=T, sep="\t")
soyaw.info <- read.table("./data/w82Rdata/all.soya_82.txt", head=T, as.is=T, sep="\t", quote="")
all.soya.cho82 <- paste(soyaw.info$ID, soyaw.info$Species, sep=", ")
all.soya.cho82 <- paste0(gsub(",.+", "", all.soya.cho82) , ", ", soyaw.info$Names, ", ", gsub(".+,", "", all.soya.cho82))
all.soya.cho82 <- c("Landraces and elites", "Glycine soja", all.soya.cho82)
#exam1.fa <- readLines("exam1.fa")
Blast_Info_Title <- paste("qseqid: Query sequence ID;",
"qlen: Query sequence length;",
"sseqid: Subject sequence ID;",
"slen: Subject sequence length;",
"length: Alignment length;",
"qstart: Start of alignment in query;",
"qend: End of alignment in query;",
"sstart: Start of alignment in subject;",
"send: End of alignment in subject;",
"gaps: Number of gap openings;",
"pident: Percentage of identical matches;",
"evalue: Expect value;",
"bitscore: Bit score;",
sep = "<br>")
footerTagList <- list(
tags$footer(id = "myFooter",
shiny::includeHTML("www/footer.html"),
)
)
expression_name_description <- read.table("./data/expression_name_description.txt", sep = "\t", header = T)
expression_name_description2 <- read.table("./data/expression_name_description481.txt", sep = "\t", header = T)
expression_name_description3 <- read.table("./data/expression_name_descriptionw05.txt", sep = "\t", header = T)
#expression_name_description3 <- read.table("./data/expression_name_descriptionwilliams83.txt", sep = "\t", header = T)