Skip to content

Commit f149b29

Browse files
committed
All npm imports updated to modern style
1 parent 5983851 commit f149b29

39 files changed

+98
-182
lines changed

js/bigwig/bbDecoders.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {IGVColor} from "../../node_modules/igv-utils/src/index.js"
1+
import {IGVColor} from 'igv-utils'
22

33
function getDecoder(definedFieldCount, fieldCount, autoSql, format) {
44

js/bigwig/bpTree.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {igvxhr} from "../../node_modules/igv-utils/src/index.js"
1+
import {igvxhr} from 'igv-utils'
22
import {buildOptions} from "../util/igvUtils.js"
33
import BinaryParser from "../binary.js"
44

js/bigwig/bufferedReader.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
import {igvxhr} from "../../node_modules/igv-utils/src/index.js"
1+
import {igvxhr} from 'igv-utils'
32
import {buildOptions} from "../util/igvUtils.js"
43

54
class BufferedReader {

js/bigwig/bwReader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
import RPTree from "./rpTree.js"
2727
import BinaryParser from "../binary.js"
28-
import {BGZip, igvxhr, StringUtils} from "../../node_modules/igv-utils/src/index.js"
28+
import {BGZip, igvxhr, StringUtils} from 'igv-utils'
2929
import {buildOptions, isDataURL} from "../util/igvUtils.js"
3030
import getDecoder from "./bbDecoders.js"
3131
import {parseAutoSQL} from "../util/ucscUtils.js"

js/bigwig/rpTree.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {igvxhr} from "../../node_modules/igv-utils/src/index.js"
1+
import {igvxhr} from 'igv-utils'
22
import BinaryParser from "../binary.js"
33
import {buildOptions} from "../util/igvUtils.js"
44

js/bigwig/trix.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// A copy of the license for the GMOD trix-js distribution on which this is based may be downloaded
77
// from: https://raw.githubusercontent.com/GMOD/trix-js/ma
88

9-
import {igvxhr} from "../../node_modules/igv-utils/src/index.js"
9+
import {igvxhr} from 'igv-utils'
1010

1111

1212
// this is the number of hex characters to use for the address in ixixx, see

js/feature/color/featureColorManager.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {ColorTable, PaletteColorTable} from "../../util/colorPalletes.js"
2-
import {IGVColor} from "../../../node_modules/igv-utils/src/index.js"
2+
import {IGVColor} from 'igv-utils'
33

44
export default class FeatureColorManager {
55
static defaultColor = 'rgb(0,0,150)'
@@ -13,7 +13,7 @@ export default class FeatureColorManager {
1313
this._initialAltColor = this.altColor || this.constructor.defaultColor
1414

1515
// Set up color table if colorBy is specified
16-
if (config.colorBy) {
16+
if (config.colorBy)
1717
if (config.colorBy.field) {
1818
config.colorTable = config.colorBy.pallete || config.colorBy.palette
1919
config.colorBy = config.colorBy.field
@@ -70,4 +70,4 @@ export default class FeatureColorManager {
7070
const binNumber = Math.floor((score - min) / binWidth)
7171
return Math.min(1.0, 0.2 + (binNumber * 0.8) / 9)
7272
}
73-
}
73+
}

js/feature/customServiceReader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2424
* THE SOFTWARE.
2525
*/
26-
import {igvxhr, StringUtils} from "../../node_modules/igv-utils/src/index.js"
26+
import {igvxhr, StringUtils} from 'igv-utils'
2727

2828
const isString = StringUtils.isString
2929

js/feature/decode/bedpe.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {IGVColor} from "../../../node_modules/igv-utils/src/index.js"
1+
import {IGVColor} from 'igv-utils'
22
import {isNumber} from "../../util/igvUtils.js"
33

44
/**

js/feature/decode/ucsc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {IGVColor} from "../../../node_modules/igv-utils/src/index.js"
1+
import {IGVColor} from 'igv-utils'
22
import DecodeError from "./decodeError.js"
33

44
import {parseAttributeString} from "../gff/parseAttributeString.js"

js/feature/featureFileReader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* THE SOFTWARE.
2424
*/
2525

26-
import {BGZip, FileUtils, igvxhr, URIUtils} from "../../node_modules/igv-utils/src/index.js"
26+
import {BGZip, FileUtils, igvxhr, URIUtils} from 'igv-utils'
2727
import FeatureParser from "./featureParser.js"
2828
import {buildOptions, isDataURL} from "../util/igvUtils.js"
2929
import getDataWrapper from "./dataWrapper.js"

js/feature/gff/gff.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {IGVColor} from "../../../node_modules/igv-utils/src/index.js"
1+
import {IGVColor} from 'igv-utils'
22
import {GFFFeature} from "./gffFeature.js"
33
import {decodeGFFAttribute, parseAttributeString} from "./parseAttributeString.js"
44

js/feature/gff/gffFeature.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {StringUtils} from "../../../node_modules/igv-utils/src/index.js"
1+
import {StringUtils} from 'igv-utils'
22
import {isCoding, isIntron, isUTR} from "./so.js"
33

44

js/feature/staticFeatureSource.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* THE SOFTWARE.
2424
*/
2525

26-
import {FeatureCache} from "../../node_modules/igv-utils/src/index.js"
26+
import {FeatureCache} from 'igv-utils'
2727
import {computeWGFeatures, findFeatureAfterCenter, packFeatures} from "./featureUtils.js"
2828
import BaseFeatureSource from "./baseFeatureSource.js"
2929

js/feature/textFeatureSource.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {FeatureCache} from "../../node_modules/igv-utils/src/index.js"
1+
import {FeatureCache} from 'igv-utils'
22
import FeatureFileReader from "./featureFileReader.js"
33
import GenomicInterval from "../genome/genomicInterval.js"
44
import {packFeatures} from "./featureUtils.js"

js/gbk/genbankParser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {igvxhr} from "../../node_modules/igv-utils/src/index.js"
1+
import {igvxhr} from 'igv-utils'
22
import getDataWrapper from "../feature/dataWrapper.js"
33
import Genbank from "./genbank.js"
44

js/genome/chromAliasDefaults.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
* Default chromosome aliases, mostly 1<->chr1 etc. Used if chrom alias file is not supplied.
33
*
44
*/
5-
import {isNumber, buildOptions} from "../util/igvUtils.js"
6-
import {igvxhr, StringUtils} from "../../node_modules/igv-utils/src/index.js"
75

86
class ChromAliasDefaults {
97

js/genome/chromAliasFile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @returns {Promise<*[]>}
1111
*/
1212
import {buildOptions} from "../util/igvUtils.js"
13-
import {igvxhr, StringUtils} from "../../node_modules/igv-utils/src/index.js"
13+
import {igvxhr, StringUtils} from 'igv-utils'
1414
import ChromAliasDefaults from "./chromAliasDefaults.js"
1515

1616
class ChromAliasFile {

js/genome/chromSizes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {BGZip, igvxhr, StringUtils} from "../../node_modules/igv-utils/src/index.js"
1+
import {BGZip, igvxhr, StringUtils} from 'igv-utils'
22
import Chromosome from "./chromosome.js"
33
import {isDataURL} from "../util/igvUtils.js"
44

js/genome/genome.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {StringUtils} from "../../node_modules/igv-utils/src/index.js"
1+
import {StringUtils} from 'igv-utils'
22
import Chromosome from "./chromosome.js"
33
import {loadSequence} from "./loadSequence.js"
44
import ChromAliasBB from "./chromAliasBB.js"

js/genome/genomeUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {igvxhr} from "../../node_modules/igv-utils/src/index.js"
1+
import {igvxhr} from 'igv-utils'
22

33
const DEFAULT_GENOMES_URL = "https://igv.org/genomes/genomes3.json"
44
const BACKUP_GENOMES_URL = "https://raw.githubusercontent.com/igvteam/igv-data/refs/heads/main/genomes/web/genomes.json"

js/genome/indexedFasta.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525

2626
// Indexed fasta files
27-
import {BGZip, igvxhr, StringUtils} from "../../node_modules/igv-utils/src/index.js"
27+
import {BGZip, igvxhr, StringUtils} from 'igv-utils'
2828
import GenomicInterval from "./genomicInterval.js"
2929
import Chromosome from "./chromosome.js"
3030
import {buildOptions} from "../util/igvUtils.js"
@@ -174,7 +174,7 @@ class FastaSequence {
174174

175175
//The Fasta-index gives a byte-position of the chromosomal sequences within the FASTA file.
176176
//These locations need to be remapped to the locations within the zipped reference genome, using the GZI index
177-
//This function provides this functionality by
177+
//This function provides this functionality by
178178
//1) taking the indicated start/stop byte locations within the UNCOMPRESSED FASTA file
179179
//2) remapping these byte locations to the correct blocks (and associated positions) within the COMPRESSED FASTA file
180180
//Subsequently, the calling method can then extract the correct blocks from the compressed FASTA files and uncompressed the data
@@ -249,7 +249,7 @@ class FastaSequence {
249249

250250
//It is possible that the query end position lies AFTER the start of the final block
251251
//If this is the case, we add a 'fake' negative index which will be interpreted by the loadAndUncompressBlocks method as an indicator
252-
//to read until the end of the file
252+
//to read until the end of the file
253253
const finalRelevantBlock = result[result.length - 1]
254254
const finalIndexBlock = this.compressedIndex.length - 1
255255
if (finalRelevantBlock === finalIndexBlock && (this.compressedIndex)[finalRelevantBlock][UNCOMPRESSED_POSITION] < queryPositionEnd) {
@@ -313,7 +313,7 @@ class FastaSequence {
313313
}
314314
}
315315

316-
//postprocess this data: because entire blocks are read we need to remove the first N bases of the first used block,
316+
//postprocess this data: because entire blocks are read we need to remove the first N bases of the first used block,
317317
//which are not included in the original query positions
318318
const firstBlockInfo = (this.compressedIndex)[blockIndices[0]]
319319
const offset = startByte - firstBlockInfo[UNCOMPRESSED_POSITION]

js/genome/nonIndexedFasta.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {BGZip, igvxhr, StringUtils} from "../../node_modules/igv-utils/src/index.js"
1+
import {BGZip, igvxhr, StringUtils} from 'igv-utils'
22
import Chromosome from "./chromosome.js"
33
import {buildOptions, isDataURL} from "../util/igvUtils.js"
44
import SequenceInterval from "./sequenceInterval.js"

js/genome/twobit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66

7-
import {igvxhr} from "../../node_modules/igv-utils/src/index.js"
7+
import {igvxhr} from 'igv-utils'
88
import BinaryParser from "../binary.js"
99
import BPTree from "../bigwig/bpTree.js"
1010

@@ -315,4 +315,4 @@ class Block {
315315
}
316316

317317

318-
export default TwobitSequence
318+
export default TwobitSequence

js/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {igvxhr, StringUtils} from "../node_modules/igv-utils/src/index.js"
1+
import {igvxhr, StringUtils} from 'igv-utils'
22

33

44
const DEFAULT_SEARCH_CONFIG = {

js/util/colorPalletes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {IGVMath} from "../../node_modules/igv-utils/src/index.js"
1+
import {IGVMath} from 'igv-utils'
22

33
function hexToRGB(hex) {
44
// Ensure the hex value is in the proper format

js/util/colorScale.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {IGVColor} from "../../node_modules/igv-utils/src/index.js"
1+
import {IGVColor} from 'igv-utils'
22

33

44
const ColorScaleFactory = {

js/util/deepCopy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Fast deep copy function, copied from https://github.com/davidmarkclements/rfdc
33
* Function is copied rather than imported because project does not support es6 import, only 'require'
44
*/
5-
import {FileUtils} from "../../node_modules/igv-utils/src/index.js"
5+
import {FileUtils} from 'igv-utils'
66

77

88
function cloneArray(a, fn) {
@@ -44,4 +44,4 @@ function deepCopy(o) {
4444
}
4545

4646

47-
export default deepCopy
47+
export default deepCopy

js/util/fileFormatUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {buildOptions, getFilename} from "./igvUtils.js"
22
import BinaryParser from "../binary.js"
3-
import {BGZip, igvxhr, StringUtils} from "../../node_modules/igv-utils/src/index.js"
3+
import {BGZip, igvxhr, StringUtils} from 'igv-utils'
44

55
const BIGWIG_MAGIC_LTH = 0x888FFC26 // BigWig Magic Low to High
66
const BIGWIG_MAGIC_HTL = 0x26FC8F66 // BigWig Magic High to Low

js/util/getChrColor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {IGVColor} from "../../node_modules/igv-utils/src/index.js"
1+
import {IGVColor} from 'igv-utils'
22

33
export function getChrColor(chr) {
44
if (chrColorMap[chr]) {
@@ -72,4 +72,4 @@ const chrColorMap = {
7272
"chr46": "rgb(255, 20, 99)",
7373
"chr47": "rgb(0, 214, 143)",
7474
"chr48": "rgb(20, 255, 177)",
75-
}
75+
}

js/util/igvUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* THE SOFTWARE.
2424
*/
2525

26-
import {FileUtils, StringUtils} from "../../node_modules/igv-utils/src/index.js"
26+
import {FileUtils, StringUtils} from 'igv-utils'
2727
import * as DOMUtils from "./dom-utils.js"
2828

2929
const extend = function (parent, child) {

js/util/paintAxis.js

Lines changed: 0 additions & 69 deletions
This file was deleted.

js/util/viewportUtils.js

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)