BioSina / Panakeia

Prokaryotic Pangenome Analysis
GNU General Public License v3.0
24 stars 3 forks source link

Panakeia.py: FileNotFoundError #4

Closed nicola-palmieri closed 11 months ago

nicola-palmieri commented 1 year ago

Hello

I have started testing Panakeia on a set of 59 Ornithobacterium isolates. Here is my protocol:

cd panakeia-output python ../Panakeia/PangenomeAnalysis/Clustering.py ../fasta-proteins-59isolates.fasta 59 python ../Panakeia/PangenomeAnalysis/Panakeia.py output ../gff-files-59isolates protein_clusters.txt representative_seq.faa

The Panakeia.py scripts reads the strains correctly, but generates an error at the Read GFFs step:

Read GFFs! Traceback (most recent call last): File "/Volumes/Data3/2023/ORT/run1+2/10-panakeia/panakeia-output/../Panakeia/PangenomeAnalysis/Panakeia.py", line 786, in main() File "/Volumes/Data3/2023/ORT/run1+2/10-panakeia/panakeia-output/../Panakeia/PangenomeAnalysis/Panakeia.py", line 772, in main draw_clusters() File "/Volumes/Data3/2023/ORT/run1+2/10-panakeia/panakeia-output/../Panakeia/PangenomeAnalysis/Panakeia.py", line 701, in draw_clusters draw_genomes() File "/Volumes/Data3/2023/ORT/run1+2/10-panakeia/panakeia-output/../Panakeia/PangenomeAnalysis/Panakeia.py", line 758, in draw_genomes nx.writegraphml(straingraph, args.output+"/"+"strain"+s+".graphML") File "/Users/nicola.palmieri/opt/miniconda3/lib/python3.9/site-packages/networkx/utils/decorators.py", line 766, in func return argmap._lazy_compile(__wrapper)(*args, **kwargs) File "<class 'networkx.utils.decorators.argmap'> compilation 5", line 3, in argmap_write_graphml_lxml_1 File "/Users/nicola.palmieri/opt/miniconda3/lib/python3.9/site-packages/networkx/utils/decorators.py", line 189, in _open_file fobj = _dispatch_dict[ext](path, mode=mode) FileNotFoundError: [Errno 2] No such file or directory: 'output/strain_ORT_UMN_88.graphML'

bharat1912 commented 11 months ago

Hi Nicola-Palmieri The error is because Panakeia.py does not create the output dir "outfile" to which the analysis files will be written to. You will need to mkdir outfile (or any other dir of your choice) and include the path to the dir in your CLi.

nicola-palmieri commented 11 months ago

Thanks a lot! That solved the problem!