Skip to content

keyERROR  #137

Description

@mengyuan09876

To run enrichment, I made a metadata table, but I always encounter keyerror problems. Could you tell me the correct metadata table template? thanks
here is the error"
[2023-12-27 15:12:16 PM] INFO: Command: /home/stefano/programs/anaconda3/envs/mamba/envs/enrichm/bin/enrichm enrichment --annotation_matrix ./merged_data_chao.txt --metadata metadatachao.txt --output ./enrichm_enrichment_ko/ --force
[2023-12-27 15:12:16 PM] INFO: Running the enrichment pipeline
[2023-12-27 15:12:16 PM] INFO: Parsing annotation matrix
[2023-12-27 15:12:16 PM] INFO: Parsing metadata: metadatachao.txt
[2023-12-27 15:12:16 PM] INFO: Comparing sets of genomes
[2023-12-27 15:12:16 PM] INFO: Comparing gene frequency among groups: Group, UP
[2023-12-27 15:12:16 PM] INFO: enrichment statistics not possible with only one genome to compare
[2023-12-27 15:12:16 PM] INFO: See prevalence matrix for unique genes in groups
[2023-12-27 15:12:16 PM] INFO: Comparing gene over-representation among genomes
[2023-12-27 15:12:16 PM] INFO: Testing over-representation using Z score test
Traceback (most recent call last):
File "/home/stefano/programs/anaconda3/envs/mamba/envs/enrichm/bin/enrichm", line 351, in
run.run_enrichm(args, sys.argv)
File "/home/stefano/programs/anaconda3/envs/mamba/envs/enrichm/lib/python3.6/site-packages/enrichm/run.py", line 416, in run_enrichm
pipeline(args)
File "/home/stefano/programs/anaconda3/envs/mamba/envs/enrichm/lib/python3.6/site-packages/enrichm/run.py", line 335, in run_enrichment
args.output)
File "/home/stefano/programs/anaconda3/envs/mamba/envs/enrichm/lib/python3.6/site-packages/enrichm/enrichment.py", line 438, in enrichment_pipeline
results = test.test_pipeline(attribute_dict)
File "/home/stefano/programs/anaconda3/envs/mamba/envs/enrichm/lib/python3.6/site-packages/enrichm/enrichment.py", line 728, in test_pipeline
gene_count = self.gene_frequencies(*combination, True)
File "/home/stefano/programs/anaconda3/envs/mamba/envs/enrichm/lib/python3.6/site-packages/enrichm/enrichment.py", line 598, in gene_frequencies
freq)
File "/home/stefano/programs/anaconda3/envs/mamba/envs/enrichm/lib/python3.6/site-packages/enrichm/enrichment.py", line 569, in count
if annotation in self.genome_annotations[genome]:
KeyError: 'ID'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions