labgem / PPanGGOLiN

Build a partitioned pangenome graph from microbial genomes
https://ppanggolin.readthedocs.io
Other
229 stars 25 forks source link

ppanggolin projection: ValueError: The region is already with a different spot. #243

Open frdel1 opened 3 weeks ago

frdel1 commented 3 weeks ago

Hi, I am experiencing the following error: ValueError: The region is already with a different spot. A region belongs to only one spot.

version of PPanGGOLiN tested: 2.0.4 and 2.0.5

Steps to reproduce:

# get the following genomes to create the pangenome
datasets download genome accession GCF_901004805.1 GCF_030251365.1 GCF_025534095.1 GCF_002302755.1 GCF_900166295.1 GCF_004317005.1 GCF_030251645.1 GCF_000449085.2 GCF_025532795.1 GCF_002301455.1 GCF_025533195.1 GCF_016093595.1 GCF_900689745.1 GCF_000450445.2 GCF_901006395.1 GCF_004314665.1 GCF_004314105.1 GCF_000450505.2 GCF_022970495.1 GCF_900684135.1 GCF_000530595.1 GCF_900013115.1 GCF_016093815.1 GCF_901004815.1 GCF_004314145.1 GCF_901004845.1 GCF_901006065.1 GCF_900165245.1 GCF_900690395.1 GCF_030250765.1 --include gbff
unzip ncbi_dataset.zip

# create the organism.gbff.list file
# create the pangenome with ppanggolin all
conda activate ppanggolin
ppanggolin all --anno /path/to/organism.gbff.list --cpu 1 --identity 0.8 --output /path/to/output_ppanggolin_all

# get the query genome
curl -s  "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&id=NC_013316&rettype=fasta&retmode=txt" > NC_013316.fa

# run ppanggolin projection
conda activate ppanggolin
ppanggolin projection --pangenome /path/to/pangenome.h5 --cpu 1 --fasta /path/to/NC_013316.fa --identity 0.8 --coverage 0.8 --table --genome_name NC_013316 --output output_ppanggolin_projection_fasta

Are you able to reproduce it ? Is this a bug ? Best wishes

JeanMainguy commented 3 weeks ago

Hi,

Thanks for reporting this bug and providing detailed steps to reproduce it.

We encountered this issue earlier and addressed it in PR #211, but the fix hasn't been released yet. We're planning to release a new version with this and other fixes in the next few days .

I tried your example and could reproduce the error in version 2.0.5, but I confirmed that it doesn't occur anymore in the dev branch.

Best,