And thanks in advance. I am debugging a text file which is the one the two inputs on the program RGmatch https://bitbucket.org/pfurio/rgmatch/src/master/.
The code works. Is that some records give division by zero.
I am doing it by hand.
But is there a way by making a bash script, to see which records show the problem?
I do not want to touch the python code.
python rgmatch.py -g ../../hg38.ncbiRefSeq.gtf -b ../../test.bed -o myassoSort.txt
I have tried with classical debugging, but my actual question is how to automatize that?
Also there are no empty records. The bed file was created based on refseq.txt from the latest human assembly. And also the GTF file. On the refseq.txt I processed to obtain a bed file.
I have checked if this works on a single record, it does, but not in some specific ones. The error I get is:
File "rgmatch.py", line 1311, in <module>
main()
File "rgmatch.py", line 287, in main
run(gtf, dhs, outputfile)
File "rgmatch.py", line 1153, in run
pctg_area = (float(region_overlap)/intron_length)*100
ZeroDivisionError: float division by zero
The record I found so far is this one.
chr19 14087850 14090751
I did grep on both GTF files and Refseq Files and in both files there is information about the record. Because the program search for areas between region of interest, If I put inside just the record only in GTF file and bed Files no error occurs.
grep "14090751" refseq.bed
692 NM_138352.3 chr19 - 14087850 14090751 14088416 14090420 6 14087850,14088670,14088879,14089067,14089784,14090084, 14088575,14088782,14088976,14089362,14090084,14090751, 0 SAMD1 cmpl cmpl 0,2,1,0,0,0,
grep "14090751" hg38.ncbiRefSeq.gtf
chr19 ncbiRefSeq.2021-02-10 exon 14090085 14090751 . - . gene_id "SAMD1"; transcript_id "NM_138352.3"; exon_number "1"; exon_id "NM_138352.3.1"; gene_name "SAMD1";
chr19 ncbiRefSeq.2021-02-10 5UTR 14090421 14090751 . - . gene_id "SAMD1"; transcript_id "NM_138352.3"; exon_number "1"; exon_id "NM_138352.3.1"; gene_name "SAMD1";