levseq 1.0.0__tar.gz → 1.0.2__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.
- {levseq-1.0.0/levseq.egg-info → levseq-1.0.2}/PKG-INFO +11 -8
- {levseq-1.0.0 → levseq-1.0.2}/README.md +10 -7
- {levseq-1.0.0 → levseq-1.0.2}/levseq/__init__.py +1 -1
- {levseq-1.0.0 → levseq-1.0.2}/levseq/run_levseq.py +2 -2
- {levseq-1.0.0 → levseq-1.0.2}/levseq/visualization.py +42 -23
- {levseq-1.0.0 → levseq-1.0.2/levseq.egg-info}/PKG-INFO +11 -8
- {levseq-1.0.0 → levseq-1.0.2}/LICENSE +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/MANIFEST.in +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq/IO_processor.py +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq/barcoding/__init__.py +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq/barcoding/demultiplex +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq/barcoding/demultiplex-arm64 +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq/barcoding/demultiplex-x86 +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq/barcoding/minion_barcodes.fasta +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq/basecaller.py +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq/cmd.py +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq/globals.py +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq/interface.py +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq/parser.py +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq/screen.py +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq/simulation.py +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq/user.py +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq/utils.py +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq/variantcaller.py +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq.egg-info/SOURCES.txt +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq.egg-info/dependency_links.txt +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq.egg-info/entry_points.txt +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq.egg-info/requires.txt +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/levseq.egg-info/top_level.txt +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/setup.cfg +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/setup.py +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/tests/test_demultiplex_docker.py +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/tests/test_seqs.py +0 -0
- {levseq-1.0.0 → levseq-1.0.2}/tests/test_variant_calling.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: levseq
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Home-page: https://github.com/fhalab/levseq/
|
|
5
5
|
Author: Yueming Long, Emreay Gursoy, Ariane Mora
|
|
6
6
|
Author-email: ylong@caltech.edu
|
|
@@ -54,7 +54,7 @@ Figure 1: Overview of the LevSeq variant sequencing workflow using Nanopore tech
|
|
|
54
54
|
|
|
55
55
|
- Data to reproduce the results and to test are available on zenodo [](https://doi.org/10.5281/zenodo.13694463)
|
|
56
56
|
|
|
57
|
-
- A dockerized website and database for labs to locally host and visualize their data: https://github.com/fhalab/LevSeq_VDB/
|
|
57
|
+
- A dockerized website and database for labs to locally host and visualize their data: website is available at: https://levseq.caltech.edu/ and code to host locally at: https://github.com/fhalab/LevSeq_VDB/
|
|
58
58
|
|
|
59
59
|
## Setup
|
|
60
60
|
|
|
@@ -90,7 +90,7 @@ git clone https://github.com/fhalab/LevSeq.git
|
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
```
|
|
93
|
-
conda create --name levseq python=3.8
|
|
93
|
+
conda create --name levseq python=3.8 -y
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
```
|
|
@@ -100,7 +100,7 @@ conda activate levseq
|
|
|
100
100
|
From the LevSeq folder, install the package using pip:
|
|
101
101
|
|
|
102
102
|
```
|
|
103
|
-
pip install
|
|
103
|
+
pip install levseq
|
|
104
104
|
```
|
|
105
105
|
#### Dependencies
|
|
106
106
|
|
|
@@ -116,15 +116,18 @@ conda install -c bioconda -c conda-forge minimap2
|
|
|
116
116
|
```
|
|
117
117
|
or for mac users you can use: `brew install minimap2`
|
|
118
118
|
Once dependencies are all installed, you can run LevSeq using command line.
|
|
119
|
-
3. GCC
|
|
120
|
-
For Mac
|
|
119
|
+
3. GCC version 13 and 14 are both needed
|
|
120
|
+
For Mac M chip users: installation via homebrew
|
|
121
121
|
```
|
|
122
|
-
brew install gcc
|
|
122
|
+
brew install gcc@14
|
|
123
|
+
brew install gcc@13
|
|
123
124
|
```
|
|
124
125
|
For Linux users: installation via conda
|
|
125
126
|
```
|
|
126
|
-
conda install conda-forge::gcc
|
|
127
|
+
conda install conda-forge::gcc=14
|
|
128
|
+
conda install conda-forge::gcc=13
|
|
127
129
|
```
|
|
130
|
+
|
|
128
131
|
### Usage
|
|
129
132
|
#### Command Line Interface
|
|
130
133
|
LevSeq can be run using the command line interface. Here's the basic structure of the command:
|
|
@@ -8,7 +8,7 @@ Figure 1: Overview of the LevSeq variant sequencing workflow using Nanopore tech
|
|
|
8
8
|
|
|
9
9
|
- Data to reproduce the results and to test are available on zenodo [](https://doi.org/10.5281/zenodo.13694463)
|
|
10
10
|
|
|
11
|
-
- A dockerized website and database for labs to locally host and visualize their data: https://github.com/fhalab/LevSeq_VDB/
|
|
11
|
+
- A dockerized website and database for labs to locally host and visualize their data: website is available at: https://levseq.caltech.edu/ and code to host locally at: https://github.com/fhalab/LevSeq_VDB/
|
|
12
12
|
|
|
13
13
|
## Setup
|
|
14
14
|
|
|
@@ -44,7 +44,7 @@ git clone https://github.com/fhalab/LevSeq.git
|
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
```
|
|
47
|
-
conda create --name levseq python=3.8
|
|
47
|
+
conda create --name levseq python=3.8 -y
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
```
|
|
@@ -54,7 +54,7 @@ conda activate levseq
|
|
|
54
54
|
From the LevSeq folder, install the package using pip:
|
|
55
55
|
|
|
56
56
|
```
|
|
57
|
-
pip install
|
|
57
|
+
pip install levseq
|
|
58
58
|
```
|
|
59
59
|
#### Dependencies
|
|
60
60
|
|
|
@@ -70,15 +70,18 @@ conda install -c bioconda -c conda-forge minimap2
|
|
|
70
70
|
```
|
|
71
71
|
or for mac users you can use: `brew install minimap2`
|
|
72
72
|
Once dependencies are all installed, you can run LevSeq using command line.
|
|
73
|
-
3. GCC
|
|
74
|
-
For Mac
|
|
73
|
+
3. GCC version 13 and 14 are both needed
|
|
74
|
+
For Mac M chip users: installation via homebrew
|
|
75
75
|
```
|
|
76
|
-
brew install gcc
|
|
76
|
+
brew install gcc@14
|
|
77
|
+
brew install gcc@13
|
|
77
78
|
```
|
|
78
79
|
For Linux users: installation via conda
|
|
79
80
|
```
|
|
80
|
-
conda install conda-forge::gcc
|
|
81
|
+
conda install conda-forge::gcc=14
|
|
82
|
+
conda install conda-forge::gcc=13
|
|
81
83
|
```
|
|
84
|
+
|
|
82
85
|
### Usage
|
|
83
86
|
#### Command Line Interface
|
|
84
87
|
LevSeq can be run using the command line interface. Here's the basic structure of the command:
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
__title__ = 'levseq'
|
|
19
19
|
__description__ = 'LevSeq nanopore sequencing'
|
|
20
20
|
__url__ = 'https://github.com/fhalab/levseq/'
|
|
21
|
-
__version__ = '1.0.
|
|
21
|
+
__version__ = '1.0.2'
|
|
22
22
|
__author__ = 'Yueming Long, Emreay Gursoy, Ariane Mora'
|
|
23
23
|
__author_email__ = 'ylong@caltech.edu'
|
|
24
24
|
__license__ = 'GPL3'
|
|
@@ -248,8 +248,8 @@ def demux_fastq(file_to_fastq, result_folder, barcode_path):
|
|
|
248
248
|
raise FileNotFoundError(f"Executable not found: {executable_path}")
|
|
249
249
|
|
|
250
250
|
# Get min and max sequence length if user specified, otherwise use default
|
|
251
|
-
seq_min =
|
|
252
|
-
seq_max =
|
|
251
|
+
seq_min = 150
|
|
252
|
+
seq_max = 10000
|
|
253
253
|
|
|
254
254
|
# Use subprocess to run the executable
|
|
255
255
|
prompt = f"{executable_path} -f {file_to_fastq} -d {result_folder} -b {barcode_path} -w 100 -r 100 -m {seq_min} -x {seq_max}"
|
|
@@ -135,6 +135,19 @@ def _make_platemap(df, title, cmap=None):
|
|
|
135
135
|
|
|
136
136
|
Called via `generate_platemaps`; see docs there.
|
|
137
137
|
"""
|
|
138
|
+
# Handle empty dataframe case
|
|
139
|
+
if df.empty:
|
|
140
|
+
# Create a dummy plot with a message
|
|
141
|
+
empty_df = pd.DataFrame({
|
|
142
|
+
'Row': list('ABCDEFGH'),
|
|
143
|
+
'Column': [str(i) for i in range(1, 13)],
|
|
144
|
+
'logseqdepth': [0] * 96,
|
|
145
|
+
'Mutations': [''] * 96,
|
|
146
|
+
'Alignment Count': [0] * 96,
|
|
147
|
+
'Alignment Probability': [0] * 96
|
|
148
|
+
})
|
|
149
|
+
df = empty_df
|
|
150
|
+
|
|
138
151
|
# Convert SeqDepth to log for easier visualization.
|
|
139
152
|
df["logseqdepth"] = np.log(
|
|
140
153
|
df["Alignment Count"],
|
|
@@ -149,28 +162,30 @@ def _make_platemap(df, title, cmap=None):
|
|
|
149
162
|
# Set some base opts
|
|
150
163
|
opts = dict(invert_yaxis=True, title=title, show_legend=True)
|
|
151
164
|
|
|
152
|
-
#
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
add_min = False
|
|
159
|
-
if df["logseqdepth"].min() >= center:
|
|
160
|
-
add_min = True
|
|
161
|
-
|
|
162
|
-
# Adjust if it is greater than max of data (avoids ValueError)
|
|
163
|
-
if df["logseqdepth"].max() <= center:
|
|
164
|
-
# Adjust the center
|
|
165
|
-
center = df["logseqdepth"].median()
|
|
166
|
-
|
|
167
|
-
# center colormap
|
|
168
|
-
if not add_min:
|
|
169
|
-
color_levels = ns.viz._center_colormap(df["logseqdepth"], center)
|
|
165
|
+
# Set the center and handle empty or zero-only data
|
|
166
|
+
if df["logseqdepth"].max() <= 0:
|
|
167
|
+
# For empty data, create minimal valid range
|
|
168
|
+
df["logseqdepth"] = 1 # Set to constant value
|
|
169
|
+
color_levels = [0.9, 1, 1.1] # Create minimal valid range
|
|
170
|
+
seq_depth_cmap = ['#f7f7f7', '#f7f7f7'] # Use same color for uniform appearance
|
|
170
171
|
else:
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
)
|
|
172
|
+
# Regular case with actual data
|
|
173
|
+
seq_depth_cmap = list(reversed(cc.CET_D9))
|
|
174
|
+
center = np.log(10)
|
|
175
|
+
add_min = False
|
|
176
|
+
|
|
177
|
+
if df["logseqdepth"].min() >= center:
|
|
178
|
+
add_min = True
|
|
179
|
+
|
|
180
|
+
if df["logseqdepth"].max() <= center:
|
|
181
|
+
center = df["logseqdepth"].median()
|
|
182
|
+
|
|
183
|
+
if not add_min:
|
|
184
|
+
color_levels = ns.viz._center_colormap(df["logseqdepth"], center)
|
|
185
|
+
else:
|
|
186
|
+
color_levels = ns.viz._center_colormap(
|
|
187
|
+
list(df["logseqdepth"]) + [np.log(1)], center
|
|
188
|
+
)
|
|
174
189
|
|
|
175
190
|
# Get heights
|
|
176
191
|
n_rows = len(df["Row"].unique())
|
|
@@ -271,7 +286,9 @@ def _make_platemap(df, title, cmap=None):
|
|
|
271
286
|
|
|
272
287
|
# Use in apply statement for residue labels
|
|
273
288
|
def split_variant_labels(mutation_string):
|
|
274
|
-
|
|
289
|
+
if pd.isna(mutation_string) or mutation_string == '':
|
|
290
|
+
return ''
|
|
291
|
+
|
|
275
292
|
num_mutations = len(mutation_string.split("_"))
|
|
276
293
|
|
|
277
294
|
if num_mutations > 4:
|
|
@@ -287,7 +304,7 @@ def _make_platemap(df, title, cmap=None):
|
|
|
287
304
|
|
|
288
305
|
# Set the font size based on if #PARENT# is in a well and num of mutations
|
|
289
306
|
max_num_mutations = _df["Labels"].apply(lambda x: len(x.split("\n"))).max()
|
|
290
|
-
has_parent = "#PARENT#" in _df["Labels"]
|
|
307
|
+
has_parent = "#PARENT#" in _df["Labels"].values
|
|
291
308
|
|
|
292
309
|
if max_num_mutations > 3 or has_parent:
|
|
293
310
|
label_fontsize = "8pt"
|
|
@@ -299,12 +316,14 @@ def _make_platemap(df, title, cmap=None):
|
|
|
299
316
|
["Column", "Row"],
|
|
300
317
|
"Labels",
|
|
301
318
|
).opts(text_font_size=label_fontsize, **opts, text_color="#000000")
|
|
319
|
+
|
|
302
320
|
# return formatted final plot
|
|
303
321
|
return (hm * boxes * labels).opts(
|
|
304
322
|
frame_height=550, frame_width=550 * 3 // 2, border=50, show_legend=True
|
|
305
323
|
)
|
|
306
324
|
|
|
307
325
|
|
|
326
|
+
|
|
308
327
|
# Main function to return heatmap with or without alignment
|
|
309
328
|
def generate_platemaps(
|
|
310
329
|
max_combo_data,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: levseq
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Home-page: https://github.com/fhalab/levseq/
|
|
5
5
|
Author: Yueming Long, Emreay Gursoy, Ariane Mora
|
|
6
6
|
Author-email: ylong@caltech.edu
|
|
@@ -54,7 +54,7 @@ Figure 1: Overview of the LevSeq variant sequencing workflow using Nanopore tech
|
|
|
54
54
|
|
|
55
55
|
- Data to reproduce the results and to test are available on zenodo [](https://doi.org/10.5281/zenodo.13694463)
|
|
56
56
|
|
|
57
|
-
- A dockerized website and database for labs to locally host and visualize their data: https://github.com/fhalab/LevSeq_VDB/
|
|
57
|
+
- A dockerized website and database for labs to locally host and visualize their data: website is available at: https://levseq.caltech.edu/ and code to host locally at: https://github.com/fhalab/LevSeq_VDB/
|
|
58
58
|
|
|
59
59
|
## Setup
|
|
60
60
|
|
|
@@ -90,7 +90,7 @@ git clone https://github.com/fhalab/LevSeq.git
|
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
```
|
|
93
|
-
conda create --name levseq python=3.8
|
|
93
|
+
conda create --name levseq python=3.8 -y
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
```
|
|
@@ -100,7 +100,7 @@ conda activate levseq
|
|
|
100
100
|
From the LevSeq folder, install the package using pip:
|
|
101
101
|
|
|
102
102
|
```
|
|
103
|
-
pip install
|
|
103
|
+
pip install levseq
|
|
104
104
|
```
|
|
105
105
|
#### Dependencies
|
|
106
106
|
|
|
@@ -116,15 +116,18 @@ conda install -c bioconda -c conda-forge minimap2
|
|
|
116
116
|
```
|
|
117
117
|
or for mac users you can use: `brew install minimap2`
|
|
118
118
|
Once dependencies are all installed, you can run LevSeq using command line.
|
|
119
|
-
3. GCC
|
|
120
|
-
For Mac
|
|
119
|
+
3. GCC version 13 and 14 are both needed
|
|
120
|
+
For Mac M chip users: installation via homebrew
|
|
121
121
|
```
|
|
122
|
-
brew install gcc
|
|
122
|
+
brew install gcc@14
|
|
123
|
+
brew install gcc@13
|
|
123
124
|
```
|
|
124
125
|
For Linux users: installation via conda
|
|
125
126
|
```
|
|
126
|
-
conda install conda-forge::gcc
|
|
127
|
+
conda install conda-forge::gcc=14
|
|
128
|
+
conda install conda-forge::gcc=13
|
|
127
129
|
```
|
|
130
|
+
|
|
128
131
|
### Usage
|
|
129
132
|
#### Command Line Interface
|
|
130
133
|
LevSeq can be run using the command line interface. Here's the basic structure of the command:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|