@weng-lab/genomebrowser 0.0.20 → 0.0.21

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.
@@ -3,6 +3,7 @@ import { TrackProps } from '../tracks/types';
3
3
  import { TranscriptOptions } from '../tracks/transcripts/transcript';
4
4
  import { BigWigOptions } from '../tracks/bigwig/bigwig';
5
5
  import { BigBedOptions } from '../tracks/bigbed/bigbed';
6
+ import { LDOptions } from '../tracks/ld/ld';
6
7
  export declare const BrowserStateContext: import('react').Context<BrowserState>;
7
8
  export declare const BrowserDispatchContext: import('react').Context<import('react').Dispatch<BrowserAction>>;
8
9
  export type Highlight = {
@@ -136,7 +137,7 @@ export type SetRange = {
136
137
  export type UpdateProps = {
137
138
  type: BrowserActionType.UPDATE_PROPS;
138
139
  id: string;
139
- props: TranscriptOptions | BigWigOptions | BigBedOptions;
140
+ props: TranscriptOptions | BigWigOptions | BigBedOptions | LDOptions;
140
141
  };
141
142
  export type BringToTop = {
142
143
  type: BrowserActionType.BRING_TO_TOP;
@@ -1,4 +1,4 @@
1
- import { default as LDTrack } from './ldtrack';
2
- import { default as GraphQLLDTrack } from './graphqlldtrack';
3
- import { LDTrackProps, LDData, GraphQLLDTrackProps } from './types';
4
- export { LDTrack, GraphQLLDTrack, type LDTrackProps, type LDData, type GraphQLLDTrackProps };
1
+ import { default as LD, LDProps, LDOptions, DefaultLD } from './ld';
2
+ export { LD };
3
+ export type { LDProps, LDOptions };
4
+ export { DefaultLD };
@@ -0,0 +1,33 @@
1
+ import { LDData, SNP } from './types';
2
+ import { DisplayMode } from '../types';
3
+ import { Domain } from '../../../utils/types';
4
+ export type LDProps = {
5
+ data: LDData;
6
+ width: number;
7
+ height: number;
8
+ id?: string;
9
+ displayMode: DisplayMode;
10
+ canDrag?: boolean;
11
+ domain: Domain;
12
+ };
13
+ export type LDOptions = {
14
+ transform?: string;
15
+ color?: string;
16
+ anchor?: string;
17
+ onVariantClick?: (snp: SNP) => void;
18
+ onVariantMouseOver?: (snp: SNP) => void;
19
+ onVariantMouseOut?: (snp: SNP) => void;
20
+ highlighted?: Set<string>;
21
+ highlightColor?: string;
22
+ ldThreshold?: number;
23
+ svgRef?: React.RefObject<SVGSVGElement>;
24
+ onHeightChanged?: (height: number) => void;
25
+ className?: string;
26
+ };
27
+ export declare const DefaultLD: {
28
+ titleSize: number;
29
+ ldThreshold: number;
30
+ displayMode: DisplayMode;
31
+ canDrag: boolean;
32
+ };
33
+ export default function LD(props: LDProps & LDOptions): import("react/jsx-runtime").JSX.Element;
@@ -5,7 +5,7 @@ export type RenderedSNPs = {
5
5
  };
6
6
  export type LDData = {
7
7
  snps: SNP[];
8
- ld?: LD[];
8
+ ld?: Linkage[];
9
9
  };
10
10
  export type LDTrackProps = {
11
11
  data?: LDData;
@@ -25,6 +25,7 @@ export type LDTrackProps = {
25
25
  svgRef?: React.RefObject<SVGSVGElement>;
26
26
  onHeightChanged?: (height: number) => void;
27
27
  className?: string;
28
+ canDrag?: boolean;
28
29
  };
29
30
  export interface SNP {
30
31
  domain: Domain;
@@ -36,7 +37,7 @@ export type RenderedSNP = {
36
37
  color: string;
37
38
  taller: boolean;
38
39
  };
39
- export type LD = {
40
+ export type Linkage = {
40
41
  rSquared: number;
41
42
  coordinates: Domain;
42
43
  };
@@ -58,9 +59,18 @@ export type GraphQLLDTrackProps = {
58
59
  };
59
60
  export type GraphQLLdTrackState = {
60
61
  snps?: SNP[];
61
- ld?: LD[];
62
+ ld?: Linkage[];
62
63
  };
63
64
  export type Population = {
64
65
  population: string;
65
66
  subpopulation?: string;
66
67
  };
68
+ export declare const POPULATIONS: {
69
+ text: string;
70
+ value: string;
71
+ }[];
72
+ export declare const SUBPOPULATIONS: Map<string, ({
73
+ text: string;
74
+ value: string;
75
+ } | null)[]>;
76
+ export declare const ALL_POPULATIONS: Population[];
@@ -1,3 +1,3 @@
1
- import { SNP, RenderedSNPs, Path, LD } from './types';
1
+ import { SNP, RenderedSNPs, Path, Linkage } from './types';
2
2
  export declare function renderSNPs(snps: SNP[], highlighted: Set<string>, x: (value: number) => number, hColor: string, color: string): RenderedSNPs;
3
- export declare function renderLD(coords: Map<string, number>, anchor: string, ld: LD[], x: (value: number) => number, ldThreshold: number, height: number): Path[];
3
+ export declare function renderLD(coords: Map<string, number>, anchor: string, ld: Linkage[], x: (value: number) => number, ldThreshold: number, height: number): Path[];
@@ -6,6 +6,7 @@ import { ImportanceTrackAnnotation, ImportanceTrackDataPoint } from './importanc
6
6
  import { Rect as MotifRect } from './motif/types';
7
7
  import { MotifOptions } from './motif/motif';
8
8
  import { ImportanceOptions } from './importance/importance';
9
+ import { LDOptions } from './ld/ld';
9
10
  /**
10
11
  * Display modes for tracks
11
12
  */
@@ -104,4 +105,8 @@ export type MotifTrackProps = {
104
105
  rowHeight?: number;
105
106
  props?: MotifOptions;
106
107
  } & BaseTrack;
107
- export type TrackProps = BigWigTrackProps | BigBedTrackProps | TranscriptTrackProps | MotifTrackProps | ImportanceTrackProps;
108
+ export type LDTrackProps = {
109
+ assembly: string;
110
+ props?: LDOptions;
111
+ } & BaseTrack;
112
+ export type TrackProps = BigWigTrackProps | BigBedTrackProps | TranscriptTrackProps | MotifTrackProps | ImportanceTrackProps | LDTrackProps;