| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -23,6 +23,7 @@ server <- function(input, output) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					   | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    process<-eventReactive(input$submit, { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      fa=input$query | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      fasplit<-strsplit(gsub("^>","",fa), ">")[[1]] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      txtQuery<-c() | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -34,7 +35,7 @@ server <- function(input, output) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      names(txtQuery)<-names | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      txtQuery<-gsub("\n","",txtQuery) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      txtQuery<-toupper(gsub("\n","",txtQuery)) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      dnaQuery<-DNAStringSet(txtQuery) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      Query<-codonTable(dnaQuery) | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -126,6 +127,7 @@ server <- function(input, output) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        mutate(Weight=Usage/max(Usage)) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      Query_codons<-sapply(txtQuery, function(x) substring(x,seq(1,(nchar(x)-2),3), seq(3,nchar(x),3))) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      Query_CAI<-do.call(rbind, lapply(names(Query_codons), function(x){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        merge( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          data.frame(Position=1:length(Query_codons[[x]]), | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -134,7 +136,7 @@ server <- function(input, output) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          w[,c("Codon","AA","Weight")] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ) %>% arrange(Position) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      })) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      Query_CAI[Query_CAI$AA %in% c("Met","End","Trp"),"Weight"]<-0 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      #CAI | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
 |