Skip to content

Commit f04dd1c

Browse files
committed
some tutorial updates
1 parent fa943d8 commit f04dd1c

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

docs/decision_record.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ The POST body for the local comparison is a "level 2" sequence collection, like
541541

542542
### Rationale
543543

544-
We wanted to stick with the REST guideline of noun endpoints with GET that describe what you are retrieving. As recommended in the [service-info specification](https://github.com/ga4gh-discovery/ga4gh-service-info#how-do-i-describe-a-service-implementing-multiple-specifications), a prefix, like `/seqcol/...` could be added by a service that implemented multiple specifications, but this kind of namespace it outside the scope of the specification itself. We considered doing `/{digest1}/compare/{digest2}` and that would have been fine. In the end we liked the symmetry of `/comparison` and `/collection` as parallel endpoints. For the retrieval endpoint we considered `/secol` or `/sequence-collection` or `/seqCol`, but wanted to keep structure parallel to the refget `/sequence` endpoint.
544+
We wanted to stick with the REST guideline of noun endpoints with GET that describe what you are retrieving. As recommended in the [service-info specification](https://github.com/ga4gh-discovery/ga4gh-service-info#how-do-i-describe-a-service-implementing-multiple-specifications), a prefix, like `/seqcol/...` could be added by a service that implemented multiple specifications, but this kind of namespace it outside the scope of the specification itself. We considered doing `/{digest1}/compare/{digest2}` and that would have been fine. In the end we liked the symmetry of `/comparison` and `/collection` as parallel endpoints. For the retrieval endpoint we considered `/seqcol` or `/sequence-collection` or `/seqCol`, but wanted to keep structure parallel to the refget `/sequence` endpoint.
545545

546546
### Limitations
547547

docs/digest_from_fasta.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,32 @@
11

2-
# Digest from fasta
2+
# Compute a seqcol digest given a sequence collection
33

4-
One of the most common uses of the seqcol specification is to compute a standard, universal identifier from a FASTA file.
4+
One of the most common uses of the seqcol specification is to compute a standard, universal identifier for a particular sequence collection. There are two ways to approach this: 1. Using an existing implementation; 2. Implement the seqcol digest algorithm yourself (it's not that hard).
55

6-
We are working on defining the final algorithm. This page is a placeholder for once the algorithm is defined.
6+
## 1. Using existing implementations
7+
8+
### Reference implementation in Python
9+
10+
If working from within Python, you can use the reference implementation like this:
11+
12+
1. Install the seqcol package with some variant of `pip install seqcol`.
13+
2. Build up your canonical seqcol object
14+
3. Compute its digest:
15+
16+
```
17+
seqcol.digest(seqcol_obj)
18+
```
19+
20+
21+
22+
#### From a Canonical Sequence Collection
23+
24+
If you have a sequence collection in canonical structure, you can get its digest like this:
25+
26+
27+
28+
```
29+
import seqcol
30+
31+
seqcol.digest()
732

0 commit comments

Comments
 (0)