npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@lipme/vuenomics-visualization-components

v0.0.21

Published

This is a compilation of visualization components made in Vue and D3 designed to display genomics data in a reactive way.

Downloads

693

Readme

Vuenomics Visualization Components

This is a compilation of visualization components made in Vue and D3 designed to display genomics data in a reactive way.

Recommended IDE Setup

VSCode + Volar (and disable Vetur).

Components install

npm install @lipme/vuenomics-visualization-components
import { Axis, GffViewer, CovViewer, BamViewer } from 'lipme/vuenomics-visualization-components'

Settings Prop

each component has a settings prop that can be used to change the width, height, marginLeft and marginRight of the component

type={
 width: number
  height: number
  marginLeft: number
  marginRight: number
}

!!!!width and margins must be the same on each component!!!

Axis component

use Axis component to display the axis of the charts

<Axis :domain="[regionStart, RegionEnd]">
//add your component here
</Axis>

it also tie togther the different components to have the same scale

GffViewer

to View your genes based on gff3 convention you can use GffViewer like this.

<GffViewer :data="GenesListe" :color-liste="color">
    </GffViewer>

where GenesListe is an array of Gff3 extended with an attribute place, that represents in which level on the graphics the gene is displayed

color list contains the colors of gene structure and to mark certains mRna, by either Ontology_term, functional_class or product like this

const COLORS = {
  mRNA: {
    Ontology_term: {
      Plastid: {
        color: 'yellow',
        match: 'GO:0009536'
      },
      Nucleus: {
        color: 'blue',
        match: 'GO:0005634'
      },
      'Protein binding': {
        color: 'brown',
        match: 'GO:0005515'
      },
      'Cell periphery': {
        color: 'grey',
        match: 'GO:0071944'
      },
      'Cellular process': {
        color: 'black',
        match: 'GO:0009987'
      },
      'Plasma Membrane': {
        color: 'black',
        match: 'GO:0005886'
      }
    }
  },
  type: {
    mRNA: 'LightSalmon',
    unknown: 'red',
    tRNA: 'green',
    rRNA: 'red',
    ncRNA: 'blue',
    utr: 'purple'
  }
}

CovViewer component

cov viewer show coverage of BAMs

<CovViewer :data="covData"></CovViewer>

Where covData is a an array of objects containing the start,end and value of the coverage in each region ther musn't be a gap between the end of an object and the start of the following one

const covData = [
  {
    start: 6260108,
    end: 6260152,
    score: 33
  },
  {
    start: 6260152,
    end: 6260153,
    score: 32
  },
  {
    start: 6260153,
    end: 6260155,
    score: 33
  }
  //...
]

BamViewer

BamViewer take actual Bam's,inserts and mismatch as inputs independantly.(inserts and mismatchs are Optional)

<BamViewer
  :data="{
    bams: mockbam,
    indels: mockInserts,
    mismatchs: mockMismatch
  }"
>
      </BamViewer>

For the bams you need to have start,end,place(to place the bam in a certain level) and strand(can be 1|-1) each attribute is a numeric exemple

[
  {
    "place": 31,
    "start": 6289985,
    "end": 6311269,
    "strand": 1
  },
  {
    "place": 32,
    "start": 6290075,
    "end": 6306374,
    "strand": 1
  },
  {
    "place": 33,
    "start": 6295685,
    "end": 6307041,
    "strand": -1
  }
]

indels and mismatch contain the fields of bams with additional fields like operation, which is a character and must be "x" for mismatch and 'I' or 'D' for indels. They also have the fields index and until:

  1. index + start sets the position.
  2. until - index sets the width of the component.

mismatch also has another field called val(string) which is the mismatch value. this highly expiremantale and can change

Indels Example

[
  {
    "place": 0,
    "start": 6387199,
    "end": 6401538,
    "strand": -1,
    "MD": "",
    "cigar": "",
    "index": 7767,
    "until": 7768,
    "operation": "D"
  },
  {
    "place": 0,
    "start": 6387199,
    "end": 6401538,
    "strand": -1,
    "MD": "",
    "cigar": "",
    "index": 12146,
    "until": 12147,
    "operation": "D"
  },
  {
    "place": 0,
    "start": 6387199,
    "end": 6401538,
    "strand": -1,
    "MD": "",
    "cigar": "",
    "index": 13613,
    "until": 13614,
    "operation": "D"
  },
  {
    "place": 0,
    "start": 6401939,
    "end": 6414260,
    "strand": 1,
    "MD": "",
    "cigar": "",
    "index": 10451,
    "until": 10451,
    "operation": "I"
  }
]

Mismatch Example

[
  {
    "place": 19,
    "start": 6409968,
    "end": 6422287,
    "strand": 1,
    "index": 2985,
    "until": 2986,
    "val": "T",
    "operation": "X"
  },
  {
    "place": 19,
    "start": 6409968,
    "end": 6422287,
    "strand": 1,
    "index": 3261,
    "until": 3262,
    "val": "A",
    "operation": "X"
  },
  {
    "place": 19,
    "start": 6409968,
    "end": 6422287,
    "strand": 1,
    "index": 3562,
    "until": 3563,
    "val": "C",
    "operation": "X"
  }
]

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Type-Check, Compile and Minify for Production

npm run build