
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
clanviewer
Advanced tools
A component to visualise the relationships between the Pfam families in a clan
A component to visualise the relationships between the Pfam families in a clan. Now in TypeScript!
Install the module with: npm install clanviewer
import ClanViewer from "../lib/index";
import data from "./example.json";
const rootDiv = document.getElementById("container");
const instance = new ClanViewer({ element: rootDiv, directional: true });
instance.paint(data);
The 'constructor' method is responsible for capturing the parameters and setting up the space.
All the options are optional including the option parameter itself.
Parameter: options
Type: Object
Default: {}
Example: {"el":"body"}
Parameter: options.el
Type: String
Default: "body"
Example: "div.target"
Parameter: options.width
Type: Integer
Default: 900
Example: 800
Parameter: options.height
Type: Integer
Default: 500
Example: 600
Parameter: options.r
Type: Integer
Default: 5
Example: 8
How to use this method
const instance = new ClanViewer({ element: rootDiv, directional: true });
The 'paint' method receives a json object and generates a force-directed layout that maps the memebers with ith interactions.
Parameter: data
Type: Object
Example:
{
"accession":"CL0050",
"id":"HotDog",
"members":[
{ "accession":"PF03061", "link":"http://pfam.xfam.org/family/PF03061", "id":"4HBT", "num_occurrences":88944, "percentage_hits":34.7 },
{ "accession":"PF01643", "link":"http://pfam.xfam.org/family/PF01643", "id":"Acyl-ACP_TE", "num_occurrences":7178, "percentage_hits":2.8 },
],
"interactions":[
{ "member_id_1":"4HBT", "member_id_2":"Acyl-ACP_TE", "e_value":8.2e-6 }
]
}
How to use this method
instance.paint(data);
All contributions are welcome.
If you have any problem or suggestion please open an issue here.
This software is licensed under the Apache 2 license, quoted below.
Copyright (c) 2015, gsalazar
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
FAQs
A component to visualise the relationships between the Pfam families in a clan
The npm package clanviewer receives a total of 31 weekly downloads. As such, clanviewer popularity was classified as not popular.
We found that clanviewer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.