Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run DESeq2 with 3 treatments? #152

Open
matthewabirk opened this issue Jun 12, 2019 · 3 comments
Open

How to run DESeq2 with 3 treatments? #152

matthewabirk opened this issue Jun 12, 2019 · 3 comments

Comments

@matthewabirk
Copy link

matthewabirk commented Jun 12, 2019

I can't figure out how to configure my yaml to allow DESeq2 to test 3 treatments.

When I try

deseq2:
  contrasts:
    salinity:
    - 250mM
    - 2M
    - 4M
  gene_trans_map: true
  pca:
    labels:
    - condition

Then, I get an error in /automounts/workspace/workspace/mbirk/artemia/artemia_out_all/logs/deseq2/artemia_input.csalinity.deseq2.log:

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
Calls: results -> checkContrast
Execution halted

I also tried:

deseq2:
  contrasts:
    250mM-v-2M:
    - 250mM
    - 2M
    2M-v-4M:
    - 2M
    - 4M
    250mM-v-4M:
    - 250mM
    - 4M
  gene_trans_map: true
  pca:
    labels:
    - condition

But then the only output is the last set of contrasts. What's the proper way to format the yaml for this?

@bluegenes
Copy link
Member

bluegenes commented Jun 17, 2019

Hi @matthewabirk:

I have not yet enabled more complex designs within elvers. I'd recommend you grab the .deseq2.rds (R data) file from the deseq2 output directory, and work with deseq2 directly in R.

You can see elvers/elvers/rules/deseq2/deseq2-init-tx2gene.R or elvers/elvers/rules/deseq2/deseq2-init-txOut.R for how this dataset is being generated from the salmon counts.

https://support.bioconductor.org/p/102445/ might also be helpful.

@matthewabirk
Copy link
Author

Thanks! Just a note: the last two lines of deseq2.R are currently:

write.table(as.data.frame(res), file=snakemake@output[["table"]])
write.table(as.data.frame(res), file=snakemake@output[["sigTable"]])

Shouldn't the 2nd line be?

write.table(as.data.frame(sigRes), file=snakemake@output[["sigTable"]])

@bluegenes
Copy link
Member

fixed - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants