We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I get an error while running:
> cn_barplot_grnSing(cnRes,cnProc,"fibroblast", c("fibroblast","kidney"), bOrder, sidCol="sra_id", dlevel="description1") Error in data.frame(sample_id = sample_ids, description = descriptions, : arguments imply differing number of rows: 0, 1
The error occurs when cnRes contains only one row.
It looks like the fix should be applied to cn_extract_SN_DF function:
cn_extract_SN_DF<-function (scores, sampTab, dLevel, rnames=NULL, sidCol="sample_id" ){ if(is.null(rnames)){ rnames<-rownames(scores); #cat("GOT NULL\n"); } tss<-scores[rnames,]; if(length(rnames)==1){ tss<-t(as.matrix(scores[rnames,])); rownames(tss)<-rnames; # cat(dim(tss),"\n") } colnames(tss) <- colnames(scores); # <---- the bug fix nSamples<-ncol(tss); stTmp<-sampTab[colnames(tss),]; #### snNames<-rownames(tss); num_subnets<-length(snNames); snNames<-unlist(lapply(snNames, rep, times=nSamples)); sample_ids<-rep(as.vector(stTmp[,sidCol]), num_subnets); descriptions<-rep(as.vector(stTmp[,dLevel]), num_subnets); # myCtts<-rep(ctt, length(snNames)); scores<-as.vector(t(tss)); data.frame(sample_id=sample_ids, description=descriptions, # ctt=myCtts, subNet = snNames, score=scores); ### data.frame }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I get an error while running:
The error occurs when cnRes contains only one row.
It looks like the fix should be applied to cn_extract_SN_DF function:
The text was updated successfully, but these errors were encountered: