FRED-2 / OptiType

Precision HLA typing from next-generation sequencing data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

h:363 FAILED! (Uncaught exception of type seqan::UnexpectedEnd: Unexpected end of input.)

jingydz opened this issue · comments

hi, I have an error when I run the optitype software.
I have installed the optitype software by the command line: conda create -n optitype; conda install -n optitype -c bioconda optitype. And it worked.
$ /home/zhangjj/software/miniconda3/envs/optitype/bin/OptiTypePipeline.py usage: OptiType [-h] --input FQ [FQ ...] (--rna | --dna) [--beta B] [--enumerate N] --outdir OUTDIR [--prefix PREFIX] [--verbose] [--config CONFIG] OptiType: error: the following arguments are required: --input/-i, --outdir/-o
But I can'tuse your test data.
`$ wget https://github.com/FRED-2/OptiType/blob/master/test/rna/CRC_81_N_1_fished.fastq
$ wget https://github.com/FRED-2/OptiType/blob/master/test/rna/CRC_81_N_2_fished.fastq
$ /home/zhangjj/software/miniconda3/envs/optitype/bin/OptiTypePipeline.py -i CRC_81_N_1_fished.fastq CRC_81_N_2_fished.fastq --rna -v -o ./

mapping with 12 threads...

0:00:01.18 Mapping CRC_81_N_1_fished.fastq to NUC reference...
/opt/conda/conda-bld/razers3_1592544302093/work/include/seqan/basic/basic_exception.h:363 FAILED! (Uncaught exception of type seqan::UnexpectedEnd: Unexpected end of input.)

stack trace:
0 [0x2b65840e60f4] /home/zhangjj/software/miniconda3/envs/optitype/bin/razers3(+0x5cc0f4)
1 [0x2b6584972f69] /home/zhangjj/software/miniconda3/envs/optitype/bin/../lib/libstdc++.so.6(+0xacf69)
2 [0x2b6584972fab] /home/zhangjj/software/miniconda3/envs/optitype/bin/../lib/libstdc++.so.6(+0xacfab)
3 [0x2b6584973194] __cxa_rethrow + 0
4 [0x2b6583dc1d3a] /home/zhangjj/software/miniconda3/envs/optitype/bin/razers3(+0x2a7d3a)
5 [0x2b6583d8e24f] main + 0x79f
6 [0x2b6584f3dd5d] __libc_start_main + 0xfd
7 [0x2b6583d8e9d6] /home/zhangjj/software/miniconda3/envs/optitype/bin/razers3(+0x2749d6)

0:00:01.68 Mapping CRC_81_N_2_fished.fastq to NUC reference...
/opt/conda/conda-bld/razers3_1592544302093/work/include/seqan/basic/basic_exception.h:363 FAILED! (Uncaught exception of type seqan::UnexpectedEnd: Unexpected end of input.)

stack trace:
0 [0x2ad7438c90f4] /home/zhangjj/software/miniconda3/envs/optitype/bin/razers3(+0x5cc0f4)
1 [0x2ad744155f69] /home/zhangjj/software/miniconda3/envs/optitype/bin/../lib/libstdc++.so.6(+0xacf69)
2 [0x2ad744155fab] /home/zhangjj/software/miniconda3/envs/optitype/bin/../lib/libstdc++.so.6(+0xacfab)
3 [0x2ad744156194] __cxa_rethrow + 0
4 [0x2ad7435a4d3a] /home/zhangjj/software/miniconda3/envs/optitype/bin/razers3(+0x2a7d3a)
5 [0x2ad74357124f] main + 0x79f
6 [0x2ad744720d5d] __libc_start_main + 0xfd
7 [0x2ad7435719d6] /home/zhangjj/software/miniconda3/envs/optitype/bin/razers3(+0x2749d6)

0:00:09.04 Generating binary hit matrix.
[E::hts_open_format] Failed to open file ./2020_10_21_10_28_06/2020_10_21_10_28_06_1.bam
Traceback (most recent call last):
File "/home/zhangjj/software/miniconda3/envs/optitype/bin/OptiTypePipeline.py", line 309, in
pos, read_details = ht.pysam_to_hdf(bam_paths[0])
File "/home/zhangjj/software/miniconda3/envs/optitype/bin/hlatyper.py", line 186, in pysam_to_hdf
sam = pysam.AlignmentFile(samfile, sam_or_bam)
File "pysam/libcalignmentfile.pyx", line 741, in pysam.libcalignmentfile.AlignmentFile.cinit
File "pysam/libcalignmentfile.pyx", line 940, in pysam.libcalignmentfile.AlignmentFile._open
FileNotFoundError: [Errno 2] could not open alignment file ./2020_10_21_10_28_06/2020_10_21_10_28_06_1.bam: No such file or directory
`
Do you know why?

Have a similar issue!

hi, I have an error when I run the optitype software.
I have installed the optitype software by the command line: conda create -n optitype; conda install -n optitype -c bioconda optitype. And it worked.
$ /home/zhangjj/software/miniconda3/envs/optitype/bin/OptiTypePipeline.py usage: OptiType [-h] --input FQ [FQ ...] (--rna | --dna) [--beta B] [--enumerate N] --outdir OUTDIR [--prefix PREFIX] [--verbose] [--config CONFIG] OptiType: error: the following arguments are required: --input/-i, --outdir/-o
But I can'tuse your test data.
`$ wget https://github.com/FRED-2/OptiType/blob/master/test/rna/CRC_81_N_1_fished.fastq
$ wget https://github.com/FRED-2/OptiType/blob/master/test/rna/CRC_81_N_2_fished.fastq
$ /home/zhangjj/software/miniconda3/envs/optitype/bin/OptiTypePipeline.py -i CRC_81_N_1_fished.fastq CRC_81_N_2_fished.fastq --rna -v -o ./

mapping with 12 threads...

0:00:01.18 Mapping CRC_81_N_1_fished.fastq to NUC reference...
/opt/conda/conda-bld/razers3_1592544302093/work/include/seqan/basic/basic_exception.h:363 FAILED! (Uncaught exception of type seqan::UnexpectedEnd: Unexpected end of input.)

stack trace:
0 [0x2b65840e60f4] /home/zhangjj/software/miniconda3/envs/optitype/bin/razers3(+0x5cc0f4)
1 [0x2b6584972f69] /home/zhangjj/software/miniconda3/envs/optitype/bin/../lib/libstdc++.so.6(+0xacf69)
2 [0x2b6584972fab] /home/zhangjj/software/miniconda3/envs/optitype/bin/../lib/libstdc++.so.6(+0xacfab)
3 [0x2b6584973194] __cxa_rethrow + 0
4 [0x2b6583dc1d3a] /home/zhangjj/software/miniconda3/envs/optitype/bin/razers3(+0x2a7d3a)
5 [0x2b6583d8e24f] main + 0x79f
6 [0x2b6584f3dd5d] __libc_start_main + 0xfd
7 [0x2b6583d8e9d6] /home/zhangjj/software/miniconda3/envs/optitype/bin/razers3(+0x2749d6)

0:00:01.68 Mapping CRC_81_N_2_fished.fastq to NUC reference...
/opt/conda/conda-bld/razers3_1592544302093/work/include/seqan/basic/basic_exception.h:363 FAILED! (Uncaught exception of type seqan::UnexpectedEnd: Unexpected end of input.)

stack trace:
0 [0x2ad7438c90f4] /home/zhangjj/software/miniconda3/envs/optitype/bin/razers3(+0x5cc0f4)
1 [0x2ad744155f69] /home/zhangjj/software/miniconda3/envs/optitype/bin/../lib/libstdc++.so.6(+0xacf69)
2 [0x2ad744155fab] /home/zhangjj/software/miniconda3/envs/optitype/bin/../lib/libstdc++.so.6(+0xacfab)
3 [0x2ad744156194] __cxa_rethrow + 0
4 [0x2ad7435a4d3a] /home/zhangjj/software/miniconda3/envs/optitype/bin/razers3(+0x2a7d3a)
5 [0x2ad74357124f] main + 0x79f
6 [0x2ad744720d5d] __libc_start_main + 0xfd
7 [0x2ad7435719d6] /home/zhangjj/software/miniconda3/envs/optitype/bin/razers3(+0x2749d6)

0:00:09.04 Generating binary hit matrix.
[E::hts_open_format] Failed to open file ./2020_10_21_10_28_06/2020_10_21_10_28_06_1.bam
Traceback (most recent call last):
File "/home/zhangjj/software/miniconda3/envs/optitype/bin/OptiTypePipeline.py", line 309, in
pos, read_details = ht.pysam_to_hdf(bam_paths[0])
File "/home/zhangjj/software/miniconda3/envs/optitype/bin/hlatyper.py", line 186, in pysam_to_hdf
sam = pysam.AlignmentFile(samfile, sam_or_bam)
File "pysam/libcalignmentfile.pyx", line 741, in pysam.libcalignmentfile.AlignmentFile.cinit
File "pysam/libcalignmentfile.pyx", line 940, in pysam.libcalignmentfile.AlignmentFile._open
FileNotFoundError: [Errno 2] could not open alignment file ./2020_10_21_10_28_06/2020_10_21_10_28_06_1.bam: No such file or directory
`
Do you know why?

@HyperOdin Hi, I have solved this problem. I find a paper "HLA Typing from Short-Read Sequencing Data with OptiType"(2018), and you can read it. I think if you only run the OptiType software, it is to internally perform mapping, create bam files, and then delete bam files to get the output result. In the paper mentioned above, it is mentioned "Create a config.ini file in the OptiType directory by adapting config.ini.example." So I think you need to find the config.ini.example file given in this software path and create a config.ini file and modify it. Just like
git clone https://github.com/FRED-2/OptiType.git cd OptiType/;cp config.ini.example config.ini;vi config.ini;Change the razers3 path inside to:/home/zhangjj/software/miniconda3/envs/optitype/bin/razers3;The remaining parameters are unchanged and saved.
After running successfully, two files are obtained, one is a pdf file and the other is a tsv file.

Thanks a ton!!

@HyperOdin Hi, I have solved this problem. I find a paper "HLA Typing from Short-Read Sequencing Data with OptiType"(2018), and you can read it. I think if you only run the OptiType software, it is to internally perform mapping, create bam files, and then delete bam files to get the output result. In the paper mentioned above, it is mentioned "Create a config.ini file in the OptiType directory by adapting config.ini.example." So I think you need to find the config.ini.example file given in this software path and create a config.ini file and modify it. Just like
git clone https://github.com/FRED-2/OptiType.git cd OptiType/;cp config.ini.example config.ini;vi config.ini;Change the razers3 path inside to:/home/zhangjj/software/miniconda3/envs/optitype/bin/razers3;The remaining parameters are unchanged and saved.
After running successfully, two files are obtained, one is a pdf file and the other is a tsv file.

Thanks a ton!! Do you know where does conda environment store this config.ini ???

@HyperOdin You can use the command like find /your_home_path -name config.ini to find the config.ini file.
for example,

$ pwd 
/home/zhangjj/software/OptiType 
$ ls 
config.ini config.ini.example data Dockerfile hlatyper.py hlatyper.pyc LICENSE model.py model.pyc OptiTypePipeline.py __pycache__ README.md test 
$ find /home/zhangjj -name config.ini 
/home/zhangjj/software/OptiType/config.ini /home/zhangjj/software/miniconda3/envs/optitype/bin/config.ini /home/zhangjj/software/miniconda3/pkgs/optitype-1.3.5-0/info/recipe/config.ini /home/zhangjj/software/miniconda3/pkgs/optitype-1.3.5-0/bin/config.ini

@HyperOdin You can use the command like find /your_home_path -name config.ini to find the config.ini file.
for example,

$ pwd 
/home/zhangjj/software/OptiType 
$ ls 
config.ini config.ini.example data Dockerfile hlatyper.py hlatyper.pyc LICENSE model.py model.pyc OptiTypePipeline.py __pycache__ README.md test 
$ find /home/zhangjj -name config.ini 
/home/zhangjj/software/OptiType/config.ini /home/zhangjj/software/miniconda3/envs/optitype/bin/config.ini /home/zhangjj/software/miniconda3/pkgs/optitype-1.3.5-0/info/recipe/config.ini /home/zhangjj/software/miniconda3/pkgs/optitype-1.3.5-0/bin/config.ini

Thanks Man. Tha book you sent "HLA Typing from Short-Read Sequencing Data with OptiType"(2018)" explains everything.