[R] Error in running diffcoexp

PIKAL Petr petr@p|k@| @end|ng |rom prechez@@cz
Thu Sep 3 14:54:36 CEST 2020


Hi.

See inline

> -----Original Message-----
> From: R-help <r-help-bounces using r-project.org> On Behalf Of Dr Priyanka Jain
> Sent: Wednesday, September 2, 2020 1:12 PM
> To: r-help using r-project.org
> 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
> ______________________________________________
> R-help using 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.


More information about the R-help mailing list