Skip to content

Commit

Permalink
[skip ci] Add defaultSession file
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Dec 16, 2022
1 parent 20da5a8 commit 1903f4b
Show file tree
Hide file tree
Showing 26 changed files with 937 additions and 338 deletions.
22 changes: 22 additions & 0 deletions embedded_demos/base/circular/defaultSession.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export default {
name: 'My session',
view: {
id: 'circularView',
type: 'CircularView',
bpPerPx: 5000000,
tracks: [
{
id: 'uPdLKHik1',
type: 'VariantTrack',
configuration: 'pacbio_sv_vcf',
displays: [
{
id: 'v9QVAR3oaB',
type: 'ChordVariantDisplay',
configuration: 'pacbio_sv_vcf-ChordVariantDisplay',
},
],
},
],
},
}
130 changes: 130 additions & 0 deletions embedded_demos/base/linear/defaultSession.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
export default {
name: 'this session',
margin: 0,
view: {
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,
},
}
9 changes: 9 additions & 0 deletions embedded_demos/copy_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ cp base/linear/tracks.ts jbrowse-react-linear-genome-view-cra5/src/
cp base/linear/tracks.ts jbrowse-react-linear-genome-view-vite/src/
cp base/linear/tracks.ts jbrowse-react-linear-genome-view-nextjs/utils/
cp base/linear/tracks.ts jbrowse-react-linear-genome-view-vanillajs/tracks.js
cp base/linear/defaultSession.ts jbrowse-react-linear-genome-view/src/
cp base/linear/defaultSession.ts jbrowse-react-linear-genome-view-cra5/src/
cp base/linear/defaultSession.ts jbrowse-react-linear-genome-view-vite/src/
cp base/linear/defaultSession.ts jbrowse-react-linear-genome-view-nextjs/utils/
cp base/linear/defaultSession.ts jbrowse-react-linear-genome-view-vanillajs/defaultSession.js



## circular
Expand All @@ -19,3 +25,6 @@ cp base/circular/assembly.ts jbrowse-react-circular-genome-view-vanillajs/assemb
cp base/circular/tracks.ts jbrowse-react-circular-genome-view/src/
cp base/circular/tracks.ts jbrowse-react-circular-genome-view-cra5/src/
cp base/circular/tracks.ts jbrowse-react-circular-genome-view-vanillajs/tracks.js
cp base/circular/defaultSession.ts jbrowse-react-circular-genome-view/src/
cp base/circular/defaultSession.ts jbrowse-react-circular-genome-view-cra5/src/
cp base/circular/defaultSession.ts jbrowse-react-circular-genome-view-vanillajs/defaultSession.js
31 changes: 5 additions & 26 deletions embedded_demos/jbrowse-react-circular-genome-view-cra5/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,12 @@ import {

import assembly from './assembly'
import tracks from './tracks'
import defaultSession from './defaultSession'

const defaultSession = {
name: 'My session',
view: {
id: 'circularView',
type: 'CircularView',
bpPerPx: 5000000,
tracks: [
{
id: 'uPdLKHik1',
type: 'VariantTrack',
configuration: 'pacbio_sv_vcf',
displays: [
{
id: 'v9QVAR3oaB',
type: 'ChordVariantDisplay',
configuration: 'pacbio_sv_vcf-ChordVariantDisplay',
},
],
},
],
},
}
type ViewModel = ReturnType<typeof createViewState>

function View() {
const [viewState, setViewState] =
useState<ReturnType<typeof createViewState>>()
const [viewState, setViewState] = useState<ViewModel>()
const [patches, setPatches] = useState('')
const [stateSnapshot, setStateSnapshot] = useState('')

Expand Down Expand Up @@ -63,11 +42,11 @@ function View() {
<p>
The code for this app is available at{' '}
<a
href="https://github.com/GMOD/jbrowse-components/tree/main/demos/jbrowse-react-circular-genome-view-cra5"
href="https://github.com/GMOD/jbrowse-components/tree/main/embedded_demos/jbrowse-react-circular-genome-view-cra5"
target="_blank"
rel="noreferrer"
>
https://github.com/GMOD/jbrowse-components/tree/main/demos/jbrowse-react-circular-genome-view-cra5
https://github.com/GMOD/jbrowse-components/tree/main/embedded_demos/jbrowse-react-circular-genome-view-cra5
</a>
.
</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export default {
name: 'My session',
view: {
id: 'circularView',
type: 'CircularView',
bpPerPx: 5000000,
tracks: [
{
id: 'uPdLKHik1',
type: 'VariantTrack',
configuration: 'pacbio_sv_vcf',
displays: [
{
id: 'v9QVAR3oaB',
type: 'ChordVariantDisplay',
configuration: 'pacbio_sv_vcf-ChordVariantDisplay',
},
],
},
],
},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export default {
name: 'My session',
view: {
id: 'circularView',
type: 'CircularView',
bpPerPx: 5000000,
tracks: [
{
id: 'uPdLKHik1',
type: 'VariantTrack',
configuration: 'pacbio_sv_vcf',
displays: [
{
id: 'v9QVAR3oaB',
type: 'ChordVariantDisplay',
configuration: 'pacbio_sv_vcf-ChordVariantDisplay',
},
],
},
],
},
}
Original file line number Diff line number Diff line change
@@ -1,35 +1,13 @@
/* global JBrowseReactCircularGenomeView React, ReactDOM */
import assembly from './assembly.js'
import tracks from './tracks.js'
import defaultSession from './defaultSession.js'

const { createViewState, JBrowseCircularGenomeView } =
JBrowseReactCircularGenomeView
const { createElement } = React
const { render } = ReactDOM

const defaultSession = {
name: 'My session',
view: {
id: 'circularView',
type: 'CircularView',
bpPerPx: 5000000,
tracks: [
{
id: 'uPdLKHik1',
type: 'VariantTrack',
configuration: 'pacbio_sv_vcf',
displays: [
{
id: 'v9QVAR3oaB',
type: 'ChordVariantDisplay',
configuration: 'pacbio_sv_vcf-ChordVariantDisplay',
},
],
},
],
},
}

const updates = document.getElementById('update')
const state = new createViewState({
assembly,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@
<body>
<h2>Using JBrowse Circular Genome View!</h2>
<div id="jbrowse_circular_genome_view"></div>
<h2>Code</h2>

<p>
The code for this app is available at
<a
href="https://github.com/GMOD/jbrowse-components/tree/main/embedded_demos/jbrowse-react-circular-genome-view-vanillajs"
>https://github.com/GMOD/jbrowse-components/tree/main/embedded_demos/jbrowse-react-circular-view-vanillajs</a
>
</p>
<script type="module" src="genomeView.js"></script>
<button id="showviewstate">Show view state</button>
<textarea id="viewstate" name="viewstate" rows="20" cols="80"></textarea>
Expand Down
31 changes: 5 additions & 26 deletions embedded_demos/jbrowse-react-circular-genome-view/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,12 @@ import {

import assembly from './assembly'
import tracks from './tracks'
import defaultSession from './defaultSession'

const defaultSession = {
name: 'My session',
view: {
id: 'circularView',
type: 'CircularView',
bpPerPx: 5000000,
tracks: [
{
id: 'uPdLKHik1',
type: 'VariantTrack',
configuration: 'pacbio_sv_vcf',
displays: [
{
id: 'v9QVAR3oaB',
type: 'ChordVariantDisplay',
configuration: 'pacbio_sv_vcf-ChordVariantDisplay',
},
],
},
],
},
}
type ViewModel = ReturnType<typeof createViewState>

function View() {
const [viewState, setViewState] =
useState<ReturnType<typeof createViewState>>()
const [viewState, setViewState] = useState<ViewModel>()
const [patches, setPatches] = useState('')
const [stateSnapshot, setStateSnapshot] = useState('')

Expand Down Expand Up @@ -63,11 +42,11 @@ function View() {
<p>
The code for this app is available at{' '}
<a
href="https://github.com/GMOD/jbrowse-components/tree/main/demos/jbrowse-react-circular-genome-view"
href="https://github.com/GMOD/jbrowse-components/tree/main/embedded_demos/jbrowse-react-circular-genome-view"
target="_blank"
rel="noreferrer"
>
https://github.com/GMOD/jbrowse-components/tree/main/demos/jbrowse-react-circular-genome-view
https://github.com/GMOD/jbrowse-components/tree/main/embedded_demos/jbrowse-react-circular-genome-view
</a>
.
</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export default {
name: 'My session',
view: {
id: 'circularView',
type: 'CircularView',
bpPerPx: 5000000,
tracks: [
{
id: 'uPdLKHik1',
type: 'VariantTrack',
configuration: 'pacbio_sv_vcf',
displays: [
{
id: 'v9QVAR3oaB',
type: 'ChordVariantDisplay',
configuration: 'pacbio_sv_vcf-ChordVariantDisplay',
},
],
},
],
},
}
Loading

0 comments on commit 1903f4b

Please sign in to comment.