Coder Social home page Coder Social logo

Comments (5)

mcanouil avatar mcanouil commented on August 16, 2024 1

Hi,

I described how to export the counts matrix within the vignette focusing on analysis.
https://mcanouil.github.io/NACHO/articles/NACHO-analysis.html

expr_counts <- GSE70970[["nacho"]] %>% 
  filter(grepl("Endogenous", CodeClass)) %>% 
  select(IDFILE, Name, Count_Norm) %>% 
  pivot_wider(names_from = "Name", values_from = "Count_Norm") %>% # "Name" can be replaced with "Accession"
  column_to_rownames("IDFILE") %>% 
  t()

The code above could end up in a function like the following one (quick draft).

library(NACHO)
get_counts <- function(
  nacho, 
  codeclass = "Endogenous", 
  rownames = "IDFILE", 
  colnames = c("Name", "Accession")
) {
  nacho[["nacho"]] %>% 
    dplyr::filter(grepl(codeclass, .data[["CodeClass"]])) %>% 
    dplyr::select(c("IDFILE", "Name", "Count_Norm")) %>% 
    tidyr::pivot_wider(names_from = colnames[1], values_from = "Count_Norm") %>%
    tibble::column_to_rownames(rownames) %>% 
    t()
}
get_counts(GSE74821)

from nacho.

mcanouil avatar mcanouil commented on August 16, 2024 1

I'll think more about adding a function to ease the exportation and in that case, I'll probably add some download button using that function.

The function defined above, does not exclude bad samples nor bad "genes".
Extra filters should be applied based on quality columns (or just is_outlier column), this is why I did not implement such function, because it will have a lot of parameters for QC depending on dataset.

from nacho.

apeltzer avatar apeltzer commented on August 16, 2024

Ok, didn't see / find this intuitively - this looks great, thank you!

from nacho.

apeltzer avatar apeltzer commented on August 16, 2024

Could be potentially cool to have some exporting functionality in the Shiny Applicaiton but from the commandline this is more than I expected and I'm absolutely happy with this 👍

from nacho.

apeltzer avatar apeltzer commented on August 16, 2024

Thats a valid and good concern. Thank you for the insights / comments. I do think there would be a benefit to allow this export, but also see the concerns here!

from nacho.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.