Closed Ujomo closed 8 months ago
Hi,
thank you for trying the tool. I see the problem now. After cloning the repository, you should be working inside (in folder, where documentation and other files are located). Then, you should import COGtools, not "cogtools", because "COGtools" is the folder where source code is located. I will fix this also in the documentation. Sorry for the inconvenience.
Thanks a lot! it worked. It imported the COGtools.
If I may ask a follow up question. While running the script I get a ValueError: substring not found, and it points to the line of COGtools.em_processor in my script and the line 32 in em_processor, seq_id = record [0: record.index(" [")]
Thank you for reporting the problem. The code should be fixed now, soon I will add changes to the documentation.
Hello, First of, I am very new to python coding so my question may seem very elementary. When I try to run my python script following the usage example in the COGtools documentation I get an AttributeError: module 'cogtools' has no attribute 'em_processor'. Find below the script. Please what have I missed out?
import cogtools organism_name = "pseudomonas" eggnog_file = "inputs/pseudomonas_eggnog.gff" operon_file_gff = "inputs/pseudomonas_orf_operon.txt" operon_file_cog = "inputs/pseudomonas_cog_operon.txt" batch_file = "inputs/pseudomonas_batch.txt"
fasta_file = "inputs/pseudomonas.fasta" CDS_file = "inputs/pseudomonas_cds.txt" gff_file = "inputs/pseudomonas.gff3" cogtools.em_processor(organism_name, em_file=eggnog_file, cds_file=CDS_file, output_dir = "outputs") cogtools.om_processor(organism_name, operon_file_gff, operon_file_cog, output_dir = "outputs") cogtools.batch_processor(organism_name, batch_file, output_dir = "outputs") cogtools.consensus(organism_name, outputdir + "/em" + organism_name + ".gff", outputdir + "/om" + organism_name + ".gff", outputdir + "/batch" + organism_name + ".gff", fasta_file=fasta_file, get_pseudo=True, gff_file=gff_file, get_ncrna=True, cat_choice=1, output_dir = "outputs")