Thanks!

Just one last thing. I just did results(dds, contrast = c("condition",
"NR", "DT")) and the number of most significant genes is the same as before
(e.g. NRvsDT = DTvsNR) so I am assuming that the only thing that I am doing
by specifying contrast is changing the polarity (what was -log2FC now is
positive, and the opposite). But my list of genes is exactly the same. Am I
understanding this correctly? So let's say that I have NR vs DT, whatever
is log2FC is up-regulated in NR or what is the same, down-regulated in DT;
and whatever is -log2FC is down-regulated in NR but up-regulated in DT,
right?

Thanks again for your patience and time.
Alicia



--
Alicia R. Pérez-Porro
PhD candidate

Giribet lab
Department of Organismic and Evolutionary Biology
MCZ labs
Harvard University
26 Oxford St, Cambridge MA 02138
phone: +1 617-496-5308
fax: +1 617-495-5667
www.oeb.harvard.edu/faculty/giribet/

Department of Marine Ecology
Center for Advanced Studies of Blanes (CEAB-CSIC)
C/Accés Cala St. Francesc 14
17300 Blanes, Girona, SPAIN
phone: +34 972 336 101
fax: +34 972 337 806
www.ceab.csic.es


On Mon, May 26, 2014 at 12:09 PM, Michael Love
<michaelisaiahlove@gmail.com>wrote:

> hi Alicia,
>
> On Mon, May 26, 2014 at 12:04 PM, Alicia R. Pérez-Porro
> <alicia.r.perezporro@gmail.com> wrote:
> > Hi,
> >
> > I am trying to do:
> >
> >> res <- results( dds, contrast = list( "condition", "NR", "DT" ) )
> >
>
> Just change list() to c() in the above:
>
> results(dds, contrast = c("condition", "NR", "DT"))
>
> > Error in results(dds, contrast = list("condition", "NR", "DT")) :
> >   'contrast', as a list, should have length 2,
> > see the manual page of ?results for more information
> >
> > And it's giving me an error :(
> >
> >
> >
> > --
> > Alicia R. Pérez-Porro
> > PhD candidate
> >
> > Giribet lab
> > Department of Organismic and Evolutionary Biology
> > MCZ labs
> > Harvard University
> > 26 Oxford St, Cambridge MA 02138
> > phone: +1 617-496-5308
> > fax: +1 617-495-5667
> > www.oeb.harvard.edu/faculty/giribet/
> >
> > Department of Marine Ecology
> > Center for Advanced Studies of Blanes (CEAB-CSIC)
> > C/Accés Cala St. Francesc 14
> > 17300 Blanes, Girona, SPAIN
> > phone: +34 972 336 101
> > fax: +34 972 337 806
> > www.ceab.csic.es
> >
> >
> > On Mon, May 26, 2014 at 11:42 AM, Simon Anders <anders@embl.de> wrote:
> >
> >> Hi Alicia
> >>
> >> On 26/05/14 17:20, Alicia R. Pérez-Porro wrote:
> >>
> >>>  1. MostSigGenes.txt, DownRegulated.txt and UpRegulated.txt always have
> >>>
> >>>     the same number of genes. This is confusing for me.
> >>>
> >>
> >> This is because in all three cases, it is the same table. You only
> change
> >> the ordering of rows.
> >>
> >> Here, you take the table with all genes ("res") and reduce it to only
> >> those rows with padj < 0.1:
> >>
> >>
> >> > resSig <- res[ which(res$padj < .1), ]
> >>
> >> and in your "write.table" commands, you always write out this table, but
> >> you re-order the rows. (The "order" function gives the order of rows to
> get
> >> them sorted according to what you specify)
> >>
> >>   2. I understand then that maybe is better to only generate
> >>>
> >>>     MostSigGenes.txt and then divide the result in 2 txt files: one
> with
> >>>     positive log2FC = upregulated and the other with negative log2FC =
> >>>     downregulated, right?
> >>>
> >>
> >> Probably, yes.
> >>
> >> Depends, though, on what you want to do with the text files afterwards.
> If
> >> you want to look at them in Excel and this is the tool you feel most
> >> comfortable with, you could also simply write out the "resSig" table as
> is,
> >> with
> >>   write.table( resSig, file="allSig.txt" )
> >> or even the whole result table ('res' isntead of 'resSig') and do all
> your
> >> filtering and sorting in Excel.
> >>
> >>
> >>   3. I don't understand with if I am entering the conditions like
> >>>
> >>>     "condition = factor(c("SP", "SP", "EB", "EB")))" then is comparing
> >>>     EB vs. SP. I would have thought the opposite.
> >>>
> >>
> >> R has the habit of sorting the names of the factor level by alphabet if
> >> you don't explicitly tell it the order you want. And then, DESeq2
> compares
> >> by default the alphabetically last versus the first.
> >>
> >> If you want something else, just tell it what you want:
> >>
> >>   res <- results( dds, contrast = list( "condition", "EP", "SP" ) )
> >>
> >> to compare SP versus EP.
> >>
> >>   Simon
> >>
> >
> >         [[alternative HTML version deleted]]
> >
> >
> > _______________________________________________
> > Bioconductor mailing list
> > Bioconductor@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/bioconductor
> > Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

