Skip to content

Commit

Permalink
VALIS-26-enable-plotting-of-ENCD-bigbed-types (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoldello authored Nov 12, 2020
1 parent 6d247b0 commit fc96a23
Show file tree
Hide file tree
Showing 16 changed files with 752 additions and 105 deletions.
14 changes: 12 additions & 2 deletions @types/formats/Formats.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,21 @@ export declare enum GenomicFileFormat {
BigBed = 1,
ValisGenes = 2,
ValisDna = 3,
ValisVariants = 4
ValisVariants = 4,
BigBedNarrowPeak = 5,
BigBedBroadPeak = 6,
BigBedDataTssPeak = 7,
BigBedDataIdrPeak = 8,
BigBedData3Plus = 9,
BigBedData6Plus = 10,
BigBedData9Plus = 11
}
export declare class Formats {
static extensionMap: {
[key: string]: GenomicFileFormat;
};
static determineFormat(path: string): GenomicFileFormat | undefined;
static ENCODEBigBedMap: {
[key: string]: GenomicFileFormat;
};
static determineFormat(path: string, fileFormatType?: string): GenomicFileFormat | undefined;
}
1 change: 1 addition & 0 deletions @types/track/TrackModel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export declare type TrackModel = {
heightPx?: number;
expandedHeightPx?: number;
highlightLocation?: string;
fileFormatType?: string;
expandable?: boolean;
color?: Array<number>;
styleSelector?: string;
Expand Down
16 changes: 13 additions & 3 deletions @types/track/annotation/AnnotationTileLoader.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import IDataSource from "../../data-source/IDataSource";
import { Tile, TileLoader } from "../TileLoader";
import { GeneInfo, TranscriptComponentInfo, TranscriptInfo } from "./AnnotationTypes";
import { GeneInfo, TranscriptComponentInfo, TranscriptInfo, BigBedBroadPeakColumns, BigBedNarrowPeakColumns, BigBedTssPeakColumns, BigBedIdrPeakColumns, BigBedData3Plus, BigBedData6Plus, BigBedData9Plus } from "./AnnotationTypes";
import { BigLoader } from "../../formats";
import { Contig, AnnotationTrackModel } from "../..";
export declare type Gene = GeneInfo & {
transcripts: Array<Transcript>;
};
} & BigBedBroadPeakColumns & BigBedNarrowPeakColumns & BigBedTssPeakColumns & BigBedIdrPeakColumns;
export declare type Transcript = TranscriptInfo & {
exon: Array<TranscriptComponentInfo>;
cds: Array<TranscriptComponentInfo>;
Expand All @@ -15,7 +15,14 @@ export declare type Transcript = TranscriptInfo & {
declare type TilePayload = Array<Gene>;
declare enum AnnotationFormat {
ValisGenes = 0,
BigBed = 1
BigBed = 1,
BigBedDataBroadPeak = 2,
BigBedDataNarrowPeak = 3,
BigBedDataTssPeak = 4,
BigBedDataIdrPeak = 5,
BigBedData3Plus = 6,
BigBedData6Plus = 7,
BigBedData9Plus = 8
}
export declare class AnnotationTileLoader extends TileLoader<TilePayload, void> {
protected readonly dataSource: IDataSource;
Expand All @@ -36,4 +43,7 @@ export declare class AnnotationTileLoader extends TileLoader<TilePayload, void>
protected getTilePayload(tile: Tile<TilePayload>): Promise<TilePayload> | TilePayload;
static loadValisGenesAnnotations(path: string, contig: string, startBaseIndex: number, span: number, macro: boolean): Promise<TilePayload>;
}
export declare const parseBigBed3Plus: (chrom: string, startBase: number, endBase: number, rest: string) => BigBedData3Plus;
export declare const parseBigBed6Plus: (chrom: string, startBase: number, endBase: number, rest: string) => BigBedData6Plus;
export declare const parseBigBed9Plus: (chrom: string, startBase: number, endBase: number, rest: string) => BigBedData9Plus;
export default AnnotationTileLoader;
52 changes: 52 additions & 0 deletions @types/track/annotation/AnnotationTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,58 @@ export interface GeneInfo extends GenomeFeature {
score?: number;
color?: string;
}
export interface BigBedBroadPeakColumns {
signalValue?: number;
pValue?: number;
qValue?: number;
}
export interface BigBedNarrowPeakColumns {
signalValue?: number;
pValue?: number;
qValue?: number;
peak?: number;
}
export interface BigBedTssPeakColumns {
count?: number;
gene_id?: string;
gene_name?: string;
tss_id?: string;
peak_cov?: string;
}
export interface BigBedIdrPeakColumns {
localIDR?: number;
globalIDR?: number;
rep1_chromStart?: number;
rep1_chromEnd?: number;
rep1_count?: number;
rep2_chromStart?: number;
rep2_chromEnd?: number;
rep2_count?: number;
}
export interface BigBedData3Plus {
chr: string;
start: number;
end: number;
}
export interface BigBedData6Plus {
chr: string;
start: number;
end: number;
name?: string;
score?: number;
strand?: string;
}
export interface BigBedData9Plus {
chr: string;
start: number;
end: number;
name?: string;
score?: number;
strand?: string;
cdStart?: number;
cdEnd?: number;
color?: string;
}
export declare enum TranscriptClass {
Unspecified = 0,
ProteinCoding = 1,
Expand Down
20 changes: 10 additions & 10 deletions dist/valis-hpgv.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/valis-hpgv.js.map

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions dist/valis-hpgv.react-peer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/valis-hpgv.react-peer.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit fc96a23

Please sign in to comment.