Skip to content

Commit

Permalink
MRG: fix README code blocks (#54)
Browse files Browse the repository at this point in the history
* fix README

* fix more

* fix more

* fix more

* fix more

* fix more

* fix more

* fix more

* fix more

* fix more

* fix more

* upd plots too
  • Loading branch information
ctb authored Sep 17, 2024
1 parent 54e5cb9 commit e74f8bf
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ in format; it must contain at least two columns, one named `category`,
but can contain more as long as `category` is provided.

The simplest possible categories CSV format is shown in
[10sketches-categories.csv](examples/10sketches-categories.csv), and
[10sketches-categories.csv](examples/sketches/10sketches-categories.csv), and
it contains two columns, `label` and `category`. When this file is
loaded, `label` is matched to the name of each point/row/column, and
that point is then assigned that category.
Expand Down Expand Up @@ -122,11 +122,11 @@ Compare 3 sketches with `sourmash compare`, and cluster.

This command:
```
sourmash compare sketches/{2,47,63}.sig.zip -o 3sketches.cmp
sourmash compare sketches/{2,47,63}.sig.zip -o 3sketches.cmp \
--labels-to 3sketches.cmp.labels_to.csv
sourmash scripts plot2 3sketches.cmp 3sketches.cmp.labels_to.csv \
-o examples/plot2.3sketches.cmp.png
-o plot2.3sketches.cmp.png
```

produces this plot:
Expand All @@ -139,11 +139,11 @@ Compare 3 sketches with `sourmash compare`, cluster, and show a cut point.

This command:
```
sourmash compare sketches/{2,47,63}.sig.zip -o 3sketches.cmp
sourmash compare sketches/{2,47,63}.sig.zip -o 3sketches.cmp \
--labels-to 3sketches.cmp.labels_to.csv
sourmash scripts plot2 3sketches.cmp 3sketches.cmp.labels_to_csv \
-o examples/plot2.cut.3sketches.cmp.png \
sourmash scripts plot2 3sketches.cmp 3sketches.cmp.labels_to.csv \
-o plot2.cut.3sketches.cmp.png \
--cut-point=1.2
```

Expand Down Expand Up @@ -180,13 +180,13 @@ Use MDS to display a comparison generated by `sourmash compare`.

These commands:
```
sourmash compare sketches/{2,47,48,49,51,52,53,59,60}.sig.zip \
sourmash compare sketches/{2,47,48,49,51,52,53,59,60,63}.sig.zip \
-o 10sketches.cmp \
--labels-to 10sketches.cmp.labels_to.csv
sourmash scripts mds 10sketches.cmp 10sketches.cmp.labels_to.csv \
-o mds.10sketches.cmp.png \
-C 10sketches-categories.csv
-C sketches/10sketches-categories.csv
```

produces this plot:
Expand All @@ -206,13 +206,13 @@ produces a dense numpy matrix.

These commands:
```
sourmash sig cat sketches/{2,47,48,49,51,52,53,59,60}.sig.zip \
sourmash sig cat sketches/{2,47,48,49,51,52,53,59,60,63}.sig.zip \
-o 10sketches.sig.zip
sourmash scripts pairwise 10sketches.sig.zip -o 10sketches.pairwise.csv
sourmash scripts mds 10sketches.cmp \
-o mds.10sketches.cmp.png \
-C 10sketches-categories.csv
sourmash scripts mds2 10sketches.pairwise.csv \
-o mds2.10sketches.cmp.png \
-C sketches/10sketches-categories.csv
```

produces this plot:
Expand All @@ -231,7 +231,7 @@ into a categories CSV that can be used to color points and columns/rows.
These commands:
```
# generate pairwise comparison
sourmash scripts pairwise 64sketches.sig.zip -o 64sketches.pairwise.csv \
sourmash scripts pairwise sketches/64sketches.sig.zip -o 64sketches.pairwise.csv \
--write-all
# generate clusters
Expand All @@ -256,7 +256,7 @@ command displays a comparison generated by `sourmash compare`.
These commands:

```
sourmash compare 64sketches.sig.zip -o 64sketches.cmp \
sourmash compare sketches/64sketches.sig.zip -o 64sketches.cmp \
--labels-to 64sketches.cmp.labels_to.csv
sourmash scripts tsne 64sketches.cmp 64sketches.cmp.labels_to.csv \
Expand All @@ -275,7 +275,7 @@ produce this plot:
These commands:

```
sourmash scripts pairwise 64sketches.sig.zip -o 64sketches.pairwise.csv \
sourmash scripts pairwise sketches/64sketches.sig.zip -o 64sketches.pairwise.csv \
--write-all
sourmash scripts tsne2 64sketches.pairwise.csv \
Expand All @@ -297,13 +297,13 @@ Convert the sparse comparison CSV (created using the
These commands:
```
# build pairwise
sourmash sig cat sketches/{2,47,48,49,51,52,53,59,60}.sig.zip \
sourmash sig cat sketches/{2,47,48,49,51,52,53,59,60,63}.sig.zip \
-o 10sketches.sig.zip
sourmash scripts pairwise 10sketches.sig.zip -o 10sketches.pairwise.csv
# convert pairwise
sourmash scripts pairwise_to_matrix 10sketches.pairwise.csv \
-o 10sketches.pairwise.cmp --write-all \
-o 10sketches.pairwise.cmp \
--labels-to 10sketches.pairwise.cmp.labels_to.csv
# plot!
Expand All @@ -324,12 +324,12 @@ offers some nice visualization options.

These commands:
```
sourmash compare sketches/{2,47,48,49,51,52,53,59,60}.sig.zip \
sourmash compare sketches/{2,47,48,49,51,52,53,59,60,63}.sig.zip \
-o 10sketches.cmp \
--labels-to 10sketches.cmp.labels_to.csv
sourmash scripts plot3 10sketches.cmp 10sketches.cmp.labels_to.csv \
-o plot3.10sketches.cmp.png -C 10sketches-categories.csv
-o plot3.10sketches.cmp.png -C sketches/10sketches-categories.csv
```

produce this plot:
Expand All @@ -344,15 +344,15 @@ category coloring on rows and columns.

These commands:
```
sourmash sig cat sketches/{2,47,48,49,51,52,53,59,60}.sig.zip \
sourmash sig cat sketches/{2,47,48,49,51,52,53,59,60,63}.sig.zip \
-o 10sketches.sig.zip
sourmash scripts manysearch 10sketches.sig.zip \
sketches/shew21.sig.zip -o 10sketches.manysearch.csv
sourmash scripts clustermap1 10sketches.manysearch.csv \
-o clustermap1.10sketches.png \
-u containment -R 10sketches-categories.csv
-u containment -R sketches/10sketches-categories.csv
```

produce:
Expand Down
Binary file modified examples/plot2.cut.10sketches.cmp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/tsne.64sketches.cmp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/tsne2.64sketches.cmp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e74f8bf

Please sign in to comment.