Skip to content

Commit

Permalink
update gh action with new write commands
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanMainguy committed Oct 24, 2023
1 parent e7da676 commit 0ef1c36
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 7 additions & 3 deletions ppanggolin/formats/writeFlatGenomes.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import csv
import random
from tqdm import tqdm

import time

import networkx as nx
from plotly.express.colors import qualitative
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}")
Expand Down Expand Up @@ -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):
"""
Expand Down

0 comments on commit 0ef1c36

Please sign in to comment.