Skip to content

Commit 05779c7

Browse files
authored
Merge pull request #62 from ygidtu/dev
Dev 0.1.2
2 parents be5fe8a + b2ee6d4 commit 05779c7

17 files changed

Lines changed: 264 additions & 303 deletions

.dockerignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@ example/
33
.git/
44
Dockerfile
55
WebDockerfile
6-
node_modules/
6+
node_modules/
7+
plots/
8+
dist/
9+
build/
10+
*.egg-info/
11+
ui/

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ cairocffi = "*"
1919
hicmatrix = "*"
2020
loguru = "*"
2121
scipy = "*"
22+
adjusttext = "*"
2223

2324
[dev-packages]
2425

Pipfile.lock

Lines changed: 104 additions & 97 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,26 +51,32 @@ The sashimi.py is written in Python, and user could install it in a variety of w
5151
__Note:__ if `segment fault` with multiple processing, please try to use docker image, or just run with `-p 1`.
5252

5353
1. install from PiPy
54-
55-
```bash
56-
pip install sashimi.py
57-
```
54+
55+
```bash
56+
pip install sashimi.py
57+
```
58+
5859
2. install from bioconda
59-
```bash
60-
conda install -c bioconda sashimi-py
61-
62-
# or
60+
61+
```bash
62+
conda install -c bioconda sashimi-py
6363
64-
conda create -n sashimi meta.yaml
65-
```
64+
# or
65+
conda env create -n sashimi -f environment.yaml
66+
67+
# or
68+
conda env create -n sashimi -c conda-forge -c bioconda -f requirements.txt
69+
conda activate sashimi && python setup.py install
70+
```
71+
6672
3. using docker image
73+
6774
```bash
6875
docker pull ygidtu/sashimi
6976
docker run --rm ygidtu/sashimi --help
70-
```
71-
or
7277
73-
```bash
78+
# or
79+
7480
git clone from https://github.com/ygidtu/sashimi.py sashimi
7581
cd sashimi
7682
docker build -t ygidtu/docker .
@@ -88,9 +94,9 @@ __Note:__ if `segment fault` with multiple processing, please try to use docker
8894
# pr
8995
python main.py --help
9096
```
91-
97+
9298
5. running from a local webserver
93-
99+
94100
```bash
95101
git clone https://github.com/ygidtu/sashimi.py sashimi
96102
cd sashimi/web

WebDockerfile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
FROM python:3.9-buster
1+
FROM ygidtu/sashimi
22

33
ENV ROOT_DIR=/opt/sashimi
4-
ENV PYPI=https://pypi.douban.com/simple
5-
RUN mkdir $ROOT_DIR
6-
COPY . $ROOT_DIR
7-
8-
RUN cd $ROOT_DIR && \
9-
pip install -i $PYPI fastapi uvicorn pydantic jinja2 && \
10-
pip install -r requirements.txt && ls -l $ROOT_DIR
4+
RUN cd $ROOT_DIR && pip install -i $PYPI fastapi uvicorn pydantic jinja2
115

126
ENTRYPOINT ["python", "/opt/sashimi/server.py", "--host", "0.0.0.0"]

docs/installation.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ conda install sashimi-py
1010
git clone from https://github.com/ygidtu/sashimipy sashimi
1111
cd sashimi
1212

13-
conda create env -n sashimi meta.yaml
13+
conda env create -n sashimi -f environment.yaml
14+
# or
15+
conda env create -n sashimi -c conda-forge -c bioconda -f requirements.txt
16+
conda activate sashimi && python setup.py install
1417
```
1518

1619
### via PyPI

environment.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
channels:
2+
- conda-forge
3+
- bioconda
4+
- default
5+
6+
dependencies:
7+
- python
8+
- pysam
9+
- filetype
10+
- pybigwig
11+
- click-option-group
12+
- cairocffi
13+
- hicmatrix
14+
- matplotlib-base
15+
- seaborn-base
16+
- click
17+
- numpy
18+
- requests
19+
- xmltodict
20+
- pandas
21+
- loguru
22+
- adjusttext
23+
- pip
24+
- pip:
25+
- -e .

meta.yaml

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

requirements.txt

Lines changed: 48 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,48 @@
1-
asciitree>=0.3.3
2-
cairocffi>=1.4.0
3-
certifi>=2022.9.24 ; python_version >= '3.6'
4-
cffi>=1.15.1
5-
charset-normalizer>=2.1.1 ; python_full_version >= '3.6.0'
6-
click>=8.1.3
7-
click-option-group>=0.5.5
8-
contourpy>=1.0.6 ; python_version >= '3.7'
9-
cooler>=0.8.11
10-
cycler>=0.11.0 ; python_version >= '3.6'
11-
cytoolz>=0.10.1
12-
dill>=0.3.6 ; python_version >= '3.7'
13-
filetype>=1.2.0
14-
fonttools>=4.38.0 ; python_version >= '3.7'
15-
h5py>=3.7.0 ; python_version >= '3.7'
16-
hicmatrix>=15
17-
idna>=3.4 ; python_version >= '3.5'
18-
intervaltree>=3.1.0
19-
kiwisolver>=1.4.4 ; python_version >= '3.7'
20-
loguru>=0.6.0
21-
matplotlib>=3.6.2
22-
multiprocess>=0.70.14 ; python_version >= '3.7'
23-
numexpr>=2.8.4 ; python_version >= '3.7'
24-
numpy>=1.23.4
25-
packaging>=21.3 ; python_version >= '3.6'
26-
pandas>=1.5.1
27-
pillow>=9.3.0 ; python_version >= '3.7'
28-
pybigwig>=0.3.18
29-
pycparser>=2.21
30-
pyfaidx>=0.7.1
31-
pypairix>=0.3.7
32-
pyparsing>=3.0.9 ; python_full_version >= '3.6.8'
33-
pysam>=0.20.0
34-
python-dateutil>=2.8.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
35-
pytz>=2022.6
36-
pyyaml>=6.0 ; python_version >= '3.6'
37-
requests>=2.28.1
38-
scipy>=1.9.3
39-
seaborn>=0.12.1
40-
setuptools>=65.5.1 ; python_version >= '3.7'
41-
simplejson>=3.18.0 ; python_version >= '2.5' and python_version not in '3.0, 3.1, 3.2, 3.3'
42-
six>=1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
43-
sortedcontainers>=2.4.0
44-
tables>=3.7.0 ; python_version >= '3.6'
45-
toolz>=0.12.0 ; python_version >= '3.5'
46-
urllib3>=1.26.12 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4'
47-
xmltodict>=0.13.0
1+
adjusttext
2+
asciitree
3+
cairocffi
4+
certifi
5+
cffi
6+
charset-normalizer
7+
click
8+
click-option-group
9+
contourpy
10+
cooler
11+
cycler
12+
cytoolz
13+
dill
14+
filetype
15+
fonttools
16+
h5py
17+
hicmatrix
18+
idna
19+
intervaltree
20+
kiwisolver
21+
loguru
22+
matplotlib
23+
multiprocess
24+
numexpr
25+
numpy
26+
packaging
27+
pandas
28+
pillow
29+
pybigwig
30+
pycparser
31+
pyfaidx
32+
pypairix
33+
pyparsing
34+
pysam
35+
python-dateutil
36+
pytz
37+
pyyaml
38+
requests
39+
scipy
40+
seaborn
41+
setuptools
42+
simplejson
43+
six
44+
sortedcontainers
45+
tables
46+
toolz
47+
urllib3
48+
xmltodict

sashimi/base/Junction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def __init__(self, chromosome, start, end, strand: str = "+"):
2424
:param strand: the strand of the given junction.
2525
"""
2626
self.chromosome = chromosome
27-
self.start = int(start) + 1
27+
self.start = int(start)
2828
self.end = int(end)
2929
self.strand = strand
3030

@@ -61,7 +61,7 @@ def __hash__(self):
6161
generate hash
6262
:return:
6363
"""
64-
return hash((self.chromosome, self.start, self.end))
64+
return hash((self.chromosome, self.start, self.end, self.strand))
6565

6666
def __str__(self):
6767
u"""

0 commit comments

Comments
 (0)