Hi All,I have 11 human RNA-seq data (control/treatment),The effect of various
drugs on various cancers,I want to calculate the genes-lncRna correlations for
all tumors considered together for network,I did?differential expression
analysis and?prepared?normalized values (rpkm)?of coding and lncoding in two
separate file and import them to R, then transpose them and now I want to
calculate corr by this function:
control.corr=cor(cod[grep(".C",cod$name),-1],lnc[grep(".C",lnc$name),-1],method
= "spearman")
if I understand true,I should write?the numbers of columns whose related to
control,then I counted all of control`s column and?wrote 23 .now my question
is,how does R understand?what column is control and what is treatment?
[[alternative HTML version deleted]]
If I understand this correctly you are choosing all the rows from each of cod and lnc which contain .c (ie any character followed by a C) and deleting the first column from each of cod and lnc. You then correlate them so that you get the correlation between corresponding columns of each. Since you do not tell us how you know which column is which it is hard to answer the question of how R will know. On 07/12/2016 11:26, Elham - via R-help wrote:> Hi All,I have 11 human RNA-seq data (control/treatment),The effect of various drugs on various cancers,I want to calculate the genes-lncRna correlations for all tumors considered together for network,I did differential expression analysis and prepared normalized values (rpkm) of coding and lncoding in two separate file and import them to R, then transpose them and now I want to calculate corr by this function: > control.corr=cor(cod[grep(".C",cod$name),-1],lnc[grep(".C",lnc$name),-1],method = "spearman") > > if I understand true,I should write the numbers of columns whose related to control,then I counted all of control`s column and wrote 23 .now my question is,how does R understand what column is control and what is treatment? > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Michael http://www.dewey.myzen.co.uk/home.html
hello Michael,I specified each column like this screenshot:(A.C1 means
experiment A and first control,A.T3 means experiment A and third treatment ....
?) I have two transposed file,one for coding and one for lncoding.
On Wednesday, December 7, 2016 6:11 PM, Michael Dewey <lists at
dewey.myzen.co.uk> wrote:
If I understand this correctly you are choosing all the rows from each
of cod and lnc which contain .c (ie any character followed by a C) and
deleting the first column from each of cod and lnc. You then correlate
them so that you get the correlation between corresponding columns of
each. Since you do not tell us how you know which column is which it is
hard to answer the question of how R will know.
On 07/12/2016 11:26, Elham - via R-help wrote:> Hi All,I have 11 human RNA-seq data (control/treatment),The effect of
various drugs on various cancers,I want to calculate the genes-lncRna
correlations for all tumors considered together for network,I did differential
expression analysis and prepared normalized values (rpkm) of coding and lncoding
in two separate file and import them to R, then transpose them and now I want to
calculate corr by this function:
>
control.corr=cor(cod[grep(".C",cod$name),-1],lnc[grep(".C",lnc$name),-1],method
= "spearman")
>
> if I understand true,I should write the numbers of columns whose related to
control,then I counted all of control`s column and wrote 23 .now my question
is,how does R understand what column is control and what is treatment?
>
>
> ??? [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Michael
http://www.dewey.myzen.co.uk/home.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: blob.jpg
Type: image/png
Size: 25172 bytes
Desc: not available
URL:
<https://stat.ethz.ch/pipermail/r-help/attachments/20161207/1e55c772/attachment.png>