Skip to content

Commit

Permalink
More misc
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Aug 31, 2024
1 parent ae84321 commit 2fd4e1f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 114 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@ import { when } from 'mobx'

// locals
import { LinearSyntenyViewModel } from './LinearSyntenyView/model'

type LSV = LinearSyntenyViewModel

interface ViewData {
loc: string
assembly: string
tracks?: string[]
}

export default function LaunchLinearSyntenyView(pluginManager: PluginManager) {
pluginManager.addToExtensionPoint(
'LaunchView-LinearSyntenyView',
Expand All @@ -16,7 +23,7 @@ export default function LaunchLinearSyntenyView(pluginManager: PluginManager) {
tracks = [],
}: {
session: AbstractSessionModel
views: { loc: string; assembly: string; tracks?: string[] }[]
views: ViewData[]
tracks?: string[]
}) => {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import {
getSession,
isSessionModelWithWidgets,
Feature,
getContainingTrack,
getContainingView,
} from '@jbrowse/core/util'

// locals
Expand Down Expand Up @@ -162,6 +164,8 @@ export function onSynClick(
event: React.MouseEvent,
model: LinearSyntenyDisplayModel,
) {
const view = getContainingView(model)
const track = getContainingTrack(model)
const ref1 = model.clickMapCanvas
const ref2 = model.cigarClickMapCanvas
if (!ref1 || !ref2) {
Expand All @@ -179,17 +183,17 @@ export function onSynClick(
const unitMultiplier = Math.floor(MAX_COLOR_RANGE / model.numFeats)
const id = getId(r1!, g1!, b1!, unitMultiplier)
const feat = model.featPositions[id]
console.log('WOWOWOWOW')

Check warning on line 186 in plugins/linear-comparative-view/src/LinearSyntenyDisplay/components/util.ts

View workflow job for this annotation

GitHub Actions / Lint

Unexpected console statement
if (feat) {
const { f } = feat
model.setClickId(f.id())
const session = getSession(model)
if (isSessionModelWithWidgets(session)) {
session.showWidget(
session.addWidget('SyntenyFeatureWidget', 'syntenyFeature', {
featureData: {
feature1: f.toJSON(),
feature2: f.get('mate'),
},
session.addWidget('BaseFeatureWidget', 'baseFeature', {
view,
track,
featureData: f.toJSON(),
}),
)
}
Expand Down

This file was deleted.

36 changes: 0 additions & 36 deletions plugins/linear-comparative-view/src/SyntenyFeatureDetail/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions plugins/linear-comparative-view/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import LGVSyntenyDisplayF from './LGVSyntenyDisplay'
import LinearSyntenyViewF from './LinearSyntenyView'
import LaunchLinearSyntenyViewF from './LaunchLinearSyntenyView'
import SyntenyTrackF from './SyntenyTrack'
import SyntenyFeatureWidgetF from './SyntenyFeatureDetail'
import LinearReadVsRefMenuItemF from './LinearReadVsRef'

export default class LinearComparativeViewPlugin extends Plugin {
Expand All @@ -24,7 +23,6 @@ export default class LinearComparativeViewPlugin extends Plugin {
LGVSyntenyDisplayF(pluginManager)
LaunchLinearSyntenyViewF(pluginManager)
SyntenyTrackF(pluginManager)
SyntenyFeatureWidgetF(pluginManager)
LinearReadVsRefMenuItemF(pluginManager)
}

Expand Down

0 comments on commit 2fd4e1f

Please sign in to comment.