snakemake-workflows / rna-seq-kallisto-sleuth

A Snakemake workflow for differential expression analysis of RNA-seq data with Kallisto and Sleuth.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can base_level be multiple if has many groups?

whiteorchid opened this issue · comments

Dear. author,

Thanks a lot for the great tools!

May I know if it's possible to designate the base_level to multiple values or only one? If have multiple groups/comparisons, need to run separately (separate the units file and the sample file)?

Thank you very much!

diffexp:
  # samples to exclude (e.g. outliers due to technical problems)
  exclude:
  # model for sleuth differential expression analysis
  models:
    model_X:
      full: ~condition + batch
      reduced: ~batch
      # Binary valued covariate that shall be used for fold change/effect size
      # based downstream analyses.
      primary_variable: condition
      # base level of the primary variable (will be considered as denominator
      # in the fold change/effect size estimation).
      **base_level**: untreated
  # significance level to use for volcano, ma- and qq-plots

The base_level: is only meant for calculating fold changes in expression. And this usually only makes sense against some control condition, like a set of untreated samples in the example. Thus, you can only have one base_level per model that you compare against. You could hack around this, by specifying the same model twice, only differing in the base_level that you specify. But you then have to double-check that your comparisons both make sense.

I hope that helps?

That said, maybe you want to do something else, e.g. do multiple group comparisons. For that, you can have any number of levels in the primary_variable: column (condition in the example). So you could for example have values genotype_X, genotype_Y, and genotype_Z in the respective column of your samples.tsv.

And if you want to understand more details about the differential expression testing, you could check out the sleuth documentation:
https://pachterlab.github.io/sleuth/walkthroughs

Thanks a lot! Much appreciate! Best!