DaehwanKimLab / hisat-genotype

GNU General Public License v3.0
23 stars 15 forks source link

UnboundLocalError: local variable 'ins_len' referenced before assignment #26

Closed davetang closed 3 years ago

davetang commented 3 years ago

Hi Chris,

I had setup HISAT-genotype by cloning the repo.

git clone https://github.com/DaehwanKimLab/hisat-genotype.git hisat-genotype-20bce67141836ff9cc6b0686340c2a2b678cde75
cd hisat-genotype-20bce67141836ff9cc6b0686340c2a2b678cde75

# I manually added the PATH's to HISAT-genotype and HISAT2, and PYTHONPATH to hisatgenotype_modules
bash setup.sh -b -r -x hisatgenotype_files

mkdir hla_analysis
cd hla_analysis
wget -c -N ftp://ftp.ccb.jhu.edu/pub/infphilo/hisat-genotype/data/hla/ILMN.tar.gz
tar -xzf ILMN.tar.gz

hisatgenotype --index_dir ../hisatgenotype_files --base hla --locus-list A,B,C,DPA1,DPB1,DQA1,DQB1,DRB1  -1 ILMN/NA12892.extracted.1.fq.gz -2 ILMN/NA12892.extracted.2.fq.gz --assembly -p 16

Checking the log.

> Base and Files:hla NA12892.extracted.1.fq.gz-hla-extracted-1.fq.gz NA12892.extracted.1.fq.gz-hla-extracted-2.fq.gz
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/home/dtang/miniconda3/lib/python3.7/multiprocessing/pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "/home/dtang/tool/hisat-genotype-20bce67141836ff9cc6b0686340c2a2b678cde75/hisatgenotype_modules/hisatgenotype_typing_core.py", line 2688, in genotyping_locus
    dbversion)
  File "/home/dtang/tool/hisat-genotype-20bce67141836ff9cc6b0686340c2a2b678cde75/hisatgenotype_modules/hisatgenotype_typing_core.py", line 1518, in typing
    read_end        = read_pos + ins_len
UnboundLocalError: local variable 'ins_len' referenced before assignment
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/dtang/tool/hisat-genotype-20bce67141836ff9cc6b0686340c2a2b678cde75/hisatgenotype", line 673, in typing_process
    ofnlog.write(str(x.get()))
  File "/home/dtang/miniconda3/lib/python3.7/multiprocessing/pool.py", line 657, in get
    raise self._value
UnboundLocalError: local variable 'ins_len' referenced before assignment

Do you know what's wrong?

Thanks, Dave

chbe-helix commented 3 years ago

Hi Dave,

I have no idea how that happened in the code. I have fixed the problem and pushed the changes to github master branch. You can update your pull and have this error resolved. Sorry for the inconvenience.

Thanks, Chris