Comments (11)
Thanks for the coding note. I'm still not used to the tidy way, so much appreciated.
from tidybulk.
That worked just fine, excellent :) Nice work.
I would still change the error message to be:
tidybulk says: for DESeq2 the list of constrasts should be given in the form list(c("condition_column","condition1","condition2")) i.e. list(c("genotype","knockout","wildtype")).
rather than
tidybulk says: for DESeq2 the list of constrasts should be given of the form list(c("condition","C","B"))
from tidybulk.
Hello @AMChalkie . We though we fixed it. Indeed the workshop material shows expected results.
Could you please execute the section
and tell us if you still see the opposite results. In this way we can understand where the issue lies.
[EDIT]
I see, you are defining contrasts. Sorry this is bad bug! I will take care of it ASAP, also adding those tests.
from tidybulk.
Some notes on coding.
You don't necessarily need to replicate code. This would suffice:
counts_de.voom <-
tt.aggr %>%
identify_abundant(factor_of_interest = genotype) %>%
test_differential_abundance(
.formula = ~ 0 + genotype, # + cell,
.contrasts = c("genotypeKI - genotypeWT"),
method = "limma_voom", # edgeR_quasi_likelihood", # Alternative method. "limma_voom",
omit_contrast_in_colnames = TRUE,
prefix= "limma_voom."
) %>%
test_differential_abundance(
.formula = ~ 0 + genotype, # + cell,
. contrasts = c("genotypeKI - genotypeWT"),
method = "edgeR_quasi_likelihood", # Alternative method. "limma_voom",
omit_contrast_in_colnames = TRUE,
prefix= "edgeR_quasi_likelihood."
) %>%
test_differential_abundance(
.formula = ~ 0 + genotype, # + cell,
. contrasts = c("genotypeKI - genotypeWT"),
method = "DESeq2", # Alternative method. "limma_voom",
omit_contrast_in_colnames = TRUE,
prefix= "DESeq2."
)
from tidybulk.
Hello @AMChalkie I have created a pull request. Could you please check that the respective branch leads to expected results on your side?
That would be much appreciated.
from tidybulk.
Not yet:
tidybulk says: All methods use raw counts,
irrespective of if scale_abundance or adjust_abundance have been calculated,
therefore it is essential to add covariates such as batch effects (if applicable) in the formula.
Error in get_differential_transcript_abundance_deseq2(., .formula, .sample = !!.sample, :
tidybulk says: for the moment, the .contrasts argument for
DESeq2 gets directly passed to DESeq2 method.
Contrasts must be a list that contains contrasts of
the form c("condition","C","B")
Called from: get_differential_transcript_abundance_deseq2(., .formula, .sample = !!.sample,
.transcript = !!.transcript, .abundance = !!.abundance, .contrasts = .contrasts,
method = method, scaling_method = scaling_method, omit_contrast_in_colnames = omit_contrast_in_colnames,
prefix = prefix)
from tidybulk.
Maybe I should improve this message
for the moment, the .contrasts argument for
DESeq2 gets directly passed to DESeq2 method.
Contrasts must be a list that contains contrasts of
the form c("condition","C","B")
Is not self-explanatory? Feel also free to edit it directly in the repo if you can think about something clearer for users.
from tidybulk.
For documentation:
for the moment, the .contrasts argument for
DESeq2 gets directly passed to DESeq2 method.
Contrasts must be a list that contains contrasts of
the form c("factorName","numeratorLevel","denominatorLevel")
I would have expected that this would work, but no...:
tt.aggr %>% identify_abundant(factor_of_interest = genotype) %>%
test_differential_abundance(
.formula = ~ 0 + genotype,
.contrasts = c('genotype','KI','WT'),
method = "DESeq2",
omit_contrast_in_colnames = TRUE,
prefix= "DESeq2."
)
tidybulk says: All methods use raw counts,
irrespective of if scale_abundance or adjust_abundance have been calculated,
therefore it is essential to add covariates such as batch effects (if applicable) in the formula.
estimating size factors
estimating dispersions
gene-wise dispersion estimates
mean-dispersion relationship
final dispersion estimates
fitting model and testing
Error in checkContrast(contrast, resNames) :
'contrast', as a character vector of length 3, should have the form:
contrast = c('factorName','numeratorLevel','denominatorLevel'),
see the manual page of ?results for more information
In addition: Warning message:
In get_differential_transcript_abundance_deseq2(., .formula, .sample = !!.sample, :
tidybulk says: you can omit contrasts in column names only when maximum one contrast is present
Called from: checkContrast(contrast, resNames)
Also, this is after removing the check for equals("list") as it failed here otherwise.
.contrasts %>% is.null %>% not() &
.contrasts %>% class %>% equals("list") #%>% not()
from tidybulk.
"a list that contains contrasts"
list(c('genotype','KI','WT'))
As you can specify many contrast combinations (similarly to edgeR)
Maybe I should be more explicit
from tidybulk.
I see the other problem. Tomorrow I fix everything
from tidybulk.
Hello @AMChalkie could you please reinstall this branch and try again? I have improve error messages. Let's see if it guides you better.
from tidybulk.
Related Issues (20)
- Normalization method (scaling) HOT 9
- for SE save internals within the metadata rather than attributes.
- github action mac fail HOT 1
- DEG Analysis Between Single Group with Multiple Groups HOT 6
- "Proportion of variance explained" values on reduce_dimensions() output HOT 1
- github actions give preflight error for the whole tidy stack HOT 1
- ERROR; return code from pthread_create() is 22 HOT 3
- pathway analysis using tidybulk HOT 8
- Design and contrasts for tidybulk test differential abundance function HOT 9
- Remove batch effect in test_differential_abundance
- Warning in CHECK, mistery
- test
- Improve the documentation for `tidybulk` HOT 29
- turn pseudobulk from scRNAseq with logCPM value back to a seurat object with counts value? HOT 2
- `tidybulk` Remove hard dependency for `DESeq2` HOT 12
- in `test_gene_rank` check if any feature is NA, because pivot_feature will fail
- the attribute "internals" $ tt_columns abundance_scaled, carries the environment with it inflating the RDS file size
- Prepare for upcoming Seurat v5 release
- Add the method to simplify complete confounders is they are not factor of interest
- limma:MakeContrasts integration issues HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tidybulk.