ryanmelnyk / PyParanoid

Rapid and scalable homolog identification for bacterial genomes
MIT License
32 stars 7 forks source link

IdentifyOrthologs requires prop_strainlist.txt and prop_homolog.faa #10

Open tylerhelmann opened 3 years ago

tylerhelmann commented 3 years ago

A quick note:

IdentifyOrthologs.py will not work if only BuildGroups.py has been run, it requires BuildGroups.py + PropagateGroups.py. Specifically, the input files prop_strainlist.txt and prop_homolog.faa are required. A workaround is to create empty files with those names.

IdentifyOrthologs.py test_db test_ortho

1.

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/IdentifyOrthologs.py", line 250, in <module>
    main()
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/IdentifyOrthologs.py", line 216, in main
    strains = get_strains()
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/IdentifyOrthologs.py", line 195, in get_strains
    [strains.append(s) for s in [line.rstrip() for line in open(os.path.join(outdir,"prop_strainlist.txt"))]]
FileNotFoundError: [Errno 2] No such file or directory: '/Users/tylerhelmann/Documents/test_db/prop_strainlist.txt'

2.

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/IdentifyOrthologs.py", line 250, in <module>
    main()
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/IdentifyOrthologs.py", line 240, in main
    get_orthos(orthos,strains)
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/IdentifyOrthologs.py", line 79, in get_orthos
    for seq in SeqIO.parse(open(os.path.join(outdir,"prop_homolog.faa"),'r'),'fasta'):
FileNotFoundError: [Errno 2] No such file or directory: '/Users/tylerhelmann/Documents/test_db/prop_homolog.faa'

Fix:

touch test_db/prop_strainlist.txt test_db/prop_homolog.faa