marschall-lab / gaftools

General purpose utility related to GAF files
https://gaftools.readthedocs.io/
MIT License
11 stars 0 forks source link

can not found gfa_sort function in sort.py #2

Closed sdws1983 closed 1 year ago

sdws1983 commented 1 year ago

Hi,

I installed gaftools according to the process and tried to index, but found the following error:

$ gaftools index t.gaf t.gfa
Traceback (most recent call last):
  File "/share/home/miniconda3/envs/podman/bin/gaftools", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/share/home/software/gaftools/gaftools/__main__.py", line 88, in main
    module.main(args)
  File "/share/home/software/gaftools/gaftools/cli/index.py", line 206, in main
    run(**vars(args))
  File "/share/home/software/gaftools/gaftools/cli/index.py", line 24, in run
    from gaftools.cli.sort import gfa_sort
ImportError: cannot import name 'gfa_sort' from 'gaftools.cli.sort' (/share/home/software/gaftools/gaftools/cli/sort.py)

How to solve?

Thanks

samarendra-pani commented 1 year ago

Hello,

I added the script for gfa sorting in the new commit. Give the indexing a try with the latest commit.

Regards, Samarendra

sdws1983 commented 1 year ago

Hi Samarendra,

Thanks for your help, now I can run indexing without the above errors. But what bothers me now is how to obtain the rgfa format file. I tried to use the vg convert command but the gfa obtained does not contain the rgfa tags. I would like to ask how you generally convert it.

Many Thanks!

Yumin

colindaven commented 1 year ago

minigraph is the most well known tool to create rGFA format pangenomes.

I maintain a list of software here, as there are other tools which do this too.

https://github.com/colindaven/awesome-pangenomes

samarendra-pani commented 1 year ago

A GFA to rGFA converter seems like a good idea. This toolkit was developed keeping the HPRC minigraph rGFA in mind. But it makes sense to make a GFA to rGFA converter to allow a broader range of utility. The converter might already exist as part of gfatools (not sure).