pycoQC icon indicating copy to clipboard operation
pycoQC copied to clipboard

Error when providing barcoding summary files

Open zhxiaokang opened this issue 2 years ago • 1 comments

Describe the bug When providing barcoding summary files by parameter -b, I got this error:

Checking arguments values
Check input data files
Parse data files
Merge data
Traceback (most recent call last):
  File "/opt/miniconda3/envs/pycoQC/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 2895, in get_loc
    return self._engine.get_loc(casted_key)
  File "pandas/_libs/index.pyx", line 70, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/index.pyx", line 101, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 1675, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 1683, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'barcode'

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

Traceback (most recent call last):
  File "/opt/miniconda3/envs/pycoQC/bin/pycoQC", line 33, in <module>
    sys.exit(load_entry_point('pycoQC', 'console_scripts', 'pycoQC')())
  File "/Users/xiaokangzhang/Research/nanopore_gene_fusion/qc/tools/pycoQC/pycoQC/__main__.py", line 132, in main_pycoQC
    quiet = args.quiet)
  File "/Users/xiaokangzhang/Research/nanopore_gene_fusion/qc/tools/pycoQC/pycoQC/pycoQC.py", line 129, in pycoQC
    quiet=quiet)
  File "/Users/xiaokangzhang/Research/nanopore_gene_fusion/qc/tools/pycoQC/pycoQC/pycoQC_parse.py", line 101, in __init__
    self.reads_df = self._merge_reads_df(summary_reads_df, barcode_reads_df, bam_reads_df)
  File "/Users/xiaokangzhang/Research/nanopore_gene_fusion/qc/tools/pycoQC/pycoQC/pycoQC_parse.py", line 234, in _merge_reads_df
    df['barcode'].fillna('unclassified', inplace=True)
  File "/opt/miniconda3/envs/pycoQC/lib/python3.6/site-packages/pandas/core/frame.py", line 2902, in __getitem__
    indexer = self.columns.get_loc(key)
  File "/opt/miniconda3/envs/pycoQC/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 2897, in get_loc
    raise KeyError(key) from err
KeyError: 'barcode'

To Reproduce Steps to reproduce the behavior:

  1. Command I used: pycoQC -f nanopore/sequencing_summary_FAP55372_10ac6c35.txt -b nanopore/combined_barcoding_summary/barcoding_summary_barcode* -o nanopore/qc_output_pycoqc/pycoqc.html
  2. There are 12 files under folder nanopore/combined_barcoding_summary/ named like barcoding_summary_barcode*, eg. barcoding_summary_barcode01.txt

Desktop (please complete the following information):

  • OS: MacOS

Additional context

Add any other context about the problem here.

zhxiaokang avatar Aug 03 '21 14:08 zhxiaokang

Hello, did you finaly find an solution ? if it's the case what was it please. Thank you;

alibioinfo avatar Feb 13 '23 10:02 alibioinfo