-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #383 from vgteam/document-and-format
Document and format
- Loading branch information
Showing
66 changed files
with
4,009 additions
and
3,673 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,46 @@ | ||
|
||
// Interface for handling function called from the tubemap frontend | ||
// Abstract class expecting different implmentations of the following functions | ||
// Substituting different subclasses should allow the functions to give the same result | ||
// Substituting different subclasses should allow the functions to give the same result | ||
export class APIInterface { | ||
// Takes in and process a tube map view(viewTarget) from the tubemap container | ||
// Expects a object to be returned with the necessary information to draw a tubemap from vg | ||
// object should contain keys: graph, gam, region, coloredNodes | ||
async getChunkedData(viewTarget) { | ||
throw new Error("getChunkedData function not implemented"); | ||
} | ||
// Takes in and process a tube map view(viewTarget) from the tubemap container. | ||
// Expects a object to be returned with the necessary information to draw a tubemap from vg | ||
// object should contain keys: graph, gam, region, coloredNodes. | ||
// cancelSignal is an AbortSignal that can be used to cancel the request. | ||
async getChunkedData(viewTarget, cancelSignal) { | ||
throw new Error("getChunkedData function not implemented"); | ||
} | ||
|
||
// Returns files used to determine what options are available in the track picker | ||
// Returns object with keys: files, bedFiles | ||
async getFilenames() { | ||
throw new Error("getFilenames function not implemented"); | ||
} | ||
// Returns files used to determine what options are available in the track picker. | ||
// Returns object with keys: files, bedFiles. | ||
// cancelSignal is an AbortSignal that can be used to cancel the request. | ||
async getFilenames(cancelSignal) { | ||
throw new Error("getFilenames function not implemented"); | ||
} | ||
|
||
// Takes in a bedfile path or a url pointing to a raw bed file | ||
// Returns object with key: bedRegions | ||
// bedRegions contains information extrapolated from each line of the bedfile | ||
async getBedRegions(bedFile) { | ||
throw new Error("getBedRegions function not implemented"); | ||
} | ||
// Takes in a bedfile path or a url pointing to a raw bed file. | ||
// Returns object with key: bedRegions. | ||
// bedRegions contains information extrapolated from each line of the bedfile. | ||
// cancelSignal is an AbortSignal that can be used to cancel the request. | ||
async getBedRegions(bedFile, cancelSignal) { | ||
throw new Error("getBedRegions function not implemented"); | ||
} | ||
|
||
// Takes in a graphFile path | ||
// Returns object with key: pathNames | ||
// Returns pathnames available in a graphfile | ||
async getPathNames(graphFile) { | ||
throw new Error("getPathNames function not implemented"); | ||
} | ||
// Takes in a graphFile path. | ||
// Returns object with key: pathNames. | ||
// Returns pathnames available in a graphfile. | ||
// cancelSignal is an AbortSignal that can be used to cancel the request. | ||
async getPathNames(graphFile, cancelSignal) { | ||
throw new Error("getPathNames function not implemented"); | ||
} | ||
|
||
// Expects a bed file(or url) and a chunk name | ||
// Attempts to download tracks associated with the chunk name from the bed file if it is a URL | ||
// Returns object with key: tracks | ||
// Returns tracks found from local directories as a tracks object | ||
async getChunkTracks(bedFile, chunk) { | ||
throw new Error("getChunkTracks function not implemented"); | ||
} | ||
// Expects a bed file(or url) and a chunk name. | ||
// Attempts to download tracks associated with the chunk name from the bed file if it is a URL. | ||
// Returns object with key: tracks. | ||
// Returns tracks found from local directories as a tracks object. | ||
// cancelSignal is an AbortSignal that can be used to cancel the request. | ||
async getChunkTracks(bedFile, chunk, cancelSignal) { | ||
throw new Error("getChunkTracks function not implemented"); | ||
} | ||
} | ||
|
||
export default APIInterface; | ||
export default APIInterface; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.