Closed dqq0404 closed 5 months ago
Error in data.frame(..., check.names = FALSE) : arguments imply differing number of rows: 1, 0 Calls: cbind -> cbind -> data.frame Execution halted
Hi, I solved this problem by using a loop to analyze trait1 with other traits.
Hi, I got a error about: "Error: Invalid target phenotype specified: 'trait1'" The log is: "Warning: Negative variance estimate for phenotype(s) 'trait3' in locus...; Dropping these as they cannot be analysed" "Warning: Negative variance estimate for phenotype(s) 'trait2' in locus...; Dropping these as they cannot be analysed" "Warning: Negative variance estimate for phenotype(s) 'trait1' in locus...; Dropping these as they cannot be analysed" "Error: Invalid target phenotype specified: 'trait1'"
The script is:
library(LAVA)
input = process.input(input.info.file = input_info_file,sample.overlap.file = sample_overlap_file,ref.prefix = ".../EUR",phenos = c("trait1","trait2","trait3")) loci = read.loci(".../GRCh37_hg19.locfile") n.loc = nrow(loci)
Set univariate pvalue threshold
univ.p.thresh = 1e-4
Analyse
print(paste("Starting LAVA analysis for",n.loc,"loci")) progress = ceiling(quantile(1:n.loc, seq(.05,1,.05))) # (if you want to print the progress)
u=b=list() for (i in 1:n.loc) { if (i %in% progress) print(paste("..",names(progress[which(progress==i)]))) # (printing progress) locus = process.locus(loci[i,], input) # process locus
}
save the output
write.table(do.call(rbind,u), paste0(out.fname,".univ.lava"), row.names=F,quote=F,col.names=T) write.table(do.call(rbind,b), paste0(out.fname,".bivar.lava"), row.names=F,quote=F,col.names=T)
print(paste0("Done! Analysis output written to ",out.fname,".*.lava"))
I use the target parameter and this error happened to me. How to fix it?