mgalardini / pyseer

SEER, reimplemented in python 🐍🔮
http://pyseer.readthedocs.io
Apache License 2.0
109 stars 27 forks source link

Error in annotate_hits_pyseer #208

Closed nicola-palmieri closed 2 years ago

nicola-palmieri commented 2 years ago

Dear author

I am annotating a set of significant unitigs following the manual: https://pyseer.readthedocs.io/en/master/usage.html#annotating-k-mers.

When I run

annotate_hits_pyseer significant_unitigs.txt references.txt significant_unitigs-annotated.txt

I get this error:

14004 kmers remain
Reference 1
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `gff2bed < ../../../../3-annotation/avian-ecoli-genomes-clean-2024-prokka-gff/1623_APEC_O1.gff > /Users/nicola.palmieri/My Drive/Ecoli_APEC/6-pyseer/lmm-mode (1)/01-untigs/FDR-0.05/9kztdcft'
Traceback (most recent call last):
  File "/Users/nicola.palmieri/opt/anaconda3/bin/annotate_hits_pyseer", line 10, in <module>
    sys.exit(main())
  File "/Users/nicola.palmieri/opt/anaconda3/lib/python3.9/site-packages/pyseer/kmer_mapping/annotate_hits.py", line 136, in main
    subprocess.run("gff2bed < " + ref_gff + " > " + tmp_bed.name, shell=True, check=True)
  File "/Users/nicola.palmieri/opt/a
[input-files.zip](https://github.com/mgalardini/pyseer/files/8852318/input-files.zip)
naconda3/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'gff2bed < ../../../../3-annotation/avian-ecoli-genomes-clean-2024-prokka-gff/1623_APEC_O1.gff > /Users/nicola.palmieri/My Drive/Ecoli_APEC/6-pyseer/lmm-mode (1)/01-untigs/FDR-0.05/9kztdcft' returned non-zero exit status 2.

I have bedtools installed and working. Also, the gff2bed command is working by itself. I have attached the input files and an example of the annotation file generated by PROKKA.

Thank you! Nicola

johnlees commented 2 years ago

I think gff2bed is not liking the path to the references. Can I suggest that you symlink them in the working directory, and give links to these without the full path in front

nicola-palmieri commented 2 years ago

Thank you! I will try that.

mgalardini commented 2 years ago

I think the linked PR solves the issue, so we could push a new version if there's any other change planned