Skip to content

Commit

Permalink
add bigwig example
Browse files Browse the repository at this point in the history
  • Loading branch information
riyavsinha committed May 8, 2024
1 parent bbfbd94 commit 5637d68
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/stories/DnaLogo.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,27 @@ export const CustomStartingBase: Story = {
},
};

export const Bigwig: Story = {
args: {
...CAPMotifIC.args,
data: [
[0, 0, 1.3, 0],
[0, 0, 1, 0],
[0.8, 0, 0, 0],
[0, -0.3, 0, 0],
[-0.5, 0, 0, 0],
[0, 0, 0, 0.8],
[0.7, 0, 0, 0],
[0, 0, 0, 1.3],
],
mode: "RAW",
dataType: DataType.VALUES,
RawLogoProps: {
negativeAlpha: 1,
},
},
};

export const CustomGlyphs: Story = {
args: {
...CAPMotifIC.args,
Expand Down
8 changes: 8 additions & 0 deletions src/stories/gallery/DNALogos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ This logo shows the consensus DNA binding motif for CTCF. Here, the letter heigh

<Canvas of={DNALogos.CTCFMotifFrequency} />

## BigWigs

**Raw values can be displayed to plot data from bigWigs or SHAP scores.**

This plot shows SHAP importance scores from model attributions from a deep-learning model. The scores are plotted as a DNA logo, with the height of each letter corresponding to the importance of that base in the model's prediction.

<Canvas of={DNALogos.Bigwig} />

## Custom Starting Base

**A DNA logo can use a custom number for the first base.**
Expand Down

0 comments on commit 5637d68

Please sign in to comment.