DaehwanKimLab / hisat-genotype

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

multiprocessing error #38

Open Tijs-dot opened 3 years ago

Tijs-dot commented 3 years ago

Hi,

I have an issue when trying to run HISAT-genotype. When I try to run the following command: hisatgenotype --base hla --keep-alignment --assembly -z indicies --bamfile RR-Plate2-A1_FCHCMJ5BBXX_L8_IATCACG_R1_fastq_gz-hla-extracted-1_fq.bam --pp 4 --locus-list A -1 input/RR-Plate2-A1.FCHCMJ5BBXX_L8_IATCACG_R1.fastq.gz -2 input/RR-Plate2-A1.FCHCMJ5BBXX_L8_IATCACG_R2.fastq.gz

I tried this command with/without -p 4, with/without --bamfile, but it keeps giving an error

[tijs@manjaro hisatgenotype]$ python --version Python 3.9.1 (I also tried with the recommended version, 3.7, but this gave the same issue) I use ArchLinux

OUTPUT: [hisatgenotype]$ cat 2021-01-05_hisat-genotype.log

Base and Files:hla RR-Plate2-A1.FCHCMJ5BBXX_L8_IATCACG_R1.fastq.gz-hla-extracted-1.fq.gz RR-Plate2-A1.FCHCMJ5BBXX_L8_IATCACG_R1.fastq.gz-hla-extracted-2.fq.gz multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/lib/python3.9/multiprocessing/pool.py", line 125, in worker result = (True, func(*args, **kwds)) File "/home/tijs/app/hisatgenotype/hisatgenotype_modules/hisatgenotype_typing_core.py", line 2652, in genotyping_locus typing(simulation, File "/home/tijs/app/hisatgenotype/hisatgenotype_modules/hisatgenotype_typing_core.py", line 1531, in typing assembly_graph.Node(node_read_id, File "/home/tijs/app/hisatgenotype/hisatgenotype_modules/hisatgenotype_assembly_graph.py", line 197, in init assert len(seq) == len(var) AssertionError """

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

Traceback (most recent call last): File "/home/tijs/app/hisatgenotype/hisatgenotype", line 673, in typing_process ofnlog.write(str(x.get())) File "/usr/lib/python3.9/multiprocessing/pool.py", line 771, in get raise self._value AssertionError

When I run it without --assembly, however, the output is almost instantly generated, and no error occurs: [tijs@manjaro hisatgenotype]$ hisatgenotype --base hla --keep-alignment -z indicies -p 4 --pp 4 --locus-list A --bamfile /home/tijs/app/hisatgenotype/RR-Plate2-A1_FCHCMJ5BBXX_L8_IATCACG_R1_fastq_gz-hla-extracted-1_fq.bam -1 fq/RR-Plate2-A1.FCHCMJ5BBXX_L8_IATCACG_R1.fastq.gz -2 fq/RR-Plate2-A1.FCHCMJ5BBXX_L8_IATCACG_R2.fastq.gz Files found: Omitted extracting reads from RR-Plate2-A1.FCHCMJ5BBXX_L8_IATCACG_R1.fastq.gz A

[tijs@manjaro hisatgenotype]$ cat hisatgenotype_out/assembly_graph-hla.RR-Plate2-A1_FCHCMJ5BBXX_L8_IATCACG_R1_fastq_gz-hla-extracted-1_fq.report VERSIONS: HISAT2 - 2.2.1

HISAT-genotype - 1.3.2

Database - Database /home/tijs/app/hisatgenotype/indicies/hla derived from HISATgenotype DB version: NONE COMMAND: /home/tijs/app/hisatgenotype/hisatgenotype --base hla --keep-alignment -z indicies -p 4 --pp 4 --locus-list A --bamfile /home/tijs/app/hisatgenotype/RR-Plate2-A1_FCHCMJ5BBXX_L8_IATCACG_R1_fastq_gz-hla-extracted-1_fq.bam -1 fq/RR-Plate2-A1.FCHCMJ5BBXX_L8_IATCACG_R1.fastq.gz -2 fq/RR-Plate2-A1.FCHCMJ5BBXX_L8_IATCACG_R2.fastq.gz

            hisat2 graph
                    2134 reads and 1078 pairs are aligned
                            1 A*02:01:01:01 (count: 757)
                            2 A*02:01:01:08 (count: 757)
                            3 A*02:01:01:05 (count: 756)
                            4 A*02:01:01:07 (count: 756)
                            5 A*02:01:01:06 (count: 755)
                            6 A*02:30:01 (count: 746)
                            7 A*02:648 (count: 745)
                            8 A*02:01:120 (count: 739)
                            9 A*02:01:124 (count: 739)
                            10 A*02:06:01:01 (count: 739)

                            1 ranked A*03:02:01 (abundance: 40.88%)
                            2 ranked A*02:01:01:01 (abundance: 29.56%)
                            3 ranked A*02:01:01:08 (abundance: 29.56%)

Do you have any idea how to fix this? Thanks in advance!

Tijs

chbe-helix commented 3 years ago

Hi Tijs,

This is a known error with the assembly function. Unfortunately I have no gotten a chance to get around to fixing it yet. I am hoping to have a new version of HISATgenotype with the fix by the end of Q1 2021. Sorry for the inconvenience this causes.

Thanks, Chris

Tijs-dot commented 3 years ago

Hi Chris,

No problem, I look forward to the new version then! Thanks for the reply, Tijs

huipan1973 commented 2 years ago

I had the same error message. Then I used --debug and it showed that the error was from random.py.

File "/home/panh/miniconda3/envs/bioinfo/lib/python3.9/random.py", line 449, in sample raise ValueError("Sample larger than population or is negative") ValueError: Sample larger than population or is negative

Has it been fixed yet?