-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1496 from nextstrain/feat/web-help-tips
- Loading branch information
Showing
8 changed files
with
186 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
packages/nextclade-web/src/components/Help/SelectGeneHelp.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import React from 'react' | ||
import { HelpTipsColumnSeqViewGeneLegend } from 'src/components/Results/HelpTips/HelpTipsColumnSeqViewGeneLegend' | ||
import { HelpTipsColumnSeqViewNucLegend } from 'src/components/Results/HelpTips/HelpTipsColumnSeqViewNucLegend' | ||
import { useTranslationSafe } from 'src/helpers/useTranslationSafe' | ||
import { InfoButton } from 'src/components/Common/InfoButton' | ||
import { LinkExternal } from 'src/components/Link/LinkExternal' | ||
|
||
export function SelectGeneHelp() { | ||
const { t } = useTranslationSafe() | ||
|
||
return ( | ||
<InfoButton color="link"> | ||
<h5>{t('Select a genetic feature.')}</h5> | ||
|
||
<p> | ||
{t( | ||
'This allows to switch sequence views between nucleotide sequence and peptides (translated CDSes; only available if the dataset provides a genome annotation).', | ||
)} | ||
</p> | ||
|
||
<hr /> | ||
|
||
<p> | ||
{t( | ||
'Each row of the table displays a schema of the corresponding sequence, highlighting the differences relative to the target selected in the "Relative to" dropdown.', | ||
)} | ||
</p> | ||
|
||
<hr /> | ||
|
||
<h5>{t('Nucleotide Sequence mode')}</h5> | ||
|
||
<p> | ||
{t( | ||
'In "Nucleotide Sequence" mode, the whole nucleotide sequence is shown. Line markers represent nucleotide mutations. They are colored by the resulting (query) nucleotide:', | ||
)} | ||
</p> | ||
|
||
<HelpTipsColumnSeqViewNucLegend /> | ||
|
||
<p> | ||
{t('Mouse hover on a mutation marker to show details of that mutation and its neighborhood in the alignment.')} | ||
<br /> | ||
{t("Unsequenced regions at the 5' and 3' end are indicated as light gray areas on both ends.")} | ||
<br /> | ||
{t('For a mapping between positions in the sequence and genes, see Genome Annotation view below the table.')} | ||
</p> | ||
|
||
<hr /> | ||
|
||
<h5>{t('Peptide/protein mode')}</h5> | ||
|
||
<p> | ||
{t( | ||
'When a CDS is selected, each row displays a schema of the corresponding translated amino acid sequence by highlighting the differences to the corresponding peptide in the reference/target. Note that the CDS might be split into multiple segments or be located on the reverse strand.', | ||
)} | ||
<br /> | ||
{t( | ||
'Line markers on sequence views represent amino acid mutations colored by the resulting (query) amino acid:', | ||
)} | ||
</p> | ||
|
||
<HelpTipsColumnSeqViewGeneLegend /> | ||
|
||
<p> | ||
{t('Note: Sometimes mutations are so close to each other that they overlap.')} | ||
<br /> | ||
{t('Note: Positions are 1-based.')} | ||
</p> | ||
|
||
<hr /> | ||
|
||
<p className="p-0 m-0 small"> | ||
{t('Learn more in Nextclade {{documentation}}')} | ||
<LinkExternal href="https://docs.nextstrain.org/projects/nextclade/en/stable"> | ||
{t('documentation')} | ||
</LinkExternal> | ||
</p> | ||
</InfoButton> | ||
) | ||
} |
58 changes: 58 additions & 0 deletions
58
packages/nextclade-web/src/components/Help/SelectRefNodeHelp.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import React from 'react' | ||
import { useTranslationSafe } from 'src/helpers/useTranslationSafe' | ||
import { InfoButton } from 'src/components/Common/InfoButton' | ||
import { LinkExternal } from 'src/components/Link/LinkExternal' | ||
import { Ul, Li } from 'src/components/Common/List' | ||
|
||
export function SelectRefNodeHelp() { | ||
const { t } = useTranslationSafe() | ||
|
||
return ( | ||
<InfoButton color="link"> | ||
<h5>{t('Select target for mutation calling.')}</h5> | ||
<p> | ||
{t( | ||
'The sequence view below shows differences between each query sequence and a "comparison target" that can be selected using this dropdown. Possible options are:', | ||
)} | ||
</p> | ||
|
||
<Ul> | ||
<Li>{t('"Reference" - shows mutations relative to the reference sequence (as defined in the dataset).')}</Li> | ||
<Li> | ||
{t( | ||
'"Parent" - shows private mutations, i.e. mutations relative to the parent (nearest) node of the reference tree to which the query sample has been attached to during phylogenetic placement.', | ||
)} | ||
</Li> | ||
<Li> | ||
{t( | ||
'"Clade founder" - shows mutations relative to the founder of the clade that has been assigned to the query sample. Note that queries from different clades will be compared with different targets in this case.', | ||
)} | ||
</Li> | ||
<Li> | ||
{t( | ||
'Entries of format "\'<attribute>\' founder" show mutations relative to the founder node of a particular clade-like attribute (if any are defined in the dataset). Dataset authors may choose to exclude certain attributes.', | ||
)} | ||
</Li> | ||
<Li> | ||
{t( | ||
'Any additional entries show mutations relative to the node(s) found according to the custom search criteria (if any defined in the dataset). If the query sample does not match search criteria, then "{{ notApplicable }}" will be displayed.', | ||
{ notApplicable: t('Not applicable') }, | ||
)} | ||
</Li> | ||
</Ul> | ||
|
||
<p> | ||
{t( | ||
'Switching the target will change mutations displayed in the sequence views as well as in the "Mut" column of the table and its mouseover tooltip.', | ||
)} | ||
</p> | ||
|
||
<p className="p-0 m-0 small"> | ||
{t('Learn more in Nextclade {{documentation}}')} | ||
<LinkExternal href="https://docs.nextstrain.org/projects/nextclade/en/stable"> | ||
{t('documentation')} | ||
</LinkExternal> | ||
</p> | ||
</InfoButton> | ||
) | ||
} |
35 changes: 0 additions & 35 deletions
35
packages/nextclade-web/src/components/Results/HelpTips/HelpTipsColumnSeqView.mdx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters