stjude / ROSE

ROSE: RANK ORDERING OF SUPER-ENHANCERS
Other
39 stars 12 forks source link

IndexError: list index out of range when using ROSE_geneMapper.py #13

Closed myliu221 closed 1 year ago

myliu221 commented 2 years ago

Hi,

I am currently working on SE analysis for a set of samples. For all samples, the analysis went well in the ROSE_callSuper step. However, in the ROSE_geneMapper step, I got _SuperStitched_GENE_TO_REGION.txt, _SuperStitched_REGION_TO_GENE.txt, _AllStitched_GENE_TO_REGION.txt and _AllStitched_REGION_TO_GENE.txt outputs for fewer samples. I got only _SuperStitched_GENE_TO_REGION.txt and _SuperStitched_REGION_TO_GENE.txt outputs for most samples, while I got no outputs for some samples with index error. The errors are shown as follows, Warning message: In write.table(file = outputFile, superEnhancer, sep = "\t", quote = FALSE, : appending column names to file Warning message: In write.table(file = outputFile, superEnhancer, sep = "\t", quote = FALSE, : appending column names to file Traceback (most recent call last): File "/hpcstor6/scratch01/m/mingyu.liu001/Super_Enhancer/ROSE-1.3.0/bin/ROSE_geneMapper.py", line 291, in main() File "/hpcstor6/scratch01/m/mingyu.liu001/Super_Enhancer/ROSE-1.3.0/bin/ROSE_geneMapper.py", line 277, in main enhancerToGeneTable,geneToEnhancerTable = mapEnhancerToGene(annotFile,enhancerFile,uniqueGenes=True,byRefseq=options.refseq, transcribedFile=transcribedFile) File "/hpcstor6/scratch01/m/mingyu.liu001/Super_Enhancer/ROSE-1.3.0/bin/ROSE_geneMapper.py", line 145, in mapEnhancerToGene closestGene = allEnhancerGenes[distList.index(min(distList))] IndexError: list index out of range Traceback (most recent call last): File "/hpcstor6/scratch01/m/mingyu.liu001/Super_Enhancer/ROSE-1.3.0/bin/ROSE_geneMapper.py", line 291, in main() File "/hpcstor6/scratch01/m/mingyu.liu001/Super_Enhancer/ROSE-1.3.0/bin/ROSE_geneMapper.py", line 277, in main enhancerToGeneTable,geneToEnhancerTable = mapEnhancerToGene(annotFile,enhancerFile,uniqueGenes=True,byRefseq=options.refseq, transcribedFile=transcribedFile) File "/hpcstor6/scratch01/m/mingyu.liu001/Super_Enhancer/ROSE-1.3.0/bin/ROSE_geneMapper.py", line 145, in mapEnhancerToGene closestGene = allEnhancerGenes[distList.index(min(distList))] IndexError: list index out of range

Can you help or provide some suggestions? Thank you.

Best, Mingyu

Gemma-Zhang-326 commented 1 year ago

Hi, I encountered the same issue long ago. So I check the the input file which are the *SuperStitched.table.txt and *AllStitched.table.txt. And it turns out the column CHROM have unsaual format like chr6_Nw12.... After I remove this kind of row manually, It goes well.

zochzh commented 1 year ago

Thanks to Gemma-Zhang.The same problem has been solved in your way

taolin1988 commented 11 months ago

Hi, I encountered the same issue long ago. So I check the the input file which are the *SuperStitched.table.txt and *AllStitched.table.txt. And it turns out the column CHROM have unsaual format like chr6_Nw12.... After I remove this kind of row manually, It goes well.

Hi, I encountered this problem when running ROSE, do you know how to solve it?

python2.7) liurui@dhcp651-233 rose % python ROSE_main.py -g /Users/liurui/ROSE/hg19 -i /Users/liurui/ROSE/HG18_MM1S_MED1.gff -r /Users/liurui/ROSE/MM1S_MED1.hg18. bwt.sorted.bam -o /Users/liurui/ROSE -s 12500 -t 2000 folder /Users/liurui/ROSE/mappedGFF/ does not exist USING /Users/liurui/ROSE/HG18_MM1S_MED1.gff AS THE INPUT GFF USING /Users/liurui/ROSE/hg19 AS THE GENOME MAKING START DICT Traceback (most recent call last): File "ROSE_main.py", line 484, in main() File "ROSE_main.py", line 336, in main startDict = ROSE_utils.makeStartDict(annotFile) File "/Users/liurui/ROSE/ROSE_utils.py", line 168, in makeStartDict refseqTable,refseqDict = importRefseq(annotFile) File "/Users/liurui/ROSE/ROSE_utils.py", line 230, in importRefseq if refseqDict.has_key(line[1]): IndexError: list index out of range

taolin1988 commented 11 months ago

Thanks to Gemma-Zhang.The same problem has been solved in your way

Hi, I encountered this problem when running ROSE, do you know how to solve it?

python2.7) liurui@dhcp651-233 rose % python ROSE_main.py -g /Users/liurui/ROSE/hg19 -i /Users/liurui/ROSE/HG18_MM1S_MED1.gff -r /Users/liurui/ROSE/MM1S_MED1.hg18. bwt.sorted.bam -o /Users/liurui/ROSE -s 12500 -t 2000 folder /Users/liurui/ROSE/mappedGFF/ does not exist USING /Users/liurui/ROSE/HG18_MM1S_MED1.gff AS THE INPUT GFF USING /Users/liurui/ROSE/hg19 AS THE GENOME MAKING START DICT Traceback (most recent call last): File "ROSE_main.py", line 484, in main() File "ROSE_main.py", line 336, in main startDict = ROSE_utils.makeStartDict(annotFile) File "/Users/liurui/ROSE/ROSE_utils.py", line 168, in makeStartDict refseqTable,refseqDict = importRefseq(annotFile) File "/Users/liurui/ROSE/ROSE_utils.py", line 230, in importRefseq if refseqDict.has_key(line[1]): IndexError: list index out of range

WangYuzhou1996 commented 3 months ago

@taolin1988 Hello,I encountered the same problem, after running ROSE_main,I didn't get the SuperEnhancers.table.txt file, and got the error:IndexError: list index out of range. Did you solve the problem?