Question: How to fix "ValueError: not enough values to unpack (expected 3, got 1)" when excuting batch analysis?
0
gravatar for mychung3265
3 months ago by
mychung32650 wrote:
CNVkit 0.9.7
Detected file format: bed
Splitting large targets
Wrote results/120430_HG19_ExomeV3_UTR_EZ_HX1_primary_annotated.target.bed with 407920 regions
Detected file format: bed
Traceback (most recent call last):
  File "/home/lab/miniconda3/envs/CNVKIT/lib/python3.7/site-packages/skgenome/tabio/util.py", line 9, in wrapper
    return line_parser(line)
  File "/home/lab/miniconda3/envs/CNVKIT/lib/python3.7/site-packages/skgenome/tabio/bedio.py", line 25, in _parse_line
    chrom, start, end = fields[:3]
ValueError: not enough values to unpack (expected 3, got 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/lab/miniconda3/envs/CNVKIT/lib/python3.7/site-packages/skgenome/tabio/__init__.py", line 74, in read
    dframe = reader(infile, **kwargs)
  File "/home/lab/miniconda3/envs/CNVKIT/lib/python3.7/site-packages/skgenome/tabio/bedio.py", line 51, in read_bed
    "end", "gene", "strand"])
  File "/home/lab/miniconda3/envs/CNVKIT/lib/python3.7/site-packages/pandas/core/frame.py", line 1759, in from_records
    values += data
  File "/home/lab/miniconda3/envs/CNVKIT/lib/python3.7/site-packages/skgenome/tabio/util.py", line 11, in wrapper
    raise ValueError("Bad line: %r" % line)
ValueError: Bad line: '\n'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/lab/miniconda3/envs/CNVKIT/bin/cnvkit.py", line 9, in <module>
    args.func(args)
  File "/home/lab/miniconda3/envs/CNVKIT/lib/python3.7/site-packages/cnvlib/commands.py", line 115, in _cmd_batch
    args.count_reads, args.seq_method, args.cluster)
  File "/home/lab/miniconda3/envs/CNVKIT/lib/python3.7/site-packages/cnvlib/batch.py", line 103, in batch_make_reference
    anti_kwargs['access'] = tabio.read_auto(access_bed)
  File "/home/lab/miniconda3/envs/CNVKIT/lib/python3.7/site-packages/skgenome/tabio/__init__.py", line 110, in read_auto
    return read(infile, fmt or 'tab')
  File "/home/lab/miniconda3/envs/CNVKIT/lib/python3.7/site-packages/skgenome/tabio/__init__.py", line 75, in read
    except pd.io.common.EmptyDataError:
AttributeError: module 'pandas.io.common' has no attribute 'EmptyDataError'
batch germline cnv • 290 views
ADD COMMENTlink modified 12 weeks ago by genomax92k • written 3 months ago by mychung32650
1

I'm guessing an empty line in a bed (?) file. Try actually explaining what was the input and the error.

ADD REPLYlink written 12 weeks ago by Asaf8.4k

After dissecting the process, the errors are related to the "antitarget" command.

ADD REPLYlink written 12 weeks ago by mychung32650
0
gravatar for mychung3265
12 weeks ago by
mychung32650 wrote:

Answer:

The first two errors are due to an extra empty line at the end of the access-5kb-mappable.hg19.bed. Remove it and no errors anymore.

The third errors are due to scripts, please look for the right one in GitHub. Original: File "/home/lab/miniconda3/envs/CNVKIT/lib/python3.7/site-packages/skgenome/tabio/__init__.py", line 75, in read except pd.io.common.EmptyDataError:

should have been pd.errors.EmptyDataError:

ADD COMMENTlink modified 12 weeks ago • written 12 weeks ago by mychung32650
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1411 users visited in the last hour