igv 3.7.2 → 3.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,19 +18,19 @@ Below are examples and a quickstart guide. See the [developer documentation](ht
18
18
 
19
19
  # Examples
20
20
 
21
- ***[Alignments](https://igv.org/web/release/3.7.2/examples/cram-vcf.html)***
21
+ ***[Alignments](https://igv.org/web/release/3.7.3/examples/cram-vcf.html)***
22
22
 
23
- ***[Interactions](https://igv.org/web/release/3.7.2/examples/interact.html)***
23
+ ***[Interactions](https://igv.org/web/release/3.7.3/examples/interact.html)***
24
24
 
25
- ***[Copy number](https://igv.org/web/release/3.7.2/examples/copyNumber.html)***
25
+ ***[Copy number](https://igv.org/web/release/3.7.3/examples/copyNumber.html)***
26
26
 
27
- ***[Multiple regions](https://igv.org/web/release/3.7.2/examples/multi-locus.html)***
27
+ ***[Multiple regions](https://igv.org/web/release/3.7.3/examples/multi-locus.html)***
28
28
 
29
- ***[Mutation Annotation Format (MAF)](https://igv.org/web/release/3.7.2/examples/maf-tcga.html)***
29
+ ***[Mutation Annotation Format (MAF)](https://igv.org/web/release/3.7.3/examples/maf-tcga.html)***
30
30
 
31
- ***[Variant color options](https://igv.org/web/release/3.7.2/examples/variant-colors.html)***
31
+ ***[Variant color options](https://igv.org/web/release/3.7.3/examples/variant-colors.html)***
32
32
 
33
- ***[More](https://igv.org/web/release/3.7.2/examples/)***
33
+ ***[More](https://igv.org/web/release/3.7.3/examples/)***
34
34
 
35
35
 
36
36
  # Quickstart
@@ -39,18 +39,18 @@ Below are examples and a quickstart guide. See the [developer documentation](ht
39
39
  igv.js consists of a single javascript file with no external dependencies.
40
40
 
41
41
  Pre-built files for script include, AMD, or CJS module systems (igv.min.js) and an ES6 module (igv.esm.min.js)
42
- can be downloaded from [https://cdn.jsdelivr.net/npm/igv@3.7.2/dist/](https://cdn.jsdelivr.net/npm/igv@3.7.2/dist/).
42
+ can be downloaded from [https://cdn.jsdelivr.net/npm/igv@3.7.3/dist/](https://cdn.jsdelivr.net/npm/igv@3.7.3/dist/).
43
43
 
44
44
  To import igv as an ES6 module
45
45
 
46
46
  ```javascript
47
- import igv from "https://cdn.jsdelivr.net/npm/igv@3.7.2/dist/igv.esm.min.js"
47
+ import igv from "https://cdn.jsdelivr.net/npm/igv@3.7.3/dist/igv.esm.min.js"
48
48
  ```
49
49
 
50
50
  Or as a script include (defines the "igv" global)
51
51
 
52
52
  ```html
53
- <script src="https://cdn.jsdelivr.net/npm/igv@3.7.2/dist/igv.min.js"></script>
53
+ <script src="https://cdn.jsdelivr.net/npm/igv@3.7.3/dist/igv.min.js"></script>
54
54
  ```
55
55
 
56
56
  Alternatively you can install with npm
package/dist/igv.esm.js CHANGED
@@ -14765,13 +14765,12 @@ function stripQuotes$1(value) {
14765
14765
 
14766
14766
  const transcriptTypes = new Set(['transcript', 'primary_transcript', 'processed_transcript', 'mRNA', 'mrna',
14767
14767
  'lnc_RNA', 'miRNA', 'ncRNA', 'rRNA', 'scRNA', 'snRNA', 'snoRNA', 'tRNA']);
14768
- const cdsTypes = new Set(['CDS', 'cds']);
14769
- const codonTypes = new Set(['start_codon', 'stop_codon']);
14768
+ const cdsTypes = new Set(['CDS', 'cds', 'start_codon', 'stop_codon']);
14770
14769
  const utrTypes = new Set(['5UTR', '3UTR', 'UTR', 'five_prime_UTR', 'three_prime_UTR', "3'-UTR", "5'-UTR"]);
14771
14770
  const exonTypes = new Set(['exon', 'coding-exon']);
14772
14771
 
14773
14772
  const transcriptPartTypes = new Set();
14774
- for (let cltn of [cdsTypes, codonTypes, utrTypes, exonTypes]) {
14773
+ for (let cltn of [cdsTypes, utrTypes, exonTypes]) {
14775
14774
  for (let t of cltn) {
14776
14775
  transcriptPartTypes.add(t);
14777
14776
  }
@@ -14786,7 +14785,7 @@ function isIntron(type) {
14786
14785
  }
14787
14786
 
14788
14787
  function isCoding(type) {
14789
- return cdsTypes.has(type) || codonTypes.has(type)
14788
+ return cdsTypes.has(type)
14790
14789
  }
14791
14790
 
14792
14791
  function isUTR(type) {
@@ -14966,12 +14965,17 @@ class GFFTranscript extends GFFFeature {
14966
14965
  if (exon) {
14967
14966
  exon.cdStart = exon.cdStart ? Math.min(cds.start, exon.cdStart) : cds.start;
14968
14967
  exon.cdEnd = exon.cdEnd ? Math.max(cds.end, exon.cdEnd) : cds.end;
14969
- exon.readingFrame = cds.readingFrame;
14970
- // TODO -- merge attributes?
14968
+ if (cds.readingFrame !== undefined) {
14969
+ if (exon.readingFrame === undefined) {
14970
+ exon.readingFrame = cds.readingFrame;
14971
+ } else {
14972
+ // Keep reading frame of first CDS in direction of transcription
14973
+ if (this.strand === '+') ; else {
14974
+ exon.readingFrame = cds.readingFrame;
14975
+ }
14976
+ }
14977
+ }
14971
14978
  } else {
14972
- // cds.cdStart = cds.start
14973
- // cds.cdEnd = cds.end
14974
- // exons.push(cds)
14975
14979
  console.error("No exon found spanning " + cds.start + "-" + cds.end);
14976
14980
  }
14977
14981
 
@@ -14983,6 +14987,11 @@ class GFFTranscript extends GFFFeature {
14983
14987
  this.cdEnd = this.cdEnd ? Math.max(cds.end, this.cdEnd) : cds.end;
14984
14988
  }
14985
14989
 
14990
+ addTerminalCodon(codon) {
14991
+ // Treat terminal codons as CDS
14992
+ this.addCDS(codon);
14993
+ }
14994
+
14986
14995
  addUTR(utr) {
14987
14996
 
14988
14997
  let exon;
@@ -15003,7 +15012,10 @@ class GFFTranscript extends GFFFeature {
15003
15012
  if (utr.end < exon.end) {
15004
15013
  exon.cdStart = utr.end;
15005
15014
  }
15006
- if (utr.start > exon.start) {
15015
+ // Do not "backup" the cdEnd based on a UTR record. A stop_codon might extend cdEnd into the UTR, and we
15016
+ // don't want to quash that with the UTR. Although stop codons are not translated, visually
15017
+ // they appear as part exonic coding sequence. This is a long established convention,
15018
+ if (exon.cdEnd === undefined || utr.start > exon.cdEnd) {
15007
15019
  exon.cdEnd = utr.start;
15008
15020
  }
15009
15021
  }
@@ -35760,6 +35772,11 @@ function getAminoAcidLetterWithExonGap(strand, phase, phaseExtentStart, phaseExt
35760
35772
  }
35761
35773
 
35762
35774
  if (remainder) {
35775
+
35776
+ if (!riteExon) {
35777
+ return undefined
35778
+ }
35779
+
35763
35780
  stringA = sequenceInterval.getSequence(remainder.start, remainder.end);
35764
35781
 
35765
35782
  if (!stringA) {
@@ -50533,19 +50550,26 @@ class AlignmentBlock {
50533
50550
 
50534
50551
  class BamFilter {
50535
50552
  constructor(options) {
50536
- if (!options) options = {};
50537
- this.vendorFailed = options.vendorFailed = false !== options.vendorFailed;
50538
- this.duplicate = options.duplicate = false !== options.duplicate;
50553
+ options = options || {};
50554
+
50555
+ // Default to true unless explicitly set to false
50556
+ this.vendorFailed = options.vendorFailed !== false;
50557
+
50558
+ // Support both 'duplicate' and 'duplicates' as synonyms
50559
+ const duplicateValue = options.duplicate !== undefined ? options.duplicate : options.duplicates;
50560
+ this.duplicate = duplicateValue !== false;
50561
+
50539
50562
  this.secondary = options.secondary || false;
50540
50563
  this.supplementary = options.supplementary || false;
50541
50564
  this.mq = options.mq || 0;
50565
+
50542
50566
  if (options.readgroups) {
50543
50567
  this.readgroups = new Set(options.readgroups);
50544
50568
  }
50545
50569
  }
50546
50570
 
50547
50571
  pass(alignment) {
50548
- if(!alignment.isMapped()) return false
50572
+ if (!alignment.isMapped()) return false
50549
50573
  if (this.vendorFailed && alignment.isFailsVendorQualityCheck()) return false
50550
50574
  if (this.duplicate && alignment.isDuplicate()) return false
50551
50575
  if (this.secondary && alignment.isSecondary()) return false
@@ -76650,7 +76674,7 @@ function createReferenceFrameList(loci, genome, browserFlanking, minimumBases, v
76650
76674
  })
76651
76675
  }
76652
76676
 
76653
- const _version = "3.7.2";
76677
+ const _version = "3.7.3";
76654
76678
  function version() {
76655
76679
  return _version
76656
76680
  }