ModDotPlot 0.9.0__tar.gz → 0.9.5__tar.gz

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.
Files changed (22) hide show
  1. moddotplot-0.9.5/PKG-INFO +50 -0
  2. moddotplot-0.9.0/src/ModDotPlot.egg-info/PKG-INFO → moddotplot-0.9.5/README.md +46 -54
  3. {moddotplot-0.9.0 → moddotplot-0.9.5}/pyproject.toml +7 -13
  4. moddotplot-0.9.5/src/ModDotPlot.egg-info/PKG-INFO +50 -0
  5. {moddotplot-0.9.0 → moddotplot-0.9.5}/src/ModDotPlot.egg-info/requires.txt +4 -2
  6. {moddotplot-0.9.0 → moddotplot-0.9.5}/src/moddotplot/const.py +1 -1
  7. {moddotplot-0.9.0 → moddotplot-0.9.5}/src/moddotplot/estimate_identity.py +6 -6
  8. {moddotplot-0.9.0 → moddotplot-0.9.5}/src/moddotplot/moddotplot.py +249 -175
  9. {moddotplot-0.9.0 → moddotplot-0.9.5}/src/moddotplot/parse_fasta.py +25 -2
  10. moddotplot-0.9.5/src/moddotplot/static_plots.py +1806 -0
  11. moddotplot-0.9.0/PKG-INFO +0 -421
  12. moddotplot-0.9.0/README.md +0 -395
  13. moddotplot-0.9.0/src/moddotplot/static_plots.py +0 -1264
  14. {moddotplot-0.9.0 → moddotplot-0.9.5}/LICENSE +0 -0
  15. {moddotplot-0.9.0 → moddotplot-0.9.5}/setup.cfg +0 -0
  16. {moddotplot-0.9.0 → moddotplot-0.9.5}/src/ModDotPlot.egg-info/SOURCES.txt +0 -0
  17. {moddotplot-0.9.0 → moddotplot-0.9.5}/src/ModDotPlot.egg-info/dependency_links.txt +0 -0
  18. {moddotplot-0.9.0 → moddotplot-0.9.5}/src/ModDotPlot.egg-info/entry_points.txt +0 -0
  19. {moddotplot-0.9.0 → moddotplot-0.9.5}/src/ModDotPlot.egg-info/top_level.txt +0 -0
  20. {moddotplot-0.9.0 → moddotplot-0.9.5}/src/moddotplot/__init__.py +0 -0
  21. {moddotplot-0.9.0 → moddotplot-0.9.5}/src/moddotplot/__main__.py +0 -0
  22. {moddotplot-0.9.0 → moddotplot-0.9.5}/src/moddotplot/interactive.py +0 -0
@@ -0,0 +1,50 @@
1
+ Metadata-Version: 2.4
2
+ Name: ModDotPlot
3
+ Version: 0.9.5
4
+ Author: Michael Schatz, Adam Phillippy
5
+ Author-email: Alex Sweeten <alex.sweeten@nih.gov>
6
+ Maintainer-email: Alex Sweeten <alex.sweeten@nih.gov>
7
+ License: MIT License
8
+
9
+ Copyright (c) 2024 MarBL
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
28
+
29
+ Keywords: dotplot,sketching,modimizer,heatmap
30
+ Requires-Python: >=3.7
31
+ Description-Content-Type: text/markdown
32
+ License-File: LICENSE
33
+ Requires-Dist: pysam
34
+ Requires-Dist: pandas
35
+ Requires-Dist: plotly
36
+ Requires-Dist: dash
37
+ Requires-Dist: plotnine==0.12.4
38
+ Requires-Dist: palettable
39
+ Requires-Dist: mmh3
40
+ Requires-Dist: setproctitle
41
+ Requires-Dist: numpy
42
+ Requires-Dist: pillow
43
+ Requires-Dist: patchworklib==0.6.3
44
+ Requires-Dist: cairosvg
45
+ Requires-Dist: pygenometracks
46
+ Requires-Dist: svgutils
47
+ Provides-Extra: test
48
+ Requires-Dist: pytest; extra == "test"
49
+ Requires-Dist: pytest-cov; extra == "test"
50
+ Dynamic: license-file
@@ -1,30 +1,7 @@
1
- Metadata-Version: 2.2
2
- Name: ModDotPlot
3
- Version: 0.9.0
4
- Author: Michael Schatz, Adam Phillippy
5
- Author-email: Alex Sweeten <alex.sweeten@nih.gov>
6
- Maintainer-email: Alex Sweeten <alex.sweeten@nih.gov>
7
- Keywords: dotplot,sketching,modimizer,heatmap
8
- Requires-Python: >=3.7
9
- Description-Content-Type: text/markdown
10
- License-File: LICENSE
11
- Requires-Dist: pysam
12
- Requires-Dist: pandas
13
- Requires-Dist: plotly
14
- Requires-Dist: dash
15
- Requires-Dist: plotnine==0.12.4
16
- Requires-Dist: palettable
17
- Requires-Dist: mmh3
18
- Requires-Dist: tk
19
- Requires-Dist: setproctitle
20
- Requires-Dist: numpy
21
- Requires-Dist: pillow
22
- Requires-Dist: patchworklib
23
- Provides-Extra: test
24
- Requires-Dist: pytest; extra == "test"
25
- Requires-Dist: pytest-cov; extra == "test"
26
-
27
1
  ![](images/logo.png)
2
+ ---
3
+ [![PyPI](https://img.shields.io/pypi/v/ModDotPlot?color=blue&label=PyPI)](https://pypi.org/project/ModDotPlot/)
4
+ [![CI](https://github.com/marbl/ModDotPlot/actions/workflows/black.yml/badge.svg)](https://github.com/marbl/ModDotPlot/actions/workflows/black.yml)
28
5
 
29
6
  - [Cite](#cite)
30
7
  - [About](#about)
@@ -45,7 +22,7 @@ Requires-Dist: pytest-cov; extra == "test"
45
22
 
46
23
  ## Cite
47
24
 
48
- Alexander P Sweeten, Michael C Schatz, Adam M Phillippy, ModDotPlot—rapid and interactive visualization of tandem repeats, Bioinformatics, Volume 40, Issue 8, August 2024, btae493, https://doi.org/10.1093/bioinformatics/btae493
25
+ Alexander P Sweeten, Michael C Schatz, Adam M Phillippy, ModDotPlot—rapid and interactive visualization of tandem repeats, Bioinformatics, Volume 40, Issue 8, August 2024, btae493, [https://doi.org/10.1093/bioinformatics/btae493](https://doi.org/10.1093/bioinformatics/btae493)
49
26
 
50
27
  If you use ModDotPlot for your research, please cite our software!
51
28
 
@@ -53,7 +30,7 @@ If you use ModDotPlot for your research, please cite our software!
53
30
 
54
31
  ## About
55
32
 
56
- ModDotPlot is a dot plot visualization tool designed for large sequences and whole genomes. ModDotPlot outputs an identity heatmap similar to [StainedGlass](https://mrvollger.github.io/StainedGlass/) by rapidly approximating the Average Nucleotide Identity between pairwise combinations of genomic intervals. This significantly reduces the computational time required to produce these plots, enough to view multiple layers of resolution in real time!
33
+ _ModDotPlot_ is a dot plot visualization tool designed for large sequences and whole genomes. _ModDotPlot_ outputs an identity heatmap similar to [StainedGlass](https://mrvollger.github.io/StainedGlass/) by rapidly approximating the Average Nucleotide Identity between pairwise combinations of genomic intervals. This significantly reduces the computational time required to produce these plots, enough to view multiple layers of resolution in real time!
57
34
 
58
35
  ![](images/demo.gif)
59
36
 
@@ -61,12 +38,14 @@ ModDotPlot is a dot plot visualization tool designed for large sequences and who
61
38
 
62
39
  ## Installation
63
40
 
41
+ _ModDotPlot_ can be installed by running `pip install moddotplot`. It requires Python 3.7+ to run. Alternatively, you can download the current release from GitHub by using:
42
+
64
43
  ```
65
44
  git clone https://github.com/marbl/ModDotPlot.git
66
45
  cd ModDotPlot
67
46
  ```
68
47
 
69
- Although optional, it's recommended to setup a virtual environment before using ModDotPlot:
48
+ Although optional, it's recommended to setup a virtual environment before using _ModDotPlot_:
70
49
 
71
50
  ```
72
51
  python -m venv venv
@@ -79,7 +58,7 @@ Once activated, you can install the required dependencies:
79
58
  python -m pip install .
80
59
  ```
81
60
 
82
- Finally, confirm that the installation was installed correctly by running `moddotplot -h`:
61
+ Finally, confirm that the installation was installed correctly and that your version is up to date by running `moddotplot -h`:
83
62
  ```
84
63
  __ __ _ _____ _ _____ _ _
85
64
  | \/ | | | | __ \ | | | __ \| | | |
@@ -88,6 +67,8 @@ Finally, confirm that the installation was installed correctly by running `moddo
88
67
  | | | | (_) | (_| | | |__| | (_) | |_ | | | | (_) | |_
89
68
  |_| |_|\___/ \__,_| |_____/ \___/ \__| |_| |_|\___/ \__|
90
69
 
70
+ v0.9.4
71
+
91
72
  usage: moddotplot [-h] {interactive,static} ...
92
73
 
93
74
  ModDotPlot: Visualization of Complex Repeat Structures
@@ -104,7 +85,7 @@ options:
104
85
 
105
86
  ## Usage
106
87
 
107
- ModDotPlot must be run either in `interactive` mode, or `static` mode:
88
+ _ModDotPlot_ must be run either in `interactive` mode, or `static` mode:
108
89
 
109
90
  ### Interactive Mode
110
91
 
@@ -120,13 +101,15 @@ This will launch a [Dash application](https://plotly.com/dash/) on your machine'
120
101
  moddotplot static <ARGS>
121
102
  ```
122
103
 
123
- This skips running Dash and quickly creates plots under the specified output directory using [plotnine](https://plotnine.readthedocs.io/en/v0.12.4/). By default, running ModDotPlot in static mode this will produce the following files:
104
+ Running _ModDotPlot_ in static mode skips running Dash and quickly creates plots under the specified output directory `-o`. By default, running _ModDotPlot_ in static mode this will produce the following files:
124
105
 
125
- - A paired-end bed file, containing intervals alongside their corresponding identity estimates.
126
- - A self-identity dotplot for each sequence.
106
+ - A paired-end bed file `.bedpe`, containing intervals alongside their corresponding identity estimates.
107
+ - A self-identity dotplot for each sequence, as both an upper triangle matrix `_TRI` and full matrix `_FULL` representation.
127
108
  - A histogram of identity values for each sequence.
128
-
129
- See [static mode commands](#static-mode-commands) for further info.
109
+
110
+ All plots and histograms are output in a vectorized (default: `.svg`) and rasterized `.png` image. [Plotnine](https://plotnine.readthedocs.io/en/v0.12.4/) is the Python plotting library used, with [CairoSVG](https://cairosvg.org) used for converting between image formats.
111
+
112
+ _ModDotPlot_ supports highly customizable plotting features in static mode. See [static mode commands](#static-mode-commands) for a complete list of features.
130
113
 
131
114
  ---
132
115
 
@@ -138,6 +121,10 @@ The following arguments are the same in both interactive and static mode:
138
121
 
139
122
  Fasta files to input. Multifasta files are accepted. Interactive mode will only support a maximum of two sequences at a time.
140
123
 
124
+ `-b / --bed <.bed file>`
125
+
126
+ Input bedfile used for dotplot annotation (note: this is not the same as the paired-end bed file produced by ModDotPlot). If selected, this will produce an annotated bedtrack image `_ANNOTATION.svg`. Name in the bedfile must match the name of the fasta sequence header (or input, if `-l` is used instead) in order to produce a correct bed track.
127
+
141
128
  `-k / --kmer <int>`
142
129
 
143
130
  K-mer size to use. This should be large enough to distinguish unique k-mers with enough specificity, but not too large that sensitivity is removed. Default: 21.
@@ -210,15 +197,15 @@ Load previously saved matrices. Used instead of `-f/--fasta`
210
197
 
211
198
  Run `moddotplot static` with a config file, rather than (sample syntax). Recommended when creating a really customized plot. Used instead of `-f/--fasta`.
212
199
 
213
- `-b / --bed <.bed file>`
200
+ `-l / --load <.bedpe file>`
214
201
 
215
- Create a plot from a previously computed pairwise bed file. Skips Average Nucleotide Identity computation. Used instead of `-f/--fasta`.
202
+ Create a plot from a previously computed pairwise bed file. Skips Average Nucleotide Identity computation. Used instead of `-f/--fasta`. Will only accept paired-end bed files produced by ModDotPlot.
216
203
 
217
204
  `-w / --window <int>`
218
205
 
219
206
  Window size. Unlike interactive mode, only one matrix will be created, so this represents the *only* window size. Default is set to `n/1000` (eg. 3000bp for a 3Mbp sequence).
220
207
 
221
- `--no-bed <bool>`
208
+ `--no-bedpe <bool>`
222
209
 
223
210
  Skip output of bed file.
224
211
 
@@ -230,9 +217,17 @@ Skip output of histogram legend.
230
217
 
231
218
  Adjust width of self dot plots. Default is 9 inches.
232
219
 
233
- `--dpi <bool>`
220
+ `--dpi <int>`
234
221
 
235
- Image resolution in dots per inch (not to be confused with dotplot resolution). Default is 600.
222
+ Image resolution in dots per inch (not to be confused with dotplot resolution). Default is `300`.
223
+
224
+ `--vector <str>`
225
+
226
+ Vectorized image format to output to. Must be one of ["svg", "pdf", "ps"]. Default: `svg`
227
+
228
+ `--deraster <bool>`
229
+
230
+ By default, vectorized ouptuts rasterize the actual plot (not the axis). This is done to save space, as a high-resolution dotplot can be extremely space inefficient and prevent use of image manipulation software. This plot rasterization can be removed using this flag.
236
231
 
237
232
  `--palette <str>`
238
233
 
@@ -252,11 +247,11 @@ Add custom identity threshold breakpoints. Note that the number of breakpoints m
252
247
 
253
248
  `-t / --axes-ticks <list of ints>`
254
249
 
255
- Custom tickmarks for x and y axis. Values outside of the axes-limits will not be shown.
250
+ Custom tickmarks for x and y axis. Values outside of the `--axes-limits` will not be shown.
256
251
 
257
252
  `-a / --axes-limits <int>`
258
253
 
259
- Change axis limits for x and y axis. Useful for comparing multiple plots, allowing them to stay in scale.
254
+ Change axis limits for x and y axis. Useful when comparing multiple plots, allowing them to stay in scale.
260
255
 
261
256
  `--bin-freq <bool>`
262
257
 
@@ -334,7 +329,6 @@ $ cat config/config.json
334
329
 
335
330
  {
336
331
  "identity": 90,
337
- "sparsity": 10,
338
332
  "palette": "OrRd_7",
339
333
  "breakpoints": [
340
334
  90,
@@ -364,13 +358,13 @@ $ moddotplot static -c config/config.json
364
358
 
365
359
  Running ModDotPlot in static mode
366
360
 
367
- Retrieving k-mers from Chr1:14M-18M....
361
+ Retrieving k-mers from Chr1:14000000-18000000....
368
362
 
369
363
  Progress: |████████████████████████████████████████| 100.0% Completed
370
364
 
371
- Chr1:14M-18M k-mers retrieved!
365
+ Chr1:14000000-18000000 k-mers retrieved!
372
366
 
373
- Computing self identity matrix for chr1:14M-18M...
367
+ Computing self identity matrix for chr1:14000000-18000000...
374
368
 
375
369
  Sequence length n: 4000000
376
370
 
@@ -383,13 +377,13 @@ Computing self identity matrix for chr1:14M-18M...
383
377
  Progress: |████████████████████████████████████████| 100.0% Completed
384
378
 
385
379
 
386
- Saved bed file to Chr1_cen_plots/Chr1:14M-18M.bed
380
+ Saved bed file to Chr1_cen_plots/Chr1:14000000-18000000.bed
387
381
 
388
- Plots created! Saving to Chr1_cen_plots/Chr1:14M-18M...
382
+ Plots created! Saving to Chr1_cen_plots/Chr1:14000000-18000000...
389
383
 
390
384
  Chr1_cen_plots/Chr1:14M-18M_TRI.png, Chr1_cen_plots/Chr1:14M-18M_TRI.pdf, Chr1_cen_plots/Chr1:14M-18M_FULL.png, Chr1_cen_plots/Chr1:14M-18M_FULL.png, Chr1_cen_plots/Chr1:14M-18M_HIST.png and Chr1_cen_plots/Chr1:14M-18M_HIST.pdf, saved sucessfully.
391
385
  ```
392
- ![](images/Chr1:14M-18M_FULL.png)
386
+ ![](images/Chr1:14000000-18000000_FULL.png)
393
387
 
394
388
  ---
395
389
 
@@ -402,6 +396,8 @@ ModDotPlot can produce an a vs. b style dotplot for each pairwise combination of
402
396
  moddotplot interactive -f sequences/chr15_segment.fa sequences/chr21_segment.fa --compare-only
403
397
  ```
404
398
 
399
+ ![](images/chr14:2000000-5000000_chr21:2000000-5000000.png)
400
+
405
401
  ---
406
402
 
407
403
  ## Questions
@@ -412,10 +408,6 @@ For bug reports or general usage questions, please raise a GitHub issue, or emai
412
408
 
413
409
  ## Known Issues
414
410
 
415
- - Plot width and xlim (limiting the x axis to a different amount) currently do not work. I plan to have those working in v0.9.0.
416
-
417
411
  - Mac users might encounter the following unexpected command line output: `/bin/sh: lscpu: command not found`. This is a known issue with Plotnine, the Python plotting library used by ModDotPlot. This can be safely ignored.
418
412
 
419
413
  - If you encounter an error with the following traceback: `rv = reductor(4) TypeError: cannot pickle 'generator' object`, ths means that you have a newer version of Plotnine that is incompatible with ModDotPlot. Please uninstall plotnine and reinstall version 0.12.4 `pip install plotnine==0.12.4`.
420
-
421
- - In interactive mode, comparing sequences of two sizes will lead to errors in zooming for the larger sequence. I plan to fix this in v0.9.0.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ModDotPlot"
7
- version = "0.9.0"
7
+ version = "0.9.5"
8
8
  requires-python = ">= 3.7"
9
9
  dependencies = [
10
10
  "pysam",
@@ -14,11 +14,13 @@ dependencies = [
14
14
  "plotnine==0.12.4",
15
15
  "palettable",
16
16
  "mmh3",
17
- "tk",
18
17
  "setproctitle",
19
18
  "numpy",
20
19
  "pillow",
21
- "patchworklib"
20
+ "patchworklib==0.6.3",
21
+ "cairosvg",
22
+ "pygenometracks",
23
+ "svgutils",
22
24
  ]
23
25
  authors = [
24
26
  {name = "Alex Sweeten", email = "alex.sweeten@nih.gov"},
@@ -28,7 +30,8 @@ authors = [
28
30
  maintainers = [
29
31
  {name = "Alex Sweeten", email = "alex.sweeten@nih.gov"}
30
32
  ]
31
- readme = {file = "README.md", content-type = "text/markdown"}
33
+ readme = {file = "README.txt", content-type = "text/markdown"}
34
+ license = {file = "LICENSE"}
32
35
  keywords = ["dotplot", "sketching", "modimizer", "heatmap"]
33
36
 
34
37
  [project.scripts]
@@ -40,12 +43,3 @@ test = [
40
43
  "pytest",
41
44
  "pytest-cov"
42
45
  ]
43
-
44
- [tool.hatch.build.targets.sdist]
45
- exclude = [
46
- "/.github",
47
- "/docs",
48
- ]
49
-
50
- [tool.hatch.build.targets.wheel]
51
- packages = ["src/moddotplot"]
@@ -0,0 +1,50 @@
1
+ Metadata-Version: 2.4
2
+ Name: ModDotPlot
3
+ Version: 0.9.5
4
+ Author: Michael Schatz, Adam Phillippy
5
+ Author-email: Alex Sweeten <alex.sweeten@nih.gov>
6
+ Maintainer-email: Alex Sweeten <alex.sweeten@nih.gov>
7
+ License: MIT License
8
+
9
+ Copyright (c) 2024 MarBL
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
28
+
29
+ Keywords: dotplot,sketching,modimizer,heatmap
30
+ Requires-Python: >=3.7
31
+ Description-Content-Type: text/markdown
32
+ License-File: LICENSE
33
+ Requires-Dist: pysam
34
+ Requires-Dist: pandas
35
+ Requires-Dist: plotly
36
+ Requires-Dist: dash
37
+ Requires-Dist: plotnine==0.12.4
38
+ Requires-Dist: palettable
39
+ Requires-Dist: mmh3
40
+ Requires-Dist: setproctitle
41
+ Requires-Dist: numpy
42
+ Requires-Dist: pillow
43
+ Requires-Dist: patchworklib==0.6.3
44
+ Requires-Dist: cairosvg
45
+ Requires-Dist: pygenometracks
46
+ Requires-Dist: svgutils
47
+ Provides-Extra: test
48
+ Requires-Dist: pytest; extra == "test"
49
+ Requires-Dist: pytest-cov; extra == "test"
50
+ Dynamic: license-file
@@ -5,11 +5,13 @@ dash
5
5
  plotnine==0.12.4
6
6
  palettable
7
7
  mmh3
8
- tk
9
8
  setproctitle
10
9
  numpy
11
10
  pillow
12
- patchworklib
11
+ patchworklib==0.6.3
12
+ cairosvg
13
+ pygenometracks
14
+ svgutils
13
15
 
14
16
  [test]
15
17
  pytest
@@ -1,4 +1,4 @@
1
- VERSION = "0.9.0"
1
+ VERSION = "0.9.5"
2
2
  COLS = [
3
3
  "#query_name",
4
4
  "query_start",
@@ -128,7 +128,7 @@ def partitionOverlaps(
128
128
  try:
129
129
  kmer_list.append(lst[delta_start_index:delta_end_index])
130
130
  except Exception as e:
131
- print("test")
131
+ print("Error in appending list of kmers...\n")
132
132
  print(e)
133
133
  kmer_list.append(lst[delta_start_index:seq_len])
134
134
  counter += win
@@ -167,7 +167,7 @@ def convertToModimizers(
167
167
 
168
168
 
169
169
  def convertMatrixToBed(
170
- matrix, window_size, id_threshold, x_name, y_name, self_identity
170
+ matrix, window_size, id_threshold, x_name, y_name, self_identity, x_offset, y_offset
171
171
  ):
172
172
  bed = [
173
173
  (
@@ -187,10 +187,10 @@ def convertMatrixToBed(
187
187
  value = matrix[x, y]
188
188
  if (not self_identity) or (self_identity and x <= y):
189
189
  if value >= id_threshold / 100:
190
- start_x = x * window_size + 1
191
- end_x = (x + 1) * window_size
192
- start_y = y * window_size + 1
193
- end_y = (y + 1) * window_size
190
+ start_x = x * window_size + x_offset
191
+ end_x = start_x + window_size - 1
192
+ start_y = y * window_size + y_offset
193
+ end_y = start_y + window_size - 1
194
194
 
195
195
  bed.append(
196
196
  (