Skip to content

Error while converting obo file to owl #12

Description

@hrshdhgd

I am trying to convert an obo file (ncbigene.obo) into owl format. This obo file was obtained via pyobo. Code for pyobo is irrelevant here but for the sake of reproducibility:

    from pyobo.sources.ncbigene import get_obo
    obo_file = get_obo()
    obo_file.write_obo(output_path, use_tqdm=True)

When I run the following:

    obo_doc = fastobo.load(input)
    if "default-namespace" not in obo_doc.header:
        obo_doc.header.insert(99, fastobo.header.DefaultNamespaceClause("NCBIGene"))
    if output_format == "owl":
        fastobo.dump_owl(obo_doc, output_path, format="ofn")

I get :

Traceback (most recent call last):
  ...
.../cli.py", line 100, in convert
    obo_doc = fastobo.load(input)
  File "<stdin>", line 203348962
    def: "\\Probable U2 small nuclear ribonucleoprotein B\\\\\\" []
         ^
SyntaxError: expected QuotedString

Would it be possible for fastobo to handle strings like these?

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions