Error in pandas.parser.TextReader

Issue #3 resolved
Former user created an issue

Hi,

After running Mageck successfully, when I try to run the final command to display VISPR results, I encounter the following error:

BRBB138:Pool3_test paran$ vispr server results/*.vispr.yaml
Loading data.
Traceback (most recent call last):
  File "/Users/paran/miniconda3/bin/vispr", line 6, in <module>
    sys.exit(vispr.cli.main())
  File "/Users/paran/miniconda3/lib/python3.5/site-packages/vispr/cli.py", line 195, in main
    init_server(*args.config, port=args.port)
  File "/Users/paran/miniconda3/lib/python3.5/site-packages/vispr/cli.py", line 41, in init_server
    app.screens.add(config, parentdir=os.path.dirname(path))
  File "/Users/paran/miniconda3/lib/python3.5/site-packages/vispr/results/__init__.py", line 28, in add
    self.screens[screen] = Screen(config, parentdir=parentdir)
  File "/Users/paran/miniconda3/lib/python3.5/site-packages/vispr/results/__init__.py", line 83, in __init__
    posterior_results=get_path(config["sgrnas"].get("results", None)))
  File "/Users/paran/miniconda3/lib/python3.5/site-packages/vispr/results/rna.py", line 36, in __init__
    low_memory=False).iloc[:, :5]
  File "/Users/paran/miniconda3/lib/python3.5/site-packages/pandas/io/parsers.py", line 562, in parser_f
    return _read(filepath_or_buffer, kwds)
  File "/Users/paran/miniconda3/lib/python3.5/site-packages/pandas/io/parsers.py", line 315, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
  File "/Users/paran/miniconda3/lib/python3.5/site-packages/pandas/io/parsers.py", line 645, in __init__
    self._make_engine(self.engine)
  File "/Users/paran/miniconda3/lib/python3.5/site-packages/pandas/io/parsers.py", line 799, in _make_engine
    self._engine = CParserWrapper(self.f, **self.options)
  File "/Users/paran/miniconda3/lib/python3.5/site-packages/pandas/io/parsers.py", line 1213, in __init__
    self._reader = _parser.TextReader(src, **kwds)
  File "pandas/parser.pyx", line 523, in pandas.parser.TextReader.__cinit__ (pandas/parser.c:5214)
pandas.io.common.EmptyDataError: No columns to parse from file

I'm attaching the two config.yaml used to generate the results. Hope that someone can help me.

Thank you.

Comments (12)

  1. Johannes Köster

    Thanks, and sorry for the bug. It looks like the file defined under sgrnas->results in the corresponding vispr config file contains something invalid or is even empty. Can you please post the first 10 lines of that file?

  2. parkapdx

    Hi Johannes,

    Here are the first 10 lines of the .vispr.yaml file in the results directory:

    assembly: hg38

    experiment: DMSO_14_Res_21

    fastqc:

    DMSO_14:

    • qc/DMSO_14_0/Pool3_ABT199_DMSO_14_fastqc/fastqc_data.txt

    Res_21:

    • qc/Res_21_0/Pool3_ABT199_Res_21_fastqc/fastqc_data.txt

    sgrnas:

    annotation: sgrnas.bed

    counts: count/all.count_normalized.txt

    mapstats: count/all.countsummary.txt

    results: test/DMSO_14_Res_21.sgrna_summary.txt

    species: homo_sapiens

    targets:

    genes: true

    results: test/DMSO_14_Res_21.gene_summary.txt

    I noticed the sgrnas.bed file is empty in the results directory. However, there are definitely read matches because there were matches when I ran just Mageck.

    Andrew

  3. parkapdx

    Our sgrnas.log file outputs a "Warning: sequence not found" for every gene in our library, which I think causes the empty sgrnas.bed file. Do you know if the chromosomal location is required in the first column of the library csv file?

    Thanks, Andrew

  4. Johannes Köster

    Hi,
    sorry, I meant the first 10 lines of the file mentioned under sgrnas->results. Here, this would be the file test/DMSO_14_Res_21.sgrna_summary.txt. Can you post these?

    The library csv file should contain only three columns: id, sequence, gene. Id is arbitrary, and sometimes people set it to the chromosomal location. This is not required though.

  5. parkapdx

    Gene sgRNA eff

    OR2C1 HGLibB_33731 1

    OR2C1 HGLibA_33775 1

    OR2C1 HGLibB_33730 1

    OR2C1 HGLibB_33732 1

    OR2C1 HGLibA_33776 1

    OR2C1 HGLibA_33777 1

    SBSPON HGLibB_42763 1

    SBSPON HGLibA_42815 1

    SBSPON HGLibA_42816 1

  6. parkapdx

    Here are the first ten lines of the DMSO_14_Res_21_gene_summary.txt as well:

    Gene sgRNA Res|beta Res|z Res|p-value Res|fdr Res|wald-p-value Res|wald-fdr

    OR2C1 6 0.0069309 0.012054 0.73066 0.82313 0.99038 0.99639

    SBSPON 6 -0.58971 -1.1612 0.30736 0.82313 0.24557 0.49254

    RAB23 6 1.1897 4.1765 0.35626 0.82313 2.96E-05 0.00022816

    ACTR10 6 -0.14591 -0.26308 0.67406 0.82313 0.79249 0.99639

    SLC25A43 6 -0.39537 -0.75084 0.40177 0.82313 0.45275 0.77607

    EBF4 6 0.72253 2.4889 0.55527 0.82313 0.012812 0.039274

    FOXN1 6 1.2768 3.095 0.311 0.82313 0.0019681 0.0080094

    PSMD7 6 0.81677 2.068 0.52105 0.82313 0.038642 0.10297

    RPN2 6 -0.14591 -0.26308 0.67406 0.82313 0.79249 0.99639

  7. Johannes Köster

    Thanks. I think I have narrowed it down to the file defined under sgrnas->annotation. It seems to be empty. The reason seems to be that non of your library sequences appears to be found in our annotation database. As a quick workaround, you can comment out the line annotation: sgrnas.bed in your vispr.yaml.

  8. Johannes Köster

    I have just released version 0.4.13 of VISPR that should be able to deal with empty bed files. If you want, please try and let me know if it works.

  9. parkapdx

    Hi Johannes,

    You got it! I commented out the annotation: sgrnas.bed line in all vispr.yaml files, and I was able to successfully run VISPR and display the results.

    I updated VISPR to 0.4.13 and removed the comments. No errors were generated.

    Thank you for all the help!

    Andrew

  10. Log in to comment