Skip to content

Jbrowse #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/jbrowse/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
.DS_Store
dist
dist-ssr
*.local
*.tsbuildinfo
21 changes: 21 additions & 0 deletions packages/jbrowse/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# vite with @jbrowse/react-app

This is a demo of using the @jbrowse/react-app NPM package with vite (see
https://vitejs.dev/)

Vite is a build system that is very fast and becoming more popular, using
esbuild and rollup instead of webpack

This particular demo includes several polyfills that are needed for JBrowse
including the Buffer polyfill

## Demo of `@jbrowse/react-app` with vite

See this app running at https://jbrowse.org/demos/app-vite/.

## Usage

Run `yarn` and then `yarn dev` to start a development instance

Run `yarn build` which produces a `build` directory that can be deployed to a
static web server
25 changes: 25 additions & 0 deletions packages/jbrowse/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import js from "@eslint/js";
import globals from "globals";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import tseslint from "typescript-eslint";

export default tseslint.config(
{ ignores: ["dist"] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ["**/*.{ts,tsx}"],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
},
},
);
11 changes: 11 additions & 0 deletions packages/jbrowse/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
41 changes: 41 additions & 0 deletions packages/jbrowse/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "galaxy-jbrowse",
"type": "module",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"preview": "vite preview",
"prettier": "prettier --config ./prettier.config.js --write '**/*.{css,json,js,jsx,ts,tsx,vue}'",
"predeploy": "npm run build",
"lint": "eslint ."
},
"devDependencies": {
"@eslint/js": "^9.13.0",
"@fontsource/roboto": "^5.0.2",
"@jbrowse/core": "^2.17.0",
"@jbrowse/react-app": "^2.17.0",
"@jbrowse/react-linear-genome-view": "^2.17.0",
"@types/react": "^18.2.43",
"@types/react-dom": "^18.0.9",
"@vitejs/plugin-react": "^4.2.1",
"@vitejs/plugin-vue": "^5.2.1",
"buffer": "^6.0.3",
"eslint": "^9.13.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
"galaxy-charts": "^0.0.40",
"galaxy-charts-xml-parser": "^1.0.3",
"globals": "^15.11.0",
"prettier": "^3.4.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"typescript": "^5.3.3",
"typescript-eslint": "^8.11.0",
"vite": "^5.0.7"
},
"resolutions": {
"@mui/icons-material": "6.0.2"
}
}
5 changes: 5 additions & 0 deletions packages/jbrowse/prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
tabWidth: 4,
printWidth: 120,
bracketSameLine: true,
};
269 changes: 269 additions & 0 deletions packages/jbrowse/public/jbrowse.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,269 @@
{
"assemblies": [
{
"name": "GRCh38",
"aliases": ["hg38"],
"sequence": {
"type": "ReferenceSequenceTrack",
"trackId": "GRCh38-ReferenceSequenceTrack",
"adapter": {
"type": "BgzipFastaAdapter",
"fastaLocation": {
"uri": "https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz"
},
"faiLocation": {
"uri": "https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz.fai"
},
"gziLocation": {
"uri": "https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz.gzi"
}
}
},
"refNameAliases": {
"adapter": {
"type": "RefNameAliasAdapter",
"location": {
"uri": "https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/hg38_aliases.txt"
}
}
}
}
],
"tracks": [
{
"type": "FeatureTrack",
"trackId": "genes",
"name": "NCBI RefSeq Genes",
"assemblyNames": ["GRCh38"],
"category": ["Genes"],
"adapter": {
"type": "Gff3TabixAdapter",
"gffGzLocation": {
"uri": "https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/ncbi_refseq/GCA_000001405.15_GRCh38_full_analysis_set.refseq_annotation.sorted.gff.gz"
},
"index": {
"location": {
"uri": "https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/ncbi_refseq/GCA_000001405.15_GRCh38_full_analysis_set.refseq_annotation.sorted.gff.gz.tbi"
}
}
},
"textSearching": {
"textSearchAdapter": {
"type": "TrixTextSearchAdapter",
"textSearchAdapterId": "gff3tabix_genes-index",
"ixFilePath": {
"uri": "https://jbrowse.org/genomes/GRCh38/ncbi_refseq/trix/GCA_000001405.15_GRCh38_full_analysis_set.refseq_annotation.sorted.gff.gz.ix"
},
"ixxFilePath": {
"uri": "https://jbrowse.org/genomes/GRCh38/ncbi_refseq/trix/GCA_000001405.15_GRCh38_full_analysis_set.refseq_annotation.sorted.gff.gz.ixx"
},
"metaFilePath": {
"uri": "https://jbrowse.org/genomes/GRCh38/ncbi_refseq/trix/GCA_000001405.15_GRCh38_full_analysis_set.refseq_annotation.sorted.gff.gz_meta.json"
},
"assemblyNames": ["GRCh38"]
}
}
},
{
"type": "FeatureTrack",
"trackId": "repeats_hg38",
"name": "Repeats",
"assemblyNames": ["hg38"],
"category": ["Annotation"],
"adapter": {
"type": "BigBedAdapter",
"bigBedLocation": {
"uri": "https://jbrowse.org/genomes/GRCh38/repeats.bb",
"locationType": "UriLocation"
}
}
},
{
"type": "AlignmentsTrack",
"trackId": "NA12878.alt_bwamem_GRCh38DH.20150826.CEU.exome",
"name": "NA12878 Exome",
"assemblyNames": ["GRCh38"],
"category": ["1000 Genomes", "Alignments"],
"adapter": {
"type": "CramAdapter",
"cramLocation": {
"uri": "https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/alignments/NA12878/NA12878.alt_bwamem_GRCh38DH.20150826.CEU.exome.cram"
},
"craiLocation": {
"uri": "https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/alignments/NA12878/NA12878.alt_bwamem_GRCh38DH.20150826.CEU.exome.cram.crai"
},
"sequenceAdapter": {
"type": "BgzipFastaAdapter",
"fastaLocation": {
"uri": "https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz"
},
"faiLocation": {
"uri": "https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz.fai"
},
"gziLocation": {
"uri": "https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz.gzi"
}
}
}
},
{
"type": "VariantTrack",
"trackId": "ALL.wgs.shapeit2_integrated_snvindels_v2a.GRCh38.27022019.sites.vcf",
"name": "1000 Genomes Variant Calls",
"assemblyNames": ["GRCh38"],
"category": ["1000 Genomes", "Variants"],
"adapter": {
"type": "VcfTabixAdapter",
"vcfGzLocation": {
"uri": "https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/variants/ALL.wgs.shapeit2_integrated_snvindels_v2a.GRCh38.27022019.sites.vcf.gz"
},
"index": {
"location": {
"uri": "https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/variants/ALL.wgs.shapeit2_integrated_snvindels_v2a.GRCh38.27022019.sites.vcf.gz.tbi"
}
}
}
},
{
"type": "QuantitativeTrack",
"trackId": "hg38.100way.phyloP100way",
"name": "hg38.100way.phyloP100way",
"category": ["Conservation"],
"assemblyNames": ["hg38"],
"adapter": {
"type": "BigWigAdapter",
"bigWigLocation": {
"uri": "https://hgdownload.cse.ucsc.edu/goldenpath/hg38/phyloP100way/hg38.phyloP100way.bw",
"locationType": "UriLocation"
}
}
}
],
"defaultSession": {
"name": "this session",
"margin": 0,
"views": [
{
"id": "linearGenomeView",
"minimized": false,
"type": "LinearGenomeView",
"offsetPx": 191980240,
"bpPerPx": 0.1554251851851852,
"displayedRegions": [
{
"refName": "10",
"start": 0,
"end": 133797422,
"reversed": false,
"assemblyName": "GRCh38"
}
],
"tracks": [
{
"id": "4aZAiE-A3",
"type": "ReferenceSequenceTrack",
"configuration": "GRCh38-ReferenceSequenceTrack",
"minimized": false,
"displays": [
{
"id": "AD3gqvG0_6",
"type": "LinearReferenceSequenceDisplay",
"height": 180,
"configuration": "GRCh38-ReferenceSequenceTrack-LinearReferenceSequenceDisplay",
"showForward": true,
"showReverse": true,
"showTranslation": true
}
]
},
{
"id": "T6uhrtY40O",
"type": "AlignmentsTrack",
"configuration": "NA12878.alt_bwamem_GRCh38DH.20150826.CEU.exome",
"minimized": false,
"displays": [
{
"id": "FinKswChSr",
"type": "LinearAlignmentsDisplay",
"PileupDisplay": {
"id": "YAAaF494z",
"type": "LinearPileupDisplay",
"height": 134,
"configuration": {
"type": "LinearPileupDisplay",
"displayId": "NA12878.alt_bwamem_GRCh38DH.20150826.CEU.exome-LinearAlignmentsDisplay_LinearPileupDisplay_xyz"
},
"showSoftClipping": false,
"filterBy": {
"flagInclude": 0,
"flagExclude": 1540
}
},
"SNPCoverageDisplay": {
"id": "VTQ_VGbAVJ",
"type": "LinearSNPCoverageDisplay",
"height": 45,
"configuration": {
"type": "LinearSNPCoverageDisplay",
"displayId": "NA12878.alt_bwamem_GRCh38DH.20150826.CEU.exome-LinearAlignmentsDisplay_snpcoverage_xyz"
},
"selectedRendering": "",
"resolution": 1,
"constraints": {},
"filterBy": {
"flagInclude": 0,
"flagExclude": 1540
}
},
"snpCovHeight": 45,
"configuration": "NA12878.alt_bwamem_GRCh38DH.20150826.CEU.exome-LinearAlignmentsDisplay",
"height": 179,
"lowerPanelType": "LinearPileupDisplay"
}
]
},
{
"id": "EUnTnpVI6",
"type": "QuantitativeTrack",
"configuration": "hg38.100way.phyloP100way",
"minimized": false,
"displays": [
{
"id": "mrlawr9Wtg",
"type": "LinearWiggleDisplay",
"height": 100,
"configuration": "hg38.100way.phyloP100way-LinearWiggleDisplay",
"selectedRendering": "",
"resolution": 1,
"constraints": {}
}
]
},
{
"id": "Cbnwl72EX",
"type": "VariantTrack",
"configuration": "ALL.wgs.shapeit2_integrated_snvindels_v2a.GRCh38.27022019.sites.vcf",
"minimized": false,
"displays": [
{
"id": "dvXz01Wf6w",
"type": "LinearVariantDisplay",
"height": 100,
"configuration": "ALL.wgs.shapeit2_integrated_snvindels_v2a.GRCh38.27022019.sites.vcf-LinearVariantDisplay"
}
]
}
],
"hideHeader": false,
"hideHeaderOverview": false,
"hideNoTracksActive": false,
"trackSelectorType": "hierarchical",
"trackLabels": "overlapping",
"showCenterLine": false,
"showCytobandsSetting": true,
"showGridlines": true,
"showTopMenu": false
}
]
}
}
Loading