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

higlass-orthologs

v0.2.4

Published

Gene orthologs for HiGlass

Downloads

107

Readme

Gene orthologs for HiGlass

Display orthologous amino acids in HiGlass!

Zoomed out (shows amino acids that match with the human):

Orthologs

Zoomed in:

Orthologs

Note: This is the source code for the orthologs track only! You might want to check out the following repositories as well:

  • HiGlass viewer: https://github.com/higlass/higlass
  • HiGlass server: https://github.com/higlass/higlass-server
  • HiGlass docker: https://github.com/higlass/higlass-docker

Installation

npm install higlass-orthologs

Data preparation

The orthologs data is loaded from Ensembl via their Rest API in the client (example URL: https://rest.ensembl.org/homology/id/ENSG00000139618?type=orthologues&content-type=application/json&cigar_line=0&target_species=cat&target_species=dog). In order to determine where to display the individual amino acids in the track, we need to know the representative (human) transcript that was used to create the aligned sequences. The sequences from Ensembl are then distributed onto the exons of that transcript.

In order to obtain the representative sequences we use Ensemble Biomart (https://m.ensembl.org/biomart) with the following attributes:

Biomart

The "Query protein or transcript ID" fields contain the information to identify the correct transcript that we need to use in the track. Store this data to a file and run

python /scripts/get_representative_transcripts.py

to obtain the bed file that will serve as base for the orthologs track.

To create an aggregated beddb file from that data, you can use the script

python /scripts/aggregate_transcripts.py

An example beddb file can be found in the examples folder.

To ingest the data into higlass-server:

python manage.py ingest_tileset \
    --filename /data/representative_transcripts.beddb \
    --filetype beddb \
    --coordSystem hg38 \
    --datatype gene-annotation \
    --uid canonical_transcripts_hg38

Usage

The live script can be found at:

  • https://unpkg.com/higlass-orthologs/dist/higlass-orthologs.js

Client

  1. Make sure you load this track after the HiGlass core script. For example:
<script src="hglib.js"></script>
<script src="/higlass-orthologs.js"></script>
<script>
  ...
</script>

Options

The following options are available:

{
  "server": "http://localhost:8001/api/v1",
  "tilesetUid": "awesome_orthologs",
  "uid": "awesome_orthologs_uid",
  "type": "horizontal-orthologs",
  "options": {
    "aminoAcidColor": "#333333", // font color of amino acids that match with the human one
    "aminoAcidColorNoMatch": "#b0b0b0", // font color of amino acids that don't match with the human one
    "fontSize": 10, // font size for labels and amino acids
    "fontFamily": "Arial", // font family for labels and amino acids
    "gapsColor": "#eb9c00", // color to indicate gaps in the sequence alignment
    "labelTextColor": "#888888", // color of labels
    "minusStrandColor1": "#ffe0e2", // background color 1 of amino acids on the negative strand
    "minusStrandColor2": "#fff0f1", // background color 2 of amino acids on the negative strand
    "minusStrandColorZoomedOut": "#fabec2", // color of horizontal bars, when zoomed out
    "plusStrandColor1": "#ebebff", // background color 1 of amino acids on the positive strand
    "plusStrandColor2": "#dedeff", // background color 2 of amino acids on the positive strand
    "plusStrandColorZoomedOut": "#bdbfff", // color of horizontal bars, when zoomed out
    "rowHeight": 11, // height of each row in the table
    "rowSpacing": 2, // space between rows
    "species": [
      "human",
      "macaca_mulatta",
      "mouse",
      "dog",
      "elephant",
      "chicken",
      "zebrafish",
    ], // the species to compare. Currently only a certain species are supported. More can be added in the EnsemblHelper class
  },
  "width": 768,
  "height": 200
}

ECMAScript Modules (ESM)

We also build out ES modules for usage by applications who may need to import or use higlass-orthologs as a component.

Whenever there is a statement such as the following, assuming higlass-orthologs is in your node_modules folder:

import { OrthologsTrack } from 'higlass-orthologs';

Then TranscriptsTrack would automatically be imported from the ./es directory (set via package.json's "module" value).

Support

For questions, please either open an issue or ask on the HiGlass Slack channel at http://bit.ly/higlass-slack

Development

Testing

To run the test suite:

npm run test-watch

Installation

$ git clone https://github.com/higlass/higlass-orthologs.git
$ cd higlass-orthologs
$ npm install

If you have a local copy of higlass, you can then run this command in the higlass-orthologs directory:

npm link higlass

Commands

  • Developmental server: npm start
  • Production build: npm run build