Skip to content

Commit

Permalink
feat(website): add redirects to docs and add search sequences docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoran-chen committed Nov 3, 2024
1 parent 34a505f commit 8e4dd94
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export default defineConfig({
label: 'For users',
items: [
{ label: 'Introduction', link: '/for-users/introduction/' },
{ label: 'Search sequences', link: '/for-users/search-sequences/' },
{ label: 'Edit account', link: '/for-users/edit-account/' },
{ label: 'Create and manage groups', link: '/for-users/create-manage-groups/' },
{ label: 'Submit sequences', link: '/for-users/submit-sequences/' },
Expand Down
33 changes: 33 additions & 0 deletions docs/src/content/docs/for-users/search-sequences.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: Search sequences
---

## Mutations

### Nucleotide mutations and insertions

A nucleotide mutation has the format `<position><base>` or `<base_ref><position><base>`. A `<base>` can be one of the four nucleotides `A`, `T`, `C`, and `G`. It can also be `-` for deletion and `N` for unknown. For example if the reference sequence is `A` at position 23 both: `23T` and `A23T` will yield the same results.

If your organism is multi-segmented you must append the name of the segment to the start of the mutation, e.g. `S:23T` and `S:A23T` for a mutation in segment `S`.

Insertions can be searched for in the same manner, they just need to have `ins_` appended to the start of the mutation. Example `ins_10462:A` or if the organism is multi-segmented `ins_S:10462:A`.

### Amino acid mutations and insertions

An amino acid mutation has the format `<gene>:<position><base>` of `<gene>:<base_ref><position><base>`. A `<base>` can be one of the 20 amino acid codes. It can also be `-` for deletion and `X` for unknown. Example: `E:57Q`.

Insertions can be searched for in the same manner, they just need to have `ins_` appended to the start of the mutation. Example `ins_NS4B:31:N`.

### Insertion wildcards

Loculus supports insertion queries that contain wildcards `?`. For example `ins_S:214:?EP?` will match all cases where segment `S` has an insertion of `EP` between the positions 214 and 215 but also an insertion of other AAs which include the `EP`, e.g. the insertion `EPE` will be matched.

You can also use wildcards to match any insertion at a given position. For example `ins_S:214:?:` will match any (but at least one) insertion between the positions 214 and 215.

### Multiple mutations

Multiple mutation filters can be provided by adding one mutation after the other.

### Any mutation

To filter for any mutation at a given position you can omit the `<base>`.
6 changes: 3 additions & 3 deletions website/src/pages/api-documentation/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ const BUTTON_CLASS =

<div>
<p class='mt-4 mb-4'>
We offer a
There is a
<a
href='https://swagger.io/tools/swagger-ui/'
class='underline text-primary-900 hover:text-primary-800 hover:no-underline'
>
Swagger UI
</a>
for documentation and direct interaction with our APIs. For more tips on how to use our API we recommend
starting out with our
for documentation and direct interaction with the APIs. For more tips on how to use the API, it is recommended
to start with the
<a
href='docs/how-to/authentication-api'
class='underline text-primary-900 hover:text-primary-800 hover:no-underline'
Expand Down
3 changes: 3 additions & 0 deletions website/src/pages/docs/how-to/authentication-api.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
return Astro.redirect('https://loculus.org/for-users/authenticate-via-api/');
---
3 changes: 3 additions & 0 deletions website/src/pages/docs/how-to/search-sequences-website.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
return Astro.redirect('https://loculus.org/for-users/search-sequences/');
---
3 changes: 0 additions & 3 deletions website/src/pages/docs/how-to/search-sequences-website.mdx

This file was deleted.

0 comments on commit 8e4dd94

Please sign in to comment.