Skip to content

[IndexError] invalid index to scalar variable #143

@asaksager

Description

@asaksager

I get the following error IndexError: invalid index to scalar variable., when I run the
arcasHLA reference --version 3.24.0 -v

The installation:
copied and changed the environment.yml file from github as I am using a Mac M1.

$ conda env create -n env-arcashla -f environment.yml

$ conda activate env-arcashla

$ conda install arcas-hla -c bioconda -c conda-forge

I could see this has previously been an issue, but it does not seem to have been fixed fully: #116 (comment)

Here is the full output:

--------------------------------------------------------------------------------
[reference] Cloning IMGT/HLA database:

	git clone https://github.com/ANHIG/IMGTHLA.git /Users/abrisa/miniconda3/envs/env-arcashla/share/arcas-hla-0.5.0-1/scripts/../dat/IMGTHLA/

	Cloning into '/Users/abrisa/miniconda3/envs/env-arcashla/share/arcas-hla-0.5.0-1/scripts/../dat/IMGTHLA'...
Updating files: 100% (526/526), done.
	
[reference] Checking out IMGT/HLA:

	git -C /Users/abrisa/miniconda3/envs/env-arcashla/share/arcas-hla-0.5.0-1/scripts/../dat/IMGTHLA/ checkout -f c5acf7a4342869351b2382b1cc1d1b5763e7e04e

	Note: switching to 'c5acf7a4342869351b2382b1cc1d1b5763e7e04e'.
	
	You are in 'detached HEAD' state. You can look around, make experimental
	changes and commit them, and you can discard any commits you make in this
	state without impacting any branches by switching back to a branch.
	
	If you want to create a new branch to retain commits you create, you may
	do so (now or later) by using -c with the switch command. Example:
	
	  git switch -c <new-branch-name>
	
	Or undo this operation with:
	
	  git switch -
	
	Turn off this advice by setting config variable advice.detachedHead to false
	
	HEAD is now at c5acf7a4 Update to hla.dat
	
[reference] IMGT/HLA database version:

c5acf7a4342869351b2382b1cc1d1b5763e7e04e

[reference] Processing IMGT/HLA database
Traceback (most recent call last):
  File "/Users/abrisa/miniconda3/envs/env-arcashla/share/arcas-hla-0.5.0-1/scripts/reference.py", line 580, in <module>
    build_fasta()
  File "/Users/abrisa/miniconda3/envs/env-arcashla/share/arcas-hla-0.5.0-1/scripts/reference.py", line 432, in build_fasta
    utrs, exons, final_exon_length) = process_hla_dat()
  File "/Users/abrisa/miniconda3/envs/env-arcashla/share/arcas-hla-0.5.0-1/scripts/reference.py", line 223, in process_hla_dat
    length = get_mode(lengths)
  File "/Users/abrisa/miniconda3/envs/env-arcashla/share/arcas-hla-0.5.0-1/scripts/reference.py", line 77, in get_mode
    return stats.mode(lengths)[0][0]
IndexError: invalid index to scalar variable.```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions