shenlab-sinai / ngsplot

Quick mining and visualization of NGS data by integrating genomic databases
Other
252 stars 65 forks source link

length of 'dimnames' [1] not equal to array extent #87

Open yeswzc opened 5 years ago

yeswzc commented 5 years ago

Hi, I was using ngs.plot.r with this command:

ngs.plot.r -G hg19 -R tss -C my.bam -O test

But I got an error:

Using database: /***:)***/database/hg19/hg19.ensembl.genebody.protein_coding.RData
Done
Loading R li
Done
Loading R libraries.....Done
Analyze bam files and calculate coverage..................................Done
N1  20242
N2 698
Error in dimnames(x) <- dn :
  length of 'dimnames' [1] not equal to array extent
Calls: rownames<- -> rownames<-
Execution halted

I believe the error is at this line:

rownames(enrichList[[i]]) <- paste(coord.list[[reg]]$gname,
                                       coord.list[[reg]]$tid, sep=':')

It may because of my low coverage bam data. But I am not sure how to handle it, could you help me to figure this out?

Thank you very much!