Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • de48f4b
  • /
  • ggstrip_groups.r
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge
swh:1:cnt:4477e0c54acbc87090d2581faf77d1f826d24dfb
directory badge
swh:1:dir:de48f4b3b44890b63710117d534c1001e76424e9

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
ggstrip_groups.r
### Author: Yannick Lippi and adapted to shiny by Franck Soubès
### Bioinformatics Master Degree - University of Bordeaux, France
### Link: https://github.com/GeT-TRiX/MA_Trix_App/
### Where: GET-TRiX's facility
### Application: MATRiX is a shiny application for Mining and functional Analysis of TRanscriptomics data
### Licence: GPL-3.0



#' ggstrip_groups which aims is to return a strip plot of the expression for a selected gene for each groups.
#'
#' @param grps A character vector sorted by group of each sample
#' @param wSet A dataframe of the normalised expression
#' @param probesID A vector of the expression of a selected row from the outputted table
#'
#' @return a ggplot object
#'
#' @export
#'


ggstrip_groups <- function(grps , wSet, probesID) {


    nindiv <- table(grps)
    nindiv <- nindiv[nindiv!=0]
    if(all(nindiv==nindiv[1])){
      nindiv <- as.character(nindiv[1]);
    } else nindiv <- paste(nindiv,collapse=", ")

    datai <- cbind.data.frame(Group=grps, expression=as.numeric(wSet[probesID,-(1:2)]), row.names = NULL)
    geneName <- wSet[probesID,"GeneName"]
    footnote <- paste("Error bar: mean +/- SEM; n=",nindiv,sep="")
    ggstrip <-  ggplot(datai, aes(x=Group, y = expression)) +
      theme_classic() +
      geom_jitter( position=position_jitter(0.15), size=3) +
      stat_summary(fun.data = mean_se, geom="errorbar", colour="darkred", size=1,aes(width=0.2)) +
      labs( y=paste(geneName,"Log2 expression level"), caption=footnote)+
      theme(plot.caption=element_text(size=12, hjust = 0.5), axis.title.x=element_text(size=16), axis.title.y=element_text(size=16) ,
            legend.title = element_text(size=12),
            axis.text.x=element_text(size=14, colour="#888888", angle=45, hjust=1),axis.text.y=element_text(size=12, colour="#888888")
      )

    plot(ggstrip)
    return(ggstrip)
}

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API