Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Tessa Pierce Ward <[email protected]>
  • Loading branch information
ctb and bluegenes authored Feb 19, 2024
1 parent e564f9c commit 3fce462
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 3 additions & 2 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ The main *drawback* to these plugin commands is that their inputs and outputs ar

## Input file formats

sourmash supports a variety of different storage formats for sketches (see [sourmash docs](https://sourmash.readthedocs.io/en/latest/command-line.html#choosing-signature-output-formats)), and the branchwater plugin works some (but not all) of them. Branchwater _also_ supports an additional database type, a RocksDB-based inverted index, that is not yet supported by sourmash (through v4.8.6).
sourmash supports a variety of different storage formats for sketches (see [sourmash docs](https://sourmash.readthedocs.io/en/latest/command-line.html#choosing-signature-output-formats)), and the branchwater plugin works with some (but not all) of them. Branchwater _also_ supports an additional database type, a RocksDB-based inverted index, that is not yet supported by sourmash (through v4.8.6).

**As of v0.9.0, we recommend using zip files or manifest CSVs whenever you need to provide multiple sketches.**

| command | query input | database format |
| -------- | -------- | -------- |
| `manysketch` | CSV with input fasta/fastq paths (details below) | _produces_ Zip database |
| `gather` | Single metagenome in sig, zip, manifest CSV, or fromfile | Zip, manifest CSV, or fromfile |
| `fastmultigather` | Multiple metagenomes in sig, zip, manifest CSV, or fromfile | Zip, manifest CSV, fromfile, or rocksdb index |
| `manysearch` | Multiple genomes in sig, zip, manifest CSV, or fromfile | Zip, manifest CSV, fromfile, or rocksdb index |
Expand All @@ -29,7 +30,7 @@ sourmash supports a variety of different storage formats for sketches (see [sour

### Using zipfiles

When working with large collections of small sketches such as genomes, we suggest using zipfiles as produced by sourmash (e.g. using `sourmash sig cat`). Zip files have a few nice features:
When working with large collections of small sketches such as genomes, we suggest using zipfiles as produced by sourmash (e.g. using `sourmash sig cat` or `manysketch`). Zip files have a few nice features:

* sketches are compressed in zip files;
* zip files can contain many sketches, including incompatible types (e.g. multiple k-mer sizes);
Expand Down
3 changes: 0 additions & 3 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,6 @@ pub fn load_collection(
};

let collection = collection.or_else(|| {
// dbg!("attempting to load as manifest");
match collection_from_manifest(&sigpath, &report_type) {
Ok(coll) => Some((coll, 0)),
Err(e) => {
Expand All @@ -477,7 +476,6 @@ pub fn load_collection(
});

let collection = collection.or_else(|| {
// dbg!("attempting to load as signature");
match collection_from_signature(&sigpath, &report_type) {
Ok(coll) => Some((coll, 0)),
Err(e) => {
Expand All @@ -488,7 +486,6 @@ pub fn load_collection(
});

let collection = collection.or_else(|| {
// dbg!("attempting to load as pathlist");
match collection_from_pathlist(&sigpath, &report_type) {
Ok((coll, n_failed)) => Some((coll, n_failed)),
Err(e) => {
Expand Down

0 comments on commit 3fce462

Please sign in to comment.