Skip to content

Commit

Permalink
more cleanups...
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaudis committed Nov 26, 2024
1 parent e65f814 commit f805c7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 57 deletions.
12 changes: 6 additions & 6 deletions src/components/Chromosome.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,17 @@ const autoZoomFactor = 1.4
export function Chromosome({
bands,
startRange,
chro,
refseqId,
endRange,
zoomStart = 0,
zoomEnd = getMax(bands),
width = 600,
defaultAutoZoom = false
}) {
const chro = refseq2chro(refseqId)
const startRangeError = checkIntegerRange(startRange)
const endRangeError = checkIntegerRange(endRange)

const [autoZoom, setAutoZoom] = useState(defaultAutoZoom)

const { start, startMax } = startRangeError ? {} : getStarts(startRange)
const { end, endMin } = endRangeError ? {} : findEnds(endRange)
if (autoZoom) {
Expand All @@ -38,9 +37,7 @@ export function Chromosome({
width
)
const [source, target] = useSingleton()

const bandsHeight = height * outerBandsHeightRatio

const chroLabel = "Chromosome " + chro

return (
Expand Down Expand Up @@ -142,6 +139,10 @@ export function Chromosome({
)
}

export function refseq2chro(refseqId) {
return refseqId.replace(/refseq:NC_00000?0?0?/, "").replace(/\.\d\d?$/, "")
}

const verticalLine = (calcX) =>
function VerticalLine(bandPosition, stroke) {
return (
Expand All @@ -159,7 +160,6 @@ const verticalLine = (calcX) =>
const annotation = (calcX) =>
function VerticalLine(bandPosition, text, fill, position, anchor = "middle") {
const x = calcX(bandPosition)

let y = "0"
let alignmentBaseline = "hanging"
if (position === "bottom") {
Expand Down
51 changes: 0 additions & 51 deletions src/pages/service-collection/cytomapper.js

This file was deleted.

0 comments on commit f805c7e

Please sign in to comment.