Repository navigation
Read PPanGGOLiN, PanTA and PIRATE; write an Rtab and rescued sequences; cache searches; faster large runs - #20
Merged
Merged
Conversation
…quences, and cache searches Recore now reads PPanGGOLiN output, PanTA output (whose sample-contig-gene IDs never matched a GFF, so synteny validated nothing) and PIRATE's own gene family table, writes the corrected matrix as an Rtab, and with --write-rescued-fasta the rescued genes as nucleotide and protein FASTA. --search-cache keeps minimap2's results between runs, with byte-identical outputs. Measuring at scale showed the search is the smaller part of a large run, so the synteny block table, synteny validation, GFF loading and the stop scan now run in parallel: 200 genomes went from 16 to 7 seconds and from 3.3 to 0.8 GB, with identical outputs.
Its list of output files now includes the corrected Rtab.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two items from the review of what Recore still lacks: fitting into what comes after it, and iterating at scale.
Downstream
gene_presence_absence_recore.Rtab: the corrected matrix as 1/0 in Panaroo's Rtab layout, written in the same pass as the CSV, so they cannot disagree. This is what pyseer and most R code read.--write-rescued-fasta:rescued_genes.fnaand.faahold every cell the matrix gained, read in the gene's direction and translated with table 11 from the phase the alignment fixes, under the corrected GFF's feature IDs. The proteins match an independent translation, and the minus strand, phase and unknown frame have tests.matrix.csvand family FASTA already worked.sample-contig-gene, so no cell matched a GFF: synteny validated nothing and no rescue reached the matrix. They match now (0 to 2 corrections, the two planted).PIRATE.gene_families.tsvis read into Panaroo's layout, its representative headers (family;key=...) are resolved, and its fission notation(a:b)(taken from itslink_clusters.pl) is understood.PIRATE_to_roary.ploutput names rowsallele__familyand cannot be used.Scale
--search-cache DIRkeeps minimap2's final hits per genome. They are keyed by the genome's bytes, the query sequence's hash, the settings that change a hit (preset, base-level alignment, secondary budget,--min-identity) and the minimap2 and recore versions.cluster_synteny_blocks.tsv, which held every cluster's blocks in memory in one thread, is built in parallel chunks and streamed, byte for byte the same file.benchmarks/search_scaling.pyand its table: MTBC-sized synthetic genomes (4.9 Mb, 4,000 genes, 80 gaps each), 8 threads:Checked by running it
-D warnings, 196 library tests, 4 integration tests with minimap2 required,mkdocs build --strict..Rtab.