novoalab / EpiNano

Detection of RNA modifications from Oxford Nanopore direct RNA sequencing reads (Liu*, Begik* et al., Nature Comm 2019)
GNU General Public License v2.0
108 stars 31 forks source link

Epinano_Variants tmp file Null end of lines #61

Closed Celinet21 closed 3 years ago

Celinet21 commented 3 years ago

a couple of my tmp files created by Epinano_Variants (e.g ... .per_site_var.5mer.tmp) have a final line (or 2 or 3) like: ACAGN,17488366-17488370,+2,Null

or

GGTTN,46771258-46771262,-2,chr13,46771258,G,-,11,8.63636,7.00000,4.61761,0.00000,0.00000,0.00000 GGTTN,46771258-46771262,-1,chr13,46771259,G,-,12,9.66667,8.50000,6.89605,0.00000,0.00000,0.00000 GGTTN,46771258-46771262,+0,chr13,46771260,T,-,12,9.50000,7.50000,6.83740,0.00000,0.00000,0.00000 GGTTN,46771258-46771262,+1,chr13,46771261,T,-,12,9.50000,7.00000,6.46142,0.00000,0.00000,0.00000 GGTTN,46771258-46771262,+2,Null

Causing an index out of bound error at:

File "epinano_modules.py", line 869, in slide_per_site_var
    window = (ary[0], ary[1], ary[3], ary[6])       
IndexError: list index out of range

Only happens on usually ~2 chromosomes out of all.

Huanle commented 3 years ago

Hi @Celinet21 ,

Do you mind sending me your per.site.var.csv file so that i can relatively easily debug the relevant code? Sites associated with chr13 would be fine. I assume. Thanks.

Celinet21 commented 3 years ago

Yeah sure, I'll use the email in the program. Let me know if you don't receive it, thanks!

Huanle commented 3 years ago

Fixed.

EpiNano/misc/Slide_Variants.py
python $EpiNano/misc/Slide_Variants.py per_site_var kmer_length
please provide 1) variants table from Epinano_Variants and 2) windown size(integer)