Skip to content

ValueError: bad delimiter value in CM.to_csv #4

Description

@russibc

Problem Description:

When running the following command:

algpred2 -i input_test.fa

input_test.fa content:

>test1
HIPSLEKPLQQQPLPLQQILWYQQQQPIQQQPQPFPQQPPCSQQQQPPLSQQQQPPFSQQQPPFSQQQQPILPQQPPFSQQQQQFPQQQQPLLPQQPPFSQQQPPFSQQQQQPPFSQQQQQPILLQQPPFSQHQQPVLPQQQIPSVQPSILQQLNPCKVFLQQQCSPVAMPQSLARSQMLWQSSCHVMQQQCCRQLPQIPEQSRYDAIRAIIYSIVLQEQQHGQGLNQPQQQQPQQSVQGVSQPQQQQKQLGQCSFQQPQQ
>test2
MAVPQNRVTRSRRNMRRAHDALVAANPASCPNCGELKRPHHVCGACGHYDDREVVAQAAEVDLDDDAA
>test3
TPTGQIHWGNLSKIGVVGIGSASYKVMTRSSHQSLVIKLMPNITLLNNATRVEIAEYRRLLRTVLEPIRDALNAMTQNIRPVQSV
>test4
MGVFNYEVETPSVISAARLFKSYVLDGDKLIPKVAPQAITSVENVGGNGGPGTIKNITFGEGSRYKYVKERVDEVDNTNFKYSYTVIEGDVLGDKLEKVCSELKIVAAPGGGSTLKISSKFHAKGDHEINAEEMKGAKEMAEKLLRAVETYLLAHSAEYN
>test5
MKLLILALTCAAAVWARPGETYSDKYDTIDVNEVLQSERLLKGYVECLLDKGRCTPDGKELKDTLPDALEHECSKCTEKQKSGADTVIRHLVNKRPELWKELAVKYDPENIYQERYKDRLESVKEH

The program crashes with the following traceback:

##############################################################################
# The program AlgPred2.0 is developed for predicting allergenic and non allergenic #
# protein from their primary sequence, developed by Prof G. P. S. Raghava's group. #
# ############################################################################
Summary of Parameters:
Input File:  input_test.fa ; Model:  1 ; Threshold:  0.3
Output File:  outfile.csv ; Display:  1
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\User\AppData\Local\Programs\Python\Python313\Scripts\algpred2.exe\__main__.py", line 7, in <module>
    sys.exit(main())
             ~~~~^^
  File "C:\Users\User\AppData\Local\Programs\Python\Python313\Lib\site-packages\algpred2\python_scripts\algpred2.py", line 299, in main
    CM.to_csv("Sequence_1",header=False,index=None,sep="\n")
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\AppData\Local\Programs\Python\Python313\Lib\site-packages\pandas\util\_decorators.py", line 333, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\User\AppData\Local\Programs\Python\Python313\Lib\site-packages\pandas\core\generic.py", line 3967, in to_csv
    return DataFrameRenderer(formatter).to_csv(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        path_or_buf,
        ^^^^^^^^^^^^
    ...<14 lines>...
        storage_options=storage_options,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "C:\Users\User\AppData\Local\Programs\Python\Python313\Lib\site-packages\pandas\io\formats\format.py", line 1014, in to_csv
    csv_formatter.save()
    ~~~~~~~~~~~~~~~~~~^^
  File "C:\Users\User\AppData\Local\Programs\Python\Python313\Lib\site-packages\pandas\io\formats\csvs.py", line 260, in save
    self.writer = csvlib.writer(
                  ~~~~~~~~~~~~~^
        handles.handle,
        ^^^^^^^^^^^^^^^
    ...<5 lines>...
        quotechar=self.quotechar,
        ^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
ValueError: bad delimiter value

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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