Skip to content

Commit

Permalink
v1.0.0a0
Browse files Browse the repository at this point in the history
  • Loading branch information
shitohana committed Feb 5, 2024
1 parent 1aebf59 commit 80b1cbd
Show file tree
Hide file tree
Showing 19 changed files with 29 additions and 206 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Below we will show the basic BismarkPlot workflow.
### Single sample

```python
import src.bismarkplot.Genome
import src.bsxplorer.Genome
import bismarkplot

# Firstly, we need to read the regions annotation (e.g. reference genome .gff)
Expand Down Expand Up @@ -282,7 +282,7 @@ Output for _Brachypodium distachyon_:

```python
# For analyzing samples with different reference genomes, we need to initialize several genomes instances
import src.bismarkplot.Genome
import src.bsxplorer.Genome

genome_filenames = ["arabidopsis.gff", "brachypodium.gff", "cucumis.gff", "mus.gff"]
reports_filenames = ["arabidopsis.txt", "brachypodium.txt", "cucumis.txt", "mus.txt"]
Expand Down Expand Up @@ -319,7 +319,7 @@ Output:
Other genomic regions from .gff can be analyzed too with ```.exon``` or ```.near_tss/.near_tes``` option for ```bismarkplot.Genome```

```python
import src.bismarkplot.Genome
import src.bsxplorer.Genome

exons = [
src.bismarkplot.genome.Genome.from_gff(file).exon(min_length=100) for file in genome_filenames
Expand Down Expand Up @@ -363,7 +363,7 @@ TSS output:
BismarkPlot allows user to visualize chromosome methylation levels across full genome

```python
import src.bismarkplot.ChrLevels
import src.bsxplorer.ChrLevels
import bismarkplot

chr = src.bismarkplot.levels.ChrLevels.from_bismark(
Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import os
import sys

project = 'BismarkPlot'
project = 'BSXplorer'
copyright = '2023, shitohana'
author = 'shitohana'
release = '1.0.0'
release = '1.0.0a0'
sys.path.insert(0, os.path.abspath('../src'))
sys.path.append(os.path.abspath('.'))

Expand All @@ -28,7 +28,7 @@
autosummary_generate = True
autodoc_member_order = 'bysource'
add_module_names = False
html_short_title = 'BismarkPlot Documentation'
html_short_title = 'BSXplorer Documentation'


html_theme = 'sphinx_rtd_theme'
Expand Down
16 changes: 8 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "bsxplorer"
version = "1.0.0"
version = "1.0.0a0"
authors = [
{ name="shitohana", email="[email protected]" },
]
Expand Down Expand Up @@ -40,17 +40,17 @@ classifiers = [
# dynamic = ["version", "description"]

[project.urls]
Homepage = "https://github.com/shitohana/BismarkPlot"
Documentation = "https://shitohana.github.io/BismarkPlot/"
"Bug Tracker" = "https://github.com/shitohana/BismarkPlot/issues"
Homepage = "https://github.com/shitohana/BSXplorer"
Documentation = "https://shitohana.github.io/BSXplorer/"
"Bug Tracker" = "https://github.com/shitohana/BSXplorer/issues"

[tool.hatch.build]
exclude = ["/venv", "/dist", "/test", "/docs"]

[tool.hatch.build.targets.wheel]
packages = ["src/bismarkplot"]
packages = ["src/bsxplorer"]

[project.scripts]
bsxplorer-metagene = "bismarkplot.templates.cons_MetageneReport:main"
bsxplorer-category = "bismarkplot.templates.cons_CategoryReport:main"
bsxplorer-chr = "bismarkplot.templates.cons_ChrLevelsReport:main"
bsxplorer-metagene = "bsxplorer.templates.cons_MetageneReport:main"
bsxplorer-category = "bsxplorer.templates.cons_CategoryReport:main"
bsxplorer-chr = "bsxplorer.templates.cons_ChrLevelsReport:main"
61 changes: 0 additions & 61 deletions src/bismarkplot/console_chrs.py

This file was deleted.

107 changes: 0 additions & 107 deletions src/bismarkplot/console_metagene.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

from pathlib import Path
from abc import ABC, abstractmethod

import pyarrow as pa
import pyarrow.csv as pcsv
Expand Down
4 changes: 2 additions & 2 deletions src/bismarkplot/Base.py → src/bsxplorer/Base.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
import polars as pl
import pyarrow as pa
from pyreadr import write_rds
from matplotlib.axes import Axes
import plotly.graph_objects as go

from .ArrowReaders import CsvReader, ParquetReader, BismarkOptions
from .utils import remove_extension, prepare_labels, MetageneSchema, ReportBar
from matplotlib.axes import Axes
import plotly.graph_objects as go


class MetageneBase:
Expand Down
2 changes: 1 addition & 1 deletion src/bismarkplot/Binom.py → src/bsxplorer/Binom.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def region_pvalue(
--------
If there no preprocessed file:
>>> import bismarkplot as bp
>>> import bsxplorer as bp
>>> report_path = "/path/to/report.txt"
>>> genome_path = "/path/to/genome.gff"
>>> c_binom = bp.BinomialData.preprocess(report_path, report_type="bismark")
Expand Down
3 changes: 1 addition & 2 deletions src/bismarkplot/ChrLevels.py → src/bsxplorer/ChrLevels.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

import os
from multiprocessing import cpu_count

import numpy as np
import polars as pl
Expand All @@ -16,7 +15,7 @@
from abc import ABC, abstractmethod
import warnings

from .utils import approx_batch_num, interval, decompress, ReportBar
from .utils import interval, decompress, ReportBar
from .ArrowReaders import CsvReader, BismarkOptions, ParquetReader


Expand Down
4 changes: 0 additions & 4 deletions src/bismarkplot/Clusters.py → src/bsxplorer/Clusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
import polars as pl
from dynamicTreeCut import cutreeHybrid
from dynamicTreeCut.dynamicTreeCut import get_heights
from matplotlib import pyplot as plt, colormaps
from matplotlib.figure import Figure
from pyreadr import write_rds
from fastcluster import linkage
from scipy.cluster.hierarchy import leaves_list, optimal_leaf_ordering
from scipy.spatial.distance import pdist
Expand All @@ -24,7 +21,6 @@

from .Base import MetageneBase, MetageneFilesBase
from abc import ABC, abstractmethod
from .utils import prepare_labels, hm_flank_lines


class _ClusterBase(ABC):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import polars as pl
from pathlib import Path

from .utils import MetageneSchema


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@
import seaborn as sns

from .Plots import LinePlot, LinePlotFiles, HeatMap, HeatMapFiles
from .ArrowReaders import CsvReader, BismarkOptions, ParquetReader
from .SeqMapper import Mapper, Sequence
from .Base import (
MetageneBase, MetageneFilesBase,
BismarkReportReader, ParquetReportReader, BinomReportReader
)
from .Clusters import ClusterSingle, ClusterMany
from .utils import MetageneSchema, ReportBar
from .utils import MetageneSchema
from .GenomeClass import Genome

pl.enable_string_cache(True)
Expand Down
2 changes: 0 additions & 2 deletions src/bismarkplot/Plots.py → src/bsxplorer/Plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import itertools
import re
from dataclasses import dataclass

import numpy as np
import polars as pl
Expand All @@ -13,7 +12,6 @@
from plotly import graph_objects as go, express as px
from pyreadr import write_rds
from scipy.signal import savgol_filter
# todo add to dependencies sklearn
from sklearn.decomposition import PCA as PCA_sklearn

from .Base import PlotBase, MetageneFilesBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import gc
import gzip
import io
import multiprocessing
import os
import shutil
import tempfile
Expand Down
4 changes: 2 additions & 2 deletions src/bismarkplot/__init__.py → src/bsxplorer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .MetageneClasses import Metagene, MetageneFiles
from .Plots import LinePlot, LinePlotFiles, HeatMap, HeatMapFiles
from .Plots import LinePlot, LinePlotFiles, HeatMap, HeatMapFiles, PCA
from .Binom import BinomialData, RegionStat
from .GenomeClass import Genome
from .ChrLevels import ChrLevels

__version__ = '1.0.0'
__version__ = '1.0.0a0'
File renamed without changes.
Loading

0 comments on commit 80b1cbd

Please sign in to comment.