Skip to content

ValueError: not enough values to unpack (expected 2, got 1) #7

@yr542

Description

@yr542

I get the error ValueError: not enough values to unpack (expected 2, got 1) but I do not know why as my metadata is tab separated. I have removed my paths as I am working on an HPC and they do not allow us to disclose any paths on the HPC.

My variables are

  • tsv_file = /path/to/rmats_JCEC_results.tsv
  • meta_file = /path/to/Timepoint_1_Case_Control_Samples.tsv
  • p_value=0.05
  • q_value=0.05
  • Jutils_Cloned_Directory = /path/to/Jutils/directory
  • jutils_script_path="${Jutils_Cloned_Directory}/jutils.py"

The relevant section of my script:

python3 "$jutils_script_path" heatmap \
    --tsv-file "$tsv_file" \
    --meta-file "$meta_file" \
    --p-value "$p_value" \
    --q-value "$q_value"

My metadata:

C-01  Control
C-02  Control
C-03  Control
KO-01  Case
KO-02  Case
KO-03  Case

My full error:

Traceback (most recent call last):
  File "/path/to/jutils.py", line 149, in <module>
    main()
  File "/path/to/jutils.py", line 142, in main
    run_heatmap_module(args, parser_dict)
  File "/path/to/jutils.py", line 108, in run_heatmap_module
    plot_heatmap(Path(args.tsv_file), Path(args.meta_file), Path(args.out_dir), args.p_value,
  File "/path/to/heatmap_utils.py", line 63, in plot_heatmap
    sample, cond = line.strip().split('\t')
ValueError: not enough values to unpack (expected 2, got 1)

How do I get around this error. I ran rMats from fastq files and used a Refseq gtf and rMats ran well. Therefore, I believe is an issue here with the heat map. The conversion to tsv script ran without error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions