@weng-lab/genomebrowser 1.4.1 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  import { ImportanceProps } from './types';
2
- export default function Importance({ data, annotations, dimensions, height, zeroLineProps }: ImportanceProps): import("react/jsx-runtime").JSX.Element;
2
+ export default function Importance({ data, annotations, dimensions, height, zeroLineProps }: ImportanceProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,16 @@
1
+ import { TrackDimensions } from '../types';
2
+ type GenericLDProps = {
3
+ id: string;
4
+ data: any[];
5
+ height: number;
6
+ color: string;
7
+ dimensions: TrackDimensions;
8
+ lead: string;
9
+ associatedSnps: string[];
10
+ onClick?: (data: any) => void;
11
+ onHover?: (data: any) => void;
12
+ onLeave?: (data: any) => void;
13
+ tooltip?: React.FC<any>;
14
+ };
15
+ export default function GenericLD({ id, data, lead, associatedSnps, height, color, dimensions, onClick, onHover, onLeave, tooltip, }: GenericLDProps): import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -0,0 +1,7 @@
1
+ import { SNP } from './types';
2
+ export declare const createArcPath: (sourceSnp: SNP, targetSnp: SNP, height: number, leadHeight: number, snpHeight: number) => string;
3
+ export declare const getWidth: (score: string) => number;
4
+ export declare const getRSquareForTarget: (snp: SNP, targetSnpId: string) => string;
5
+ export declare const getPrimaryRSquare: (snp: SNP) => string;
6
+ export declare const isLead: (snp: SNP) => boolean;
7
+ export declare const getFill: (snp: SNP, color: string) => string;
@@ -2,6 +2,8 @@ import { Config, TrackDimensions, TrackType } from '../types';
2
2
  export interface LDTrackConfig extends Config<any> {
3
3
  trackType: TrackType.LDTrack;
4
4
  show?: string[];
5
+ lead?: string;
6
+ associatedSnps?: string[];
5
7
  }
6
8
  export type LDProps = {
7
9
  id: string;
@@ -15,6 +17,19 @@ export type LDProps = {
15
17
  onLeave?: (data: any) => void;
16
18
  tooltip?: React.FC<any>;
17
19
  };
20
+ export type SNP = {
21
+ chromosome: string;
22
+ ldblock: number;
23
+ ldblocksnpid: string;
24
+ pixelEnd: number;
25
+ pixelStart: number;
26
+ rsquare: string;
27
+ snpid: string;
28
+ start: number;
29
+ stop: number;
30
+ sourceSnp?: string;
31
+ targetSnpId?: string;
32
+ };
18
33
  export type Population = {
19
34
  population: string;
20
35
  subpopulation?: string;
@@ -0,0 +1,2 @@
1
+ import { ManhattanProps } from './types';
2
+ export default function Scatter({ id, data, cutoffValue, cutoffLabel, associatedSnps, height, color, dimensions, onClick, onHover, onLeave, tooltip, }: ManhattanProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,30 @@
1
+ import { Chromosome } from '../../../lib';
2
+ import { Config, TrackDimensions, TrackType } from '../types';
3
+ export interface ManhattanTrackConfig extends Config<any> {
4
+ trackType: TrackType.Manhattan;
5
+ cutoffValue?: number;
6
+ cutoffLabel?: string;
7
+ lead?: string;
8
+ associatedSnps?: string[];
9
+ }
10
+ export interface ManhattanProps {
11
+ id: string;
12
+ data: any;
13
+ cutoffValue?: number;
14
+ cutoffLabel?: string;
15
+ associatedSnps?: string[];
16
+ height: number;
17
+ color: string;
18
+ dimensions: TrackDimensions;
19
+ onClick?: (item: any) => void;
20
+ onHover?: (item: any) => void;
21
+ onLeave?: (item: any) => void;
22
+ tooltip?: (item: any) => React.ReactNode;
23
+ }
24
+ export type ManhattanPoint = {
25
+ chr: Chromosome;
26
+ start: number;
27
+ end: number;
28
+ snpId: string;
29
+ value: number;
30
+ };
@@ -6,7 +6,8 @@ export declare enum TrackType {
6
6
  Importance = "importance",
7
7
  LDTrack = "ldtrack",
8
8
  BulkBed = "bulkbed",
9
- MethylC = "methylc"
9
+ MethylC = "methylc",
10
+ Manhattan = "manhattan"
10
11
  }
11
12
  export declare enum DisplayMode {
12
13
  Full = "full",
@@ -14,7 +15,10 @@ export declare enum DisplayMode {
14
15
  Squish = "squish",
15
16
  Pack = "pack",
16
17
  Combined = "combined",
17
- Split = "split"
18
+ Split = "split",
19
+ Scatter = "scatter",
20
+ LDBlock = "ldblock",
21
+ GenericLD = "genericld"
18
22
  }
19
23
  export interface InteractionConfig<Item> {
20
24
  onClick?: (item: Item) => void;