ValueError: invalid literal for int() with base 10: 'ref_counts'

57 views
Skip to first unread message

Rui Resende

unread,
Jul 29, 2019, 2:26:05 PM7/29/19
to Pyclone User Group
Hi, I am trying to run PyClone v0.13.1 but I am getting the following error:

Traceback (most recent call last):
  File "/opt/conda/bin/PyClone", line 11, in <module>
    load_entry_point('PyClone==0.13.1', 'console_scripts', 'PyClone')()
  File "/opt/conda/lib/python2.7/site-packages/pyclone/cli.py", line 78, in main
    args.func(args)
  File "/opt/conda/lib/python2.7/site-packages/pyclone/run.py", line 44, in run_analysis_pipeline
    config_extras_file=args.config_extras_file,
  File "/opt/conda/lib/python2.7/site-packages/pyclone/run.py", line 258, in _setup_analysis
    prior
  File "/opt/conda/lib/python2.7/site-packages/pyclone/run.py", line 305, in _build_mutations_file
    ref_counts = int(row['ref_counts'])
ValueError: invalid literal for int() with base 10: 'ref_counts'

The inputs are tab-delimited files with following format:

mutation_id ref_counts var_counts normal_cn minor_cn major_cn
chr1:878314 32 13 2 0 2
chr1:978603 23 16 2 0 2
chr1:981087 32 21 2 0 2
chr1:982941 54 31 2 0 2
chr1:982994 59 39 2 0 2
chr1:985266 33 16 2 0 2
chr1:986443 18 7 2 0 2

I am running with prior set as total_copy_number.

I'd appreciate any help.
Thank you!

Andrew

unread,
Jul 29, 2019, 2:30:10 PM7/29/19
to Pyclone User Group
Hi Rui,

This suggests there is an entry in the ref_counts column the program does not like. Double check the file for any weird values. One easy way to have a mistake is a blank entry, which will get read in as a missing value which may cause errors. 

You can debug this by loading the file with pandas in Python and checking the dtype of the column. Try casting it to an integer and see if that raises an error.

Best wishes,
Andy

Rui Resende

unread,
Jul 29, 2019, 4:01:56 PM7/29/19
to Pyclone User Group
Indeed, one of my input files had a problem. Thank you very much!

Best,

Rui
Reply all
Reply to author
Forward
0 new messages