Entering edit mode
2.2 years ago
Megan Noonan
▴
10
My design matrix is below:
sampleID condition
1 c70 ScrVeh
2 c71 ScrVeh
3 c72 ScrVeh
4 c73 ScrIns
5 c74 ScrIns
6 c75 ScrIns
However, after I make my switchAnalyzeRlist and do aSwitchList$conditions, my conditions are reversed:
condition nrReplicates
1 ScrIns 3
2 ScrVeh 3
I need the first condition to be ScrVeh and the second condition to be ScrIns, how do I reverse this? It is the same for my plots, which show ScrIns vs ScrVeh, where I want ScrVeh vs ScrIns. I've tried adding conditions to the argument but it didn't switch them:
switchPlot(aSwitchList,
gene = 'TGIF1',
condition1 = 'ScrVeh',
condition2 = 'ScrIns')
Here is how I made my switchAnalyzeRlist:
aSwitchList <- importRdata(isoformCountMatrix = salmonQuant$counts,
isoformRepExpression = salmonQuant$abundance,
designMatrix = myDesign,
isoformExonAnnoation = "gencode.v34.annotation.gtf.gz",
isoformNtFasta = fasta,
fixStringTieAnnotationProblem = TRUE,
showProgress = FALSE)
Untested, but can you change
aSwitchList$conditions
to factor and set the levels to what you want?Thank you for this suggestion, I tried it and got this (below), which I don't think will work for my downstream analysis