@weng-lab/genomebrowser 1.1.1 → 1.2.1

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
16
  export declare function buildBigRequests(tracks: Track[], domain: Domain, preRenderedWidth: number): BigRequest[];
16
- /**
17
+ /**`
17
18
  * Build BulkBed requests for given tracks
18
19
  */
19
20
  export declare function buildBulkBedRequests(tracks: Track[], domain: Domain): BigRequest[];
@@ -34,6 +35,7 @@ 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
  */
@@ -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;
@@ -1,4 +1,2 @@
1
- import { default as React } from 'react';
2
1
  import { CentromereProps } from './types';
3
- declare const Centromere: React.FC<CentromereProps>;
4
- export default Centromere;
2
+ export default function Centromere(props: CentromereProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,2 @@
1
- import { default as React } from 'react';
2
1
  import { CytobandProps } from './types';
3
- declare const Cytoband: React.FC<CytobandProps>;
4
- export default Cytoband;
2
+ export default function Cytoband(props: CytobandProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,4 +1,2 @@
1
- import { default as React } from 'react';
2
1
  import { CytobandHighlightProps } from './types';
3
- declare const CytobandHighlight: React.FC<CytobandHighlightProps>;
4
- export default CytobandHighlight;
2
+ export default function CytobandHighlight(props: CytobandHighlightProps): import("react/jsx-runtime").JSX.Element;
@@ -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;