Browse Source

Corregir el error con una sola secuencia.

main
marcelcosta 1 week ago
parent
commit
9b48188ac2
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      ONATRY-CIT/app.R

+ 7
- 7
ONATRY-CIT/app.R

@ -75,7 +75,7 @@ server <- function(input, output) {
colnames(df)<-c(var.column, val.column)
return(df)
}
Query_CU<-t(codonCounts(Query)) %>%
as.data.frame() %>%
setNames(names(txtQuery)) %>%
@ -85,7 +85,7 @@ server <- function(input, output) {
group_by(AA) %>%
mutate(across(all_of(names(txtQuery)), function(x) x=x/sum(x))) %>%
ungroup()
pca_ref<-read.table("../Scripts/pca_HAdV5_EGFP_MONO_EMM_BH_VCN_APIS_MOD_PDT_ADAPT_Tox.txt",sep="\t", dec = ",", header = T)
pca_ref$codon<-gsub(" ","",pca_ref$codon)
pca_tab<-merge(pca_ref,
@ -125,9 +125,9 @@ server <- function(input, output) {
) %>%
group_by(AA) %>%
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_codons<-lapply(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]]),
@ -136,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
@ -157,7 +157,7 @@ server <- function(input, output) {
ggtitle("CAI along sequence")+
theme_gray(base_size = 15)
AApos3<-sapply(txtQuery, function(x) strsplit(x, "")[[1]][seq(3, nchar(x), 3)])
AApos3<-lapply(txtQuery, function(x) strsplit(x, "")[[1]][seq(3, nchar(x), 3)])
GC3<-sapply(AApos3, function(x) 100*length(x[x %in% c("G","C")])/length(x))

Loading…
Cancel
Save