trackplot 0.2.2__tar.gz → 0.2.3__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 (50) hide show
  1. {trackplot-0.2.2 → trackplot-0.2.3}/PKG-INFO +2 -2
  2. {trackplot-0.2.2 → trackplot-0.2.3}/README.md +1 -1
  3. {trackplot-0.2.2 → trackplot-0.2.3}/setup.py +1 -1
  4. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/base/ReadDepth.py +6 -2
  5. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/cli.py +1 -1
  6. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/file/Reference.py +6 -14
  7. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot.egg-info/PKG-INFO +2 -2
  8. {trackplot-0.2.2 → trackplot-0.2.3}/LICENSE +0 -0
  9. {trackplot-0.2.2 → trackplot-0.2.3}/Pipfile +0 -0
  10. {trackplot-0.2.2 → trackplot-0.2.3}/Pipfile.lock +0 -0
  11. {trackplot-0.2.2 → trackplot-0.2.3}/pyproject.toml +0 -0
  12. {trackplot-0.2.2 → trackplot-0.2.3}/setup.cfg +0 -0
  13. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/__init__.py +0 -0
  14. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/anno/AxLabel.py +0 -0
  15. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/anno/__init__.py +0 -0
  16. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/anno/theme.py +0 -0
  17. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/base/CoordinateMap.py +0 -0
  18. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/base/GenomicLoci.py +0 -0
  19. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/base/Junction.py +0 -0
  20. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/base/Protein.py +0 -0
  21. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/base/Readder.py +0 -0
  22. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/base/Stroke.py +0 -0
  23. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/base/Transcript.py +0 -0
  24. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/base/__init__.py +0 -0
  25. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/base/pyUniprot.py +0 -0
  26. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/conf/DomainSetting.py +0 -0
  27. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/conf/__init__.py +0 -0
  28. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/conf/config.py +0 -0
  29. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/conf/drawing.py +0 -0
  30. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/file/ATAC.py +0 -0
  31. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/file/Bam.py +0 -0
  32. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/file/BedGraph.py +0 -0
  33. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/file/Bigwig.py +0 -0
  34. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/file/Depth.py +0 -0
  35. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/file/Fasta.py +0 -0
  36. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/file/File.py +0 -0
  37. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/file/HiCMatrixTrack.py +0 -0
  38. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/file/Junction.py +0 -0
  39. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/file/Motif.py +0 -0
  40. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/file/ReadSegments.py +0 -0
  41. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/file/__init__.py +0 -0
  42. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/plot.py +0 -0
  43. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/plot_func.py +0 -0
  44. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot/plot_tests.py +0 -0
  45. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot.egg-info/SOURCES.txt +0 -0
  46. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot.egg-info/dependency_links.txt +0 -0
  47. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot.egg-info/entry_points.txt +0 -0
  48. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot.egg-info/not-zip-safe +0 -0
  49. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot.egg-info/requires.txt +0 -0
  50. {trackplot-0.2.2 → trackplot-0.2.3}/trackplot.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: trackplot
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Home-page: https://github.com/ygidtu/trackplot
5
5
  Requires-Python: >=3.8
6
6
  Description-Content-Type: text/markdown
@@ -211,5 +211,5 @@ contact [Yiming Zhang](https://github.com/ygidtu) and
211
211
 
212
212
  If you use Sashimi.py in your publication, please cite Sashimi.py by
213
213
 
214
- [Zhang et al. Sashimi.py: a flexible toolkit for combinatorial analysis of genomic data. bioRxiv 2022.11.02.514803.](https://www.biorxiv.org/content/10.1101/2022.11.02.514803v1)
214
+ [Zhang et al. bioRxiv, 2022.11.02.514803.](https://www.biorxiv.org/content/10.1101/2022.11.02.514803v1)
215
215
 
@@ -203,5 +203,5 @@ contact [Yiming Zhang](https://github.com/ygidtu) and
203
203
 
204
204
  If you use Sashimi.py in your publication, please cite Sashimi.py by
205
205
 
206
- [Zhang et al. Sashimi.py: a flexible toolkit for combinatorial analysis of genomic data. bioRxiv 2022.11.02.514803.](https://www.biorxiv.org/content/10.1101/2022.11.02.514803v1)
206
+ [Zhang et al. bioRxiv, 2022.11.02.514803.](https://www.biorxiv.org/content/10.1101/2022.11.02.514803v1)
207
207
 
@@ -2,7 +2,7 @@ import os
2
2
  from configparser import ConfigParser
3
3
  from setuptools import setup, find_packages
4
4
 
5
- __version__ = "0.2.2"
5
+ __version__ = "0.2.3"
6
6
  __author__ = "ygidtu & Ran Zhou"
7
7
  __email__ = "ygidtu@gmail.com"
8
8
 
@@ -57,11 +57,15 @@ class ReadDepth(object):
57
57
 
58
58
  @property
59
59
  def plus(self) -> Optional[np.array]:
60
- return self._plus_ / self._number_of_merged_
60
+ if self._plus_ is not None and self._number_of_merged_ > 0:
61
+ return self._plus_ / self._number_of_merged_
62
+ return self._plus_
61
63
 
62
64
  @property
63
65
  def minus(self) -> Optional[np.array]:
64
- return self._minus_ / self._number_of_merged_
66
+ if self._minus_ is not None and self._number_of_merged_ > 0:
67
+ return self._minus_ / self._number_of_merged_
68
+ return self._minus_
65
69
 
66
70
  @property
67
71
  def wiggle(self) -> np.array:
@@ -21,7 +21,7 @@ from trackplot.conf.config import CLUSTERING_METHOD, COLORS, COLORMAP, DISTANCE_
21
21
  from trackplot.file.ATAC import ATAC
22
22
  from trackplot.plot import Plot
23
23
 
24
- __version__ = "0.2.2"
24
+ __version__ = "0.2.3"
25
25
  __author__ = "ygidtu & Ran Zhou"
26
26
  __email__ = "ygidtu@gmail.com"
27
27
 
@@ -335,18 +335,14 @@ class Reference(File):
335
335
  keep_original=True
336
336
  )
337
337
  except OSError as err:
338
- logger.error(err)
339
- logger.error("Guess gtf needs to be sorted")
338
+ logger.warning(f"Guess gtf needs to be sorted: {err}")
340
339
 
341
340
  sorted_gtf = re.sub(r"\.gtf(.gz)?$", "", input_gtf) + ".sorted.gtf.gz"
342
341
  if os.path.exists(sorted_gtf) and os.path.exists(sorted_gtf + ".tbi"):
343
342
  return sorted_gtf
344
343
 
345
344
  cls.sort_gtf(input_gtf, sorted_gtf)
346
- pysam.tabix_index(
347
- sorted_gtf, preset="gff",
348
- force=True, keep_original=True
349
- )
345
+ pysam.tabix_index(sorted_gtf, preset="gff", force=True, keep_original=True)
350
346
  return sorted_gtf
351
347
  elif os.path.getctime(output_gtf) < os.path.getctime(output_gtf):
352
348
  logger.info("the tbi index is older than the gtf file")
@@ -442,11 +438,9 @@ class Reference(File):
442
438
  )
443
439
  transcripts[t] = transcripts.get(t, 0) + 1
444
440
  except IOError as err:
445
- logger.error('There is no .bam file at {0}'.format(self.path))
446
- logger.error(err)
441
+ logger.warning(f"There is no .bam file at {self.path}: {err}")
447
442
  except ValueError as err:
448
- logger.error(self.path)
449
- logger.error(err)
443
+ logger.warning(f"{self.path}: {err}")
450
444
 
451
445
  return sorted([x for x, y in transcripts.items() if y > threshold_of_reads])
452
446
 
@@ -502,11 +496,9 @@ class Reference(File):
502
496
  transcripts.append(read)
503
497
 
504
498
  except IOError as err:
505
- logger.error('There is no .bed file at {0}'.format(self.path))
506
- logger.error(err)
499
+ logger.warning(f"There is no .bed file at {self.path}: {err}")
507
500
  except ValueError as err:
508
- logger.error(self.path)
509
- logger.error(err)
501
+ logger.warning(f"{self.path}: {err}")
510
502
  return transcripts
511
503
 
512
504
  def load(self, region: GenomicLoci, threshold_of_reads: int = 0, **kwargs):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: trackplot
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Home-page: https://github.com/ygidtu/trackplot
5
5
  Requires-Python: >=3.8
6
6
  Description-Content-Type: text/markdown
@@ -211,5 +211,5 @@ contact [Yiming Zhang](https://github.com/ygidtu) and
211
211
 
212
212
  If you use Sashimi.py in your publication, please cite Sashimi.py by
213
213
 
214
- [Zhang et al. Sashimi.py: a flexible toolkit for combinatorial analysis of genomic data. bioRxiv 2022.11.02.514803.](https://www.biorxiv.org/content/10.1101/2022.11.02.514803v1)
214
+ [Zhang et al. bioRxiv, 2022.11.02.514803.](https://www.biorxiv.org/content/10.1101/2022.11.02.514803v1)
215
215
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes