Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
valflanza committed Jan 28, 2021
1 parent 7e6de91 commit 0a73f93
Show file tree
Hide file tree
Showing 4 changed files with 607 additions and 1,984 deletions.
4 changes: 2 additions & 2 deletions R/accnet_enrichment_analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ accnet_enrichment_analysis <- function(data,cluster, padj_method = "BY")
) %>%
distinct() %>%
mutate(
OdsRatio = perClusterFreq / perTotalFreq ,
OddsRatio = perClusterFreq / perTotalFreq ,
pvalue = phyper(
ClusterFreq,
TotalFreq,
Expand All @@ -125,7 +125,7 @@ accnet_enrichment_analysis <- function(data,cluster, padj_method = "BY")
ClusterGenomeSize,
perTotalFreq,
TotalFreq,
OdsRatio,
OddsRatio,
pvalue,
padj,
AccnetGenomeSize,
Expand Down
5 changes: 4 additions & 1 deletion R/dn_ds.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ dn_ds <- function(mmseq,accnet,min_size =5 ,n_cores,mode = "fast")

name = system(paste0("head -1 ",f,"/",sizes$Family[i]), intern = T)
system(paste0("sed -i '$ d' ",f,"/",sizes$Family[i])) ##Remove last line
system(paste("head -2 ",f,"/",sizes$Family[i]," > ",f,"/",sizes$Family[i],".ref.fasta",sep = "",collapse = ""))
system(paste("head -2 ",f,"/",sizes$Family[i]," > ",f,"/",sizes$Family[i],".ref.fasta",sep = "",collapse = "")) #### El problema esta por aqui.
l = system(paste("head -2 ",f,"/",sizes$Family[i],"| tail -1 |wc -m ",sep = "",collapse = ""), intern =T)
system(paste("grep '>' ",f,"/",sizes$Family[i]," > ",f,"/headers_",sizes$Family[i],sep = "",collapse = ""))
l = as.numeric(l)*10
Expand Down Expand Up @@ -186,6 +186,9 @@ dn_ds <- function(mmseq,accnet,min_size =5 ,n_cores,mode = "fast")
}
}
}
else{
stop(paste0("Error. Unrecognise mode: ",mode))
}
results <- bind_rows(results,dnds_ratios)
setwd(mmseq$path)

Expand Down
Loading

0 comments on commit 0a73f93

Please sign in to comment.