metapang search pangenome¶
Match a query against a single species pangenome de Bruijn graph to find which gene
families it contains. This is the read-mapping step of
metapang profile exposed on its own, for one pangenome.
Unlike metapang search bank, which compares MinHash sketches
across a whole collection, this command uses metagraph to look up exact k-mers in
one pangenome graph and report, for each query sequence, the gene-family labels it
matches.
Synopsis¶
metapang search pangenome -q query.fasta.gz -b GTDB_refseq@2.0.0:s__Abiotrophia_defectiva [OPTIONS]
metapang search pangenome -q query.fasta.gz -b local:my_pangenome [OPTIONS]
metapang search pangenome -q query.fasta.gz -g pangenome.dbg -a pangenome.annodbg [OPTIONS]
Inputs¶
The query is required, and the pangenome is given in one of three ways: from
PanGBank, a local pangenome built with metapang cache add, or an explicit local
de Bruijn graph plus its annotations.
-q,--query(required)The query file (fasta/fastq, gzipped accepted), a genome or reads.
-b,--pangbankUse a pangenome from
PanGBank, ascollection[@version]:name(for exampleGTDB_refseq@2.0.0:s__Abiotrophia_defectiva, downloaded and cached on first use), or a local pangenome aslocal:<name>built withmetapang cache add(see Local pangenomes).-g,--dbgA local pangenome de Bruijn graph (the
.dbgfile).-a,--annotationsThe annotations for that graph (the
.annodbgfile).
Note
Give either --pangbank (a PanGBank or local: pangenome), or both --dbg and
--annotations. The --dbg / --annotations pair is the per-pangenome output of
metapang index bank.
Options¶
Option |
Default |
Description |
|---|---|---|
|
|
Threads used by |
|
|
Path to the |
|
|
Output file. Use |
|
Also write a |
Output¶
A TSV produced by metagraph: for each query sequence, the pangenome gene families
(labels) whose k-mers it matches. This is the same per-family mapping that profile
uses internally to derive gene-family coverage.
Annotated graph (--annotate)¶
With --annotate graph.gt, the query result is projected back onto the pangenome
graph: the prebuilt .gt for the species is loaded and each gene family is annotated
with its read and k-mer counts, then saved to the given path. This is the same
annotated graph metapang profile builds internally.
Note
--annotate requires --pangbank (a PanGBank or local: pangenome)
It also needs the query results in a file, so it cannot be combined with
dout`.
Examples¶
# search a genome against one PanGBank pangenome
metapang search pangenome -q genome.fasta.gz \
-b GTDB_refseq@2.0.0:s__Abiotrophia_defectiva -t 8
# search against a local pangenome (built with 'metapang cache add')
metapang search pangenome -q genome.fasta.gz -b local:my_pangenome -o -
# search an explicit dbg / annotations pair and print to stdout
metapang search pangenome -q genome.fasta.gz \
-g s__Abiotrophia_defectiva.dbg -a s__Abiotrophia_defectiva.annodbg -o -