Error in running diffcoexp

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Error in running diffcoexp

Dr Priyanka Jain
Dear Sir/ Madam,
                             I am getting the following error:


geneExp <- read.table("DV_control_FPKM.txt",header=T, sep="\t",row.names=1)
geneExp=as.matrix(as.data.frame(geneExp))
head(geneExp)
geneExp2 <- read.table("DV_introgressed_line_FPKM.txt",header=T,
sep="\t",row.names=1)
geneExp2=as.matrix(as.data.frame(geneExp))
head(geneExp2)
library(diffcoexp)
allowWGCNAThreads()
res=diffcoexp(exprs.1 = geneExp, exprs.2 = geneExp2, r.method = "spearman" )
Error in exprs.1[rownames(exprs.1) != "", ] :
  incorrect number of dimensions

I have attached my input file along with mail
--
With Regards,
*Dr Priyanka Jain (PhD)*,
Mobile : 9718854136





--
With Regards,
*Dr Priyanka Jain (PhD)*,
Mobile : 9718854136
______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Error in running diffcoexp

PIKAL Petr
Hi.

See inline

> -----Original Message-----
> From: R-help <[hidden email]> On Behalf Of Dr Priyanka Jain
> Sent: Wednesday, September 2, 2020 1:12 PM
> To: [hidden email]
> Subject: [R] Error in running diffcoexp
>
> Dear Sir/ Madam,
>                              I am getting the following error:
>
>
> geneExp <- read.table("DV_control_FPKM.txt",header=T,
already data frame

> sep="\t",row.names=1)
> geneExp=as.matrix(as.data.frame(geneExp))

so as.data.frame unnecessary

> head(geneExp)

better str(geneExp) to see actual structure

> geneExp2 <- read.table("DV_introgressed_line_FPKM.txt",header=T,
> sep="\t",row.names=1)
> geneExp2=as.matrix(as.data.frame(geneExp))
> head(geneExp2)
> library(diffcoexp)
> allowWGCNAThreads()
> res=diffcoexp(exprs.1 = geneExp, exprs.2 = geneExp2, r.method = "spearman"
)
> Error in exprs.1[rownames(exprs.1) != "", ] :
>   incorrect number of dimensions

My guess is that during fiddling with as.data.frame and matrix your data are
not complient with the function
From help page
"a SummarizedExperiment, data frame or matrix for condition 1, with gene IDs
as rownames and sample IDs as column names"

>
> I have attached my input file along with mail

No (or almost no) attachments allowed. Better using dput for sharing data.

Cheers
Petr

> --
> With Regards,
> *Dr Priyanka Jain (PhD)*,
> Mobile : 9718854136
>
>
>
>
>
> --
> With Regards,
> *Dr Priyanka Jain (PhD)*,
> Mobile : 9718854136
> ______________________________________________
> [hidden email] 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.

______________________________________________
[hidden email] 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.