TF-Chan-Lab / panGraphViewer

Show pangenome graphs in an easy way
MIT License
53 stars 5 forks source link

gfa2rGFA.py caused KeyError: '1779060' #11

Open mictadlo opened 3 months ago

mictadlo commented 3 months ago

Hi I failed to convert GFA (created by nf-core/pangenome) to rGFA with gfa2rGFA.py script from this project.

> cat panGraphViewer/panGraphViewerWeb/requirements.txt 
Django==3.1.3
django-bootstrap4==22.1
requests==2.28.1
django-environ==0.9.0
djangorestframework==3.13.1
configparser==5.2.0
natsort==8.1.0
networkx==2.6.3
fontawesome-free==5.15.0
bokeh==2.2.3
dna_features_viewer==3.1.1
pysam==0.19.1
pandas==1.3.5
whitenoise==6.2.0
jinja2==3.0.0
numpy==1.21.6
biopython==1.79
matplotlib==3.5.2
sqlparse==0.4.2
tornado==6.2
> python panGraphViewer/panGraphViewerWeb/pangraphviewer/gfa2rGFA.py -in_gfa chnVSjapVSkorVSauVSusa.PanSN-1-19.fasta.gz.gfaffix.unchop.Ygs.view.gfa -out_rgfa chnVSjapVSkorVSauVSusa.PanSN-1-19.fasta.gz.gfaffix.unchop.Ygs.view.rgfa
2024-08-30 12:36:12,345 [INFO] The input file is in GFA1 format and we are converting it to rGFA. Please wait!
Traceback (most recent call last):
  File "/mnt/weka/scratch/waterhouse_team/gfa/panGraphViewer/panGraphViewerWeb/pangraphviewer/gfa2rGFA.py", line 241, in <module>
    run.convert()
  File "/mnt/weka/scratch/waterhouse_team/gfa/panGraphViewer/panGraphViewerWeb/pangraphviewer/gfa2rGFA.py", line 139, in convert
    S[newId] = {'seq':rev_comp(S[nodeId]['seq']),'len':S[nodeId]['len']}
KeyError: '1779060'

What did I miss?

rickyma1 commented 5 days ago

Sorry for replying late. Based on the error messages, some nodeId used in path cannot be found. Please check if all nodeId can be found in "S-line".