Skip to content

Commit ed77090

Browse files
authored
Update Databases.md
Update ink to extract usage on db page
1 parent c3a961e commit ed77090

1 file changed

Lines changed: 2 additions & 64 deletions

File tree

docs/Databases.md

Lines changed: 2 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ database</td>
427427
</tbody>
428428
</table>
429429

430-
<a id="kaptive-extract"></a>
430+
431431

432432
## Extract
433433

@@ -439,66 +439,4 @@ formats:
439439
- **ffn**: Gene nucleotide sequences in fasta format.
440440
- **faa**: Protein sequences in fasta format.
441441

442-
### Usage
443-
444-
General usage is as follows:
445-
446-
kaptive extract <db> [formats] [options]
447-
448-
Formats:
449-
450-
Note, text outputs accept '-' for stdout
451-
452-
--fna [] Convert to locus nucleotide sequences in fasta format
453-
Accepts a single file or a directory (default: cwd)
454-
--ffn [] Convert to locus gene nucleotide sequences in fasta format
455-
Accepts a single file or a directory (default: cwd)
456-
--faa [] Convert to locus gene protein sequences in fasta format
457-
Accepts a single file or a directory (default: cwd)
458-
459-
<a id="database-options"></a>
460-
461-
Database options:
462-
463-
--locus-regex Python regular-expression to match locus names in db source note
464-
--type-regex Python regular-expression to match locus types in db source note
465-
--filter Python regular-expression to select loci to include in the database
466-
467-
!!! note
468-
These options are useful for customising the database to your needs,
469-
for example, to include only a subset of loci or to change the way
470-
locus names and types are parsed from the source note.
471-
472-
473-
Other options:
474-
475-
-V, --verbose Print debug messages to stderr
476-
-v , --version Show version number and exit
477-
-h , --help Show this help message and exit
478-
479-
For example, to extract the gene nucleotide sequences from the
480-
*Klebsiella pneumoniae* K locus primary reference database in fasta
481-
format, run:
482-
483-
kaptive extract kp_k --fna k_loci.fna
484-
485-
To extract all protein sequences from KL1 and KL2, run either one of the
486-
following:
487-
488-
kaptive extract kp_k --filter "^KL(1|2)$" --faa KL1_KL2_proteins.faa
489-
kaptive extract kp_k --filter "^KL(1|2)$" --faa - > KL1_KL2_proteins.faa
490-
491-
To do the same but output each locus to a separate file, run either:
492-
493-
kaptive extract kp_k --filter "^KL(1|2)$" --faa
494-
kaptive extract kp_k --filter "^KL(1|2)$" --faa protein_files/
495-
496-
Which would create two files: `KL1.faa` and `KL2.faa`.
497-
498-
> kaptive assembly kpsc_k assembly.fasta -j kaptive_results.json
499-
500-
!!! warning
501-
It is possible to write **all** text formats (`fna`, `faa` and `ffn`)
502-
to the same file (including stdout), however this is not recommended
503-
for downstream analysis.
504-
442+
See [here](Usage.md#kaptive-extract) for usage instructions.

0 commit comments

Comments
 (0)