Skip to content
Snippets Groups Projects
Commit 56cafdb9 authored by Gael's avatar Gael
Browse files

release v10.5.0

parent 7de726b2
No related branches found
No related tags found
No related merge requests found
...@@ -170,7 +170,12 @@ Gitlab developers ...@@ -170,7 +170,12 @@ Gitlab developers
## WHAT'S NEW IN ## WHAT'S NEW IN
### v10.3.0 ### v10.5.0
1) fun_codon_finder() improved
### v10.4.0
1) fun_codon_finder(): start argument replaced by begin 1) fun_codon_finder(): start argument replaced by begin
......
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
######## fun_comp_2d() #### comparison of two 2D datasets (row & col names, dimensions, etc.) 31 ######## fun_comp_2d() #### comparison of two 2D datasets (row & col names, dimensions, etc.) 31
######## fun_comp_list() #### comparison of two lists 40 ######## fun_comp_list() #### comparison of two lists 40
######## fun_test() #### test combinations of argument values of a function and return errors (and graphs) 42 ######## fun_test() #### test combinations of argument values of a function and return errors (and graphs) 42
################ Object modification 59 ################ Object modification 60
######## fun_name_change() #### check a vector of character strings and modify any string if present in another vector 60 ######## fun_name_change() #### check a vector of character strings and modify any string if present in another vector 60
######## fun_df_remod() #### remodeling a data frame to have column name as a qualitative values and vice-versa 61 ######## fun_df_remod() #### remodeling a data frame to have column name as a qualitative values and vice-versa 61
######## fun_round() #### rounding number if decimal present 64 ######## fun_round() #### rounding number if decimal present 64
...@@ -134,34 +134,35 @@ ...@@ -134,34 +134,35 @@
######## fun_permut() #### progressively breaks a vector order 78 ######## fun_permut() #### progressively breaks a vector order 78
######## fun_slide() #### return a computation made on a vector using a sliding window 89 ######## fun_slide() #### return a computation made on a vector using a sliding window 89
######## fun_codon2aa() #### convert codon to amino acid using standard genetic code 98 ######## fun_codon2aa() #### convert codon to amino acid using standard genetic code 98
################ Graphics management 101 ######## fun_codon_finder() #### gives the codon number and position in the codon of nucleotid positions 101
######## fun_width() #### window width depending on classes to plot 101 ################ Graphics management 104
######## fun_open() #### open a GUI or pdf graphic window 102 ######## fun_width() #### window width depending on classes to plot 104
######## fun_prior_plot() #### set graph param before plotting (erase axes for instance) 106 ######## fun_open() #### open a GUI or pdf graphic window 105
######## fun_scale() #### select nice label numbers when setting number of ticks on an axis 111 ######## fun_prior_plot() #### set graph param before plotting (erase axes for instance) 110
######## fun_inter_ticks() #### define coordinates of secondary ticks 116 ######## fun_scale() #### select nice label numbers when setting number of ticks on an axis 114
######## fun_post_plot() #### set graph param after plotting (axes redesign for instance) 120 ######## fun_inter_ticks() #### define coordinates of secondary ticks 119
######## fun_close() #### close specific graphic windows 133 ######## fun_post_plot() #### set graph param after plotting (axes redesign for instance) 123
################ Standard graphics 134 ######## fun_close() #### close specific graphic windows 136
######## fun_empty_graph() #### text to display for empty graphs 134 ################ Standard graphics 137
################ gg graphics 136 ######## fun_empty_graph() #### text to display for empty graphs 137
######## fun_gg_palette() #### ggplot2 default color palette 136 ################ gg graphics 139
######## fun_gg_just() #### ggplot2 justification of the axis labeling, depending on angle 138 ######## fun_gg_palette() #### ggplot2 default color palette 139
######## fun_gg_get_legend() #### get the legend of ggplot objects 142 ######## fun_gg_just() #### ggplot2 justification of the axis labeling, depending on angle 141
######## fun_gg_point_rast() #### ggplot2 raster scatterplot layer 145 ######## fun_gg_get_legend() #### get the legend of ggplot objects 145
######## fun_gg_boxplot() #### ggplot2 boxplot + background dots if required 148 ######## fun_gg_point_rast() #### ggplot2 raster scatterplot layer 148
######## fun_gg_scatter() #### ggplot2 scatterplot + lines (up to 6 overlays totally) 148 ######## fun_gg_boxplot() #### ggplot2 boxplot + background dots if required 151
######## fun_gg_heatmap() #### ggplot2 heatmap + overlaid mask if required 148 ######## fun_gg_scatter() #### ggplot2 scatterplot + lines (up to 6 overlays totally) 151
######## fun_gg_empty_graph() #### text to display for empty graphs 157 ######## fun_gg_heatmap() #### ggplot2 heatmap + overlaid mask if required 151
################ Graphic extraction 159 ######## fun_gg_empty_graph() #### text to display for empty graphs 160
######## fun_trim() #### display values from a quantitative variable and trim according to defined cut-offs 159 ################ Graphic extraction 162
######## fun_segmentation() #### segment a dot cloud on a scatterplot and define the dots from another cloud outside the segmentation 168 ######## fun_trim() #### display values from a quantitative variable and trim according to defined cut-offs 162
################ Import 204 ######## fun_segmentation() #### segment a dot cloud on a scatterplot and define the dots from another cloud outside the segmentation 171
######## fun_pack() #### check if R packages are present and import into the working environment 204 ################ Import 207
######## fun_python_pack() #### check if python packages are present 205 ######## fun_pack() #### check if R packages are present and import into the working environment 207
################ Print / Exporting results (text & tables) 208 ######## fun_python_pack() #### check if python packages are present 208
######## fun_report() #### print string or data object into output file 208 ################ Print / Exporting results (text & tables) 211
######## fun_get_message() #### return error/warning/other messages of an expression (that can be exported) 211 ######## fun_report() #### print string or data object into output file 211
######## fun_get_message() #### return error/warning/other messages of an expression (that can be exported) 214
   
   
################################ FUNCTIONS ################################ ################################ FUNCTIONS ################################
...@@ -4420,9 +4421,6 @@ return(output) ...@@ -4420,9 +4421,6 @@ return(output)
######## fun_codon_finder() #### gives the codon number and position in the codon of nucleotid positions ######## fun_codon_finder() #### gives the codon number and position in the codon of nucleotid positions
   
   
######## fun_codon_finder() #### gives the codon number and position in the codon of nucleotid positions
fun_codon_finder <- function( fun_codon_finder <- function(
pos, pos,
begin, begin,
...@@ -4438,10 +4436,9 @@ end ...@@ -4438,10 +4436,9 @@ end
# begin: single integer indicating the position of the first base of the coding sequence # begin: single integer indicating the position of the first base of the coding sequence
# end: single indicating the position of the last base of the coding sequence # end: single indicating the position of the last base of the coding sequence
# RETURN # RETURN
# a matrix with row names corresponding to the pos argument input, each row being the result of each values of pos argument # a data frame with column names:
# Column names are
# pos: values of the pos argument # pos: values of the pos argument
# codon_nb: the codon number in the CDS encompassing the pos input # codon_nb: the codon number in the CDS encompassing the pos value
# codon_pos: the position of pos in the codon (either 1, 2 or 3) # codon_pos: the position of pos in the codon (either 1, 2 or 3)
# codon_begin: the first base position of the codon # codon_begin: the first base position of the codon
# codon_end: the last base position of the codon # codon_end: the last base position of the codon
...@@ -4549,27 +4546,25 @@ stop(paste0("\n\n================\n\n", tempo.cat, "\n\n================\n\n"), ...@@ -4549,27 +4546,25 @@ stop(paste0("\n\n================\n\n", tempo.cat, "\n\n================\n\n"),
# main code # main code
first <- seq.int(from = begin, to = end, by = 3) first <- seq.int(from = begin, to = end, by = 3)
last <- seq.int(from = begin + 2, to = end, by = 3) last <- seq.int(from = begin + 2, to = end, by = 3)
tempo <- sapply(X = pos, FUN = function(x = X){ tempo <- lapply(X = pos, FUN = function(x = X){
tempo.log <- x >= first & x <= last tempo.log <- x >= first & x <= last
if(sum(tempo.log, na.rm = TRUE) != 1){ # check that 1 possible TRUE if(sum(tempo.log, na.rm = TRUE) != 1){ # check that 1 possible TRUE
tempo.cat <- paste0("ERROR IN ", function.name, ": INTERNAL ERROR. CODE HAS TO BE MODIFIED") tempo.cat <- paste0("ERROR IN ", function.name, ": INTERNAL ERROR. CODE HAS TO BE MODIFIED")
stop(paste0("\n\n================\n\n", tempo.cat, "\n\n================\n\n"), call. = FALSE) # == in stop() to be able to add several messages between == stop(paste0("\n\n================\n\n", tempo.cat, "\n\n================\n\n"), call. = FALSE) # == in stop() to be able to add several messages between ==
}else{ }else{
codon_nb <- which(tempo.log) codon_nb <- which(tempo.log)
codon_pos <- (x - (begin + (codon_nb - 1) * 3) + 1) codon_pos <- as.integer((x - (begin + (codon_nb - 1) * 3) + 1))
codon_begin <- first[tempo.log] codon_begin <- as.integer(first[tempo.log])
codon_end <- last[tempo.log] codon_end <- as.integer(last[tempo.log])
} }
return(list(codon_nb = codon_nb, codon_pos = codon_pos, codon_begin = codon_begin, codon_end = codon_end)) return(data.frame(codon_nb = codon_nb, codon_pos = codon_pos, codon_begin = codon_begin, codon_end = codon_end))
}) })
output <- data.frame(pos = pos, t(tempo)) tempo <- do.call("rbind", tempo)
output <- data.frame(pos = as.integer(pos), tempo)
return(output) return(output)
} }
   
   
################ Graphics management ################ Graphics management
   
   
...@@ -11312,8 +11307,6 @@ return(output) # this plots the graph if return.ggplot is TRUE and if no assignm ...@@ -11312,8 +11307,6 @@ return(output) # this plots the graph if return.ggplot is TRUE and if no assignm
   
   
   
# add density # add density
# rasterise all kind: https://cran.r-project.org/web/packages/ggrastr/vignettes/Raster_geoms.html # rasterise all kind: https://cran.r-project.org/web/packages/ggrastr/vignettes/Raster_geoms.html
# log not good: do not convert as in boxplot # log not good: do not convert as in boxplot
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment