@weng-lab/genomebrowser 1.1.0 → 1.2.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.
@@ -6,6 +6,7 @@ export interface BigRequest {
6
6
  chr1: string;
7
7
  start: number;
8
8
  end: number;
9
+ preRenderedWidth?: number;
9
10
  }
10
11
  export interface BigResponse {
11
12
  bigRequests: {
@@ -59,3 +60,22 @@ export interface MotifRect {
59
60
  end: number;
60
61
  pwm?: number[][];
61
62
  }
63
+ export interface MethylCRequest {
64
+ plusStrand: {
65
+ cpgPlus: BigRequest;
66
+ chgPlus: BigRequest;
67
+ chhPlus: BigRequest;
68
+ depthPlus: BigRequest;
69
+ };
70
+ minusStrand: {
71
+ cpgMinus: BigRequest;
72
+ chgMinus: BigRequest;
73
+ chhMinus: BigRequest;
74
+ depthMinus: BigRequest;
75
+ };
76
+ }
77
+ export interface MethylCResponse {
78
+ bigRequests: {
79
+ data: any;
80
+ }[];
81
+ }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * All GraphQL queries for the genome browser
3
3
  */
4
- export declare const BIGDATA_QUERY: import('graphql').DocumentNode;
5
- export declare const TRANSCRIPT_GENES_QUERY: import('graphql').DocumentNode;
6
- export declare const MOTIF_QUERY: import('graphql').DocumentNode;
4
+ export declare const BIGDATA_QUERY: import('@apollo/client').DocumentNode;
5
+ export declare const TRANSCRIPT_GENES_QUERY: import('@apollo/client').DocumentNode;
6
+ export declare const MOTIF_QUERY: import('@apollo/client').DocumentNode;
7
7
  export declare const VARIANT_QUERY = "\n query SNP($assembly: String!, $coordinates: [GenomicRangeInput]) {\n snpQuery(assembly: $assembly, coordinates: $coordinates, common: true) {\n id\n coordinates {\n chromosome\n start\n end\n }\n }\n }\n";
@@ -7,6 +7,7 @@ export interface QueryExecutors {
7
7
  fetchImportance: LazyQueryExecFunction<unknown, OperationVariables>;
8
8
  fetchBulkBed: LazyQueryExecFunction<unknown, OperationVariables>;
9
9
  fetchSnps: LazyQueryExecFunction<unknown, OperationVariables>;
10
+ fetchMethylC: LazyQueryExecFunction<unknown, OperationVariables>;
10
11
  }
11
12
  /**
12
13
  * Execute all queries concurrently based on built requests
@@ -8,12 +8,13 @@ export interface AllRequests {
8
8
  importanceRequests: BigRequest[];
9
9
  bulkBedRequests: BigRequest[];
10
10
  ldRequest?: LDRequest;
11
+ methylCRequest?: BigRequest[];
11
12
  }
12
13
  /**
13
14
  * Build BigWig/BigBed requests for given tracks
14
15
  */
15
- export declare function buildBigRequests(tracks: Track[], domain: Domain): BigRequest[];
16
- /**
16
+ export declare function buildBigRequests(tracks: Track[], domain: Domain, preRenderedWidth: number): BigRequest[];
17
+ /**`
17
18
  * Build BulkBed requests for given tracks
18
19
  */
19
20
  export declare function buildBulkBedRequests(tracks: Track[], domain: Domain): BigRequest[];
@@ -34,7 +35,8 @@ export declare function buildImportanceRequests(tracks: Track[], currentDomain:
34
35
  * Build LD request for given tracks (first LD track found)
35
36
  */
36
37
  export declare function buildLDRequest(tracks: Track[], domain: Domain): LDRequest | undefined;
38
+ export declare function buildMethylCRequest(tracks: Track[], domain: Domain, preRenderedWidth: number): BigRequest[] | undefined;
37
39
  /**
38
40
  * Build all requests for all track types in one coordinated call
39
41
  */
40
- export declare function buildAllRequests(tracks: Track[], expandedDomain: Domain, currentDomain: Domain): AllRequests;
42
+ export declare function buildAllRequests(tracks: Track[], expandedDomain: Domain, currentDomain: Domain, preRenderedWidth: number): AllRequests;
@@ -14,6 +14,8 @@ export interface QueryResults {
14
14
  importanceError?: ApolloError;
15
15
  bulkBedError?: ApolloError;
16
16
  snpError?: ApolloError;
17
+ methylCData?: BigResponse;
18
+ methylCError?: ApolloError;
17
19
  }
18
20
  export interface ProcessedResult {
19
21
  trackId: string;
@@ -0,0 +1,2 @@
1
+ import { CentromereProps } from './types';
2
+ export default function Centromere(props: CentromereProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { CytobandProps } from './types';
2
+ export default function Cytoband(props: CytobandProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,5 @@
1
+ import { Domain } from '../../utils/types';
2
+ export default function Cytobands({ assembly, currentDomain, }: {
3
+ assembly: string;
4
+ currentDomain: Domain;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { CytobandHighlightProps } from './types';
2
+ export default function CytobandHighlight(props: CytobandHighlightProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,61 @@
1
+ import { default as React } from 'react';
2
+ import { Domain } from '../../utils/types';
3
+ export type Highlight = {
4
+ color: string;
5
+ start: number;
6
+ end: number;
7
+ };
8
+ export type ShortHighlightProps = {
9
+ highlight: Highlight;
10
+ x: (value: number) => number;
11
+ height: number;
12
+ };
13
+ export type Cytoband = {
14
+ stain: string;
15
+ coordinates: Domain;
16
+ };
17
+ export type CytobandColors = {
18
+ default: string;
19
+ centromere: string;
20
+ stalk: string;
21
+ };
22
+ export type CytobandsProps = {
23
+ data: Cytoband[];
24
+ width: number;
25
+ height: number;
26
+ id: string;
27
+ colors?: CytobandColors;
28
+ transform?: string;
29
+ highlight?: Highlight;
30
+ highlights?: Highlight[];
31
+ onHighlightMouseOver?: (highlight: Highlight, x: number, i: number) => void;
32
+ onHighlightMouseOut?: () => void;
33
+ onHighlightClick?: (highlight: Highlight, x: number, i: number) => void;
34
+ domain?: Domain;
35
+ children?: React.ReactNode;
36
+ opacity?: number;
37
+ };
38
+ export type CytobandProps = {
39
+ colors: CytobandColors;
40
+ width: number;
41
+ height: number;
42
+ type: string;
43
+ x: number;
44
+ opacity?: number;
45
+ };
46
+ export type CentromereProps = {
47
+ color: string;
48
+ width: number;
49
+ height: number;
50
+ x: number;
51
+ opening: boolean;
52
+ };
53
+ export type CytobandHighlightProps = {
54
+ x: (value: number) => number;
55
+ height: number;
56
+ width: number;
57
+ highlight: Highlight;
58
+ onMouseOver?: () => void;
59
+ onMouseOut?: () => void;
60
+ onClick?: () => void;
61
+ };
@@ -0,0 +1,7 @@
1
+ export declare function getTextColor(backgroundColor: string): string;
2
+ export declare function shadeColor(color: string, percent: number): string;
3
+ export declare const isDark: (color: string) => boolean;
4
+ export declare function getButtonColors(trackColor: string, selected: boolean): {
5
+ backgroundColor: string;
6
+ color: string;
7
+ };
@@ -1,4 +1 @@
1
1
  export default function Modal(): import("react/jsx-runtime").JSX.Element | null;
2
- export declare function getTextColor(backgroundColor: string): string;
3
- export declare function shadeColor(color: string, percent: number): string;
4
- export declare const isDark: (color: string) => boolean;
@@ -1,2 +1,6 @@
1
1
  import { FullBigWigProps } from './types';
2
+ /**
3
+ * @deprecated Use ReworkBigWig instead
4
+ * Keeping this file in case something breaks
5
+ */
2
6
  export default function FullBigWig({ data, range, customRange, id, height, color, dimensions, tooltip, }: FullBigWigProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { FullBigWigProps } from './types';
2
+ export default function ReworkBigWig({ data, customRange, id, height, color, dimensions, tooltip }: FullBigWigProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { Config, TrackDimensions, TrackType } from '../types';
2
- export interface BigWigConfig extends Config<BigWigData> {
2
+ export interface BigWigConfig extends Config<Data> {
3
3
  trackType: TrackType.BigWig;
4
4
  url: string;
5
5
  range?: YRange;
@@ -11,7 +11,7 @@ interface BigWigProps {
11
11
  color: string;
12
12
  data: Data;
13
13
  dimensions: TrackDimensions;
14
- tooltip?: React.FC<BigWigData>;
14
+ tooltip?: React.FC<Data>;
15
15
  }
16
16
  export interface FullBigWigProps extends BigWigProps {
17
17
  range: YRange;
@@ -43,7 +43,7 @@ export interface BigZoomData {
43
43
  sumData: number;
44
44
  sumSquares: number;
45
45
  }
46
- export type Data = ValuedPoint[] | BigWigData[] | BigZoomData[];
46
+ export type Data = ValuedPoint[];
47
47
  export declare enum DataType {
48
48
  ValuedPoint = "valuedPoint",
49
49
  BigZoomData = "bigZoomData",
@@ -6,7 +6,6 @@ export interface BulkBedDataset {
6
6
  export interface BulkBedConfig extends Config<BulkBedRect> {
7
7
  trackType: TrackType.BulkBed;
8
8
  datasets: BulkBedDataset[];
9
- urls?: string[];
10
9
  gap?: number;
11
10
  }
12
11
  export interface BulkBedProps {
@@ -0,0 +1 @@
1
+ export default function CombinedMethylC(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { ValuedPoint } from '../bigwig/types';
2
+ export default function DefaultMethylCTooltip({ tooltipValues }: {
3
+ tooltipValues: ValuedPoint[];
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { ValuedPoint, YRange } from '../bigwig/types';
2
+ export declare function generateSignal(data: ValuedPoint[], height: number, color: string, inverted?: boolean, customRange?: YRange): import("react/jsx-runtime").JSX.Element | null;
3
+ export declare function generateLineGraph(data: ValuedPoint[], height: number, color: string, inverted?: boolean, customRange?: YRange): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,3 @@
1
+ import { MethylCProps } from './types';
2
+ declare function SplitMethylC({ id, height, colors, data, dimensions, range, tooltip }: MethylCProps): import("react/jsx-runtime").JSX.Element;
3
+ export default SplitMethylC;
@@ -0,0 +1,58 @@
1
+ import { ValuedPoint, YRange } from '../bigwig/types';
2
+ import { Config, DisplayMode, TrackDimensions, TrackType } from '../types';
3
+ export interface MethylCConfig extends Config<MethylData> {
4
+ trackType: TrackType.MethylC;
5
+ displayMode: DisplayMode.Split | DisplayMode.Combined;
6
+ colors: {
7
+ cpg: string;
8
+ chg: string;
9
+ chh: string;
10
+ depth: string;
11
+ };
12
+ urls: {
13
+ plusStrand: {
14
+ cpg: {
15
+ url: string;
16
+ };
17
+ chg: {
18
+ url: string;
19
+ };
20
+ chh: {
21
+ url: string;
22
+ };
23
+ depth: {
24
+ url: string;
25
+ };
26
+ };
27
+ minusStrand: {
28
+ cpg: {
29
+ url: string;
30
+ };
31
+ chg: {
32
+ url: string;
33
+ };
34
+ chh: {
35
+ url: string;
36
+ };
37
+ depth: {
38
+ url: string;
39
+ };
40
+ };
41
+ };
42
+ range?: YRange;
43
+ }
44
+ export type MethylData = ValuedPoint[];
45
+ export interface MethylCProps {
46
+ id: string;
47
+ height: number;
48
+ colors: {
49
+ cpg: string;
50
+ chg: string;
51
+ chh: string;
52
+ depth: string;
53
+ };
54
+ data: MethylData[];
55
+ dimensions: TrackDimensions;
56
+ tooltip?: React.FC<ValuedPoint[]>;
57
+ range?: YRange;
58
+ }
@@ -5,13 +5,16 @@ export declare enum TrackType {
5
5
  Motif = "motif",
6
6
  Importance = "importance",
7
7
  LDTrack = "ldtrack",
8
- BulkBed = "bulkbed"
8
+ BulkBed = "bulkbed",
9
+ MethylC = "methylc"
9
10
  }
10
11
  export declare enum DisplayMode {
11
12
  Full = "full",
12
13
  Dense = "dense",
13
14
  Squish = "squish",
14
- Pack = "pack"
15
+ Pack = "pack",
16
+ Combined = "combined",
17
+ Split = "split"
15
18
  }
16
19
  export interface InteractionConfig<Item> {
17
20
  onClick?: (item: Item) => void;