diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 49682796..fb7d043c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -67,7 +67,8 @@ jobs: ppanggolin spot -p stepbystep/pangenome.h5 --spot_graph --overlapping_match 2 --set_size 3 --exact_match_size 1 ppanggolin draw -p stepbystep/pangenome.h5 --draw_spots -o stepbystep -f ppanggolin module -p stepbystep/pangenome.h5 --transitive 4 --size 3 --jaccard 0.86 --dup_margin 0.05 - ppanggolin write_pangenome -p stepbystep/pangenome.h5 --output stepbystep -f --soft_core 0.9 --dup_margin 0.06 --gff --proksee --gexf --light_gexf --csv --Rtab --projection --stats --partitions --compress --json --regions --spots --borders --families_tsv --cpu 1 --fasta organisms.fasta.list --gff --proksee + ppanggolin write_pangenome -p stepbystep/pangenome.h5 --output stepbystep -f --soft_core 0.9 --dup_margin 0.06 --gexf --light_gexf --csv --Rtab --stats --partitions --compress --json --regions --spots --borders --families_tsv --cpu 1 + ppanggolin write_genomes -p stepbystep/pangenome.h5 --output stepbystep -f --fasta organisms.fasta.list --gff --proksee --table ppanggolin fasta -p stepbystep/pangenome.h5 --output stepbystep -f --prot_families all --gene_families shell --regions all --fasta organisms.fasta.list --gff --proksee ppanggolin draw -p stepbystep/pangenome.h5 --draw_spots --spots all -o stepbystep -f ppanggolin metrics -p stepbystep/pangenome.h5 --genome_fluidity --info_modules --no_print_info -f --log metrics.log diff --git a/ppanggolin/formats/writeFlatGenomes.py b/ppanggolin/formats/writeFlatGenomes.py index c842de4b..7a8c15fc 100644 --- a/ppanggolin/formats/writeFlatGenomes.py +++ b/ppanggolin/formats/writeFlatGenomes.py @@ -16,7 +16,7 @@ import csv import random from tqdm import tqdm - +import time import networkx as nx from plotly.express.colors import qualitative @@ -44,7 +44,7 @@ def count_neighbors_partitions(gene_family:GeneFamily): nb_pers = 0 nb_shell = 0 nb_cloud = 0 - + for neighbor in gene_family.neighbors: if neighbor.named_partition == "persistent": nb_pers += 1 @@ -374,7 +374,8 @@ def write_flat_genome_files(pangenome: Pangenome, output: Path, cpu: int = 1, contig_to_rgp[rgp.contig].append(rgp) rgp_to_spot_id = {rgp:f"spot_{spot.ID}" for spot in pangenome.spots for rgp in spot.regions} - + start_writing = time.time() + for organism in tqdm(pangenome.organisms, total=pangenome.number_of_organisms, unit="organism", disable=disable_bar): logging.getLogger("PPanGGOLiN").debug(f"Writing genome annotations for {organism.name}") @@ -408,6 +409,9 @@ def write_flat_genome_files(pangenome: Pangenome, output: Path, cpu: int = 1, write_org_file(org=organism, output=org_outdir, compress=compress, add_regions=needRegions, add_modules=needModules, add_spots=needSpots) + writing_time = time.time() - start_writing + logging.getLogger("PPanGGOLiN").debug(f"writing_time for {pangenome.number_of_organisms} genomes: {writing_time} seconds") + def launch(args: argparse.Namespace): """