levseq 1.4.3__tar.gz → 1.5.1__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 (44) hide show
  1. {levseq-1.4.3/levseq.egg-info → levseq-1.5.1}/PKG-INFO +69 -15
  2. {levseq-1.4.3 → levseq-1.5.1}/README.md +68 -14
  3. levseq-1.5.1/levseq/__init__.py +215 -0
  4. levseq-1.5.1/levseq/filter_orientation.py +221 -0
  5. {levseq-1.4.3 → levseq-1.5.1}/levseq/run_levseq.py +118 -70
  6. {levseq-1.4.3 → levseq-1.5.1}/levseq/variantcaller.py +107 -33
  7. {levseq-1.4.3 → levseq-1.5.1}/levseq/visualization.py +53 -22
  8. {levseq-1.4.3 → levseq-1.5.1/levseq.egg-info}/PKG-INFO +69 -15
  9. {levseq-1.4.3 → levseq-1.5.1}/setup.py +2 -2
  10. levseq-1.4.3/levseq/__init__.py +0 -34
  11. levseq-1.4.3/levseq/filter_orientation.py +0 -115
  12. {levseq-1.4.3 → levseq-1.5.1}/LICENSE +0 -0
  13. {levseq-1.4.3 → levseq-1.5.1}/MANIFEST.in +0 -0
  14. {levseq-1.4.3 → levseq-1.5.1}/levseq/IO_processor.py +0 -0
  15. {levseq-1.4.3 → levseq-1.5.1}/levseq/barcoding/__init__.py +0 -0
  16. {levseq-1.4.3 → levseq-1.5.1}/levseq/barcoding/demultiplex +0 -0
  17. {levseq-1.4.3 → levseq-1.5.1}/levseq/barcoding/demultiplex-arm64 +0 -0
  18. {levseq-1.4.3 → levseq-1.5.1}/levseq/barcoding/demultiplex-x86 +0 -0
  19. {levseq-1.4.3 → levseq-1.5.1}/levseq/barcoding/minion_barcodes.fasta +0 -0
  20. {levseq-1.4.3 → levseq-1.5.1}/levseq/basecaller.py +0 -0
  21. {levseq-1.4.3 → levseq-1.5.1}/levseq/cmd.py +0 -0
  22. {levseq-1.4.3 → levseq-1.5.1}/levseq/coordinates.py +0 -0
  23. {levseq-1.4.3 → levseq-1.5.1}/levseq/globals.py +0 -0
  24. {levseq-1.4.3 → levseq-1.5.1}/levseq/interface.py +0 -0
  25. {levseq-1.4.3 → levseq-1.5.1}/levseq/parser.py +0 -0
  26. {levseq-1.4.3 → levseq-1.5.1}/levseq/screen.py +0 -0
  27. {levseq-1.4.3 → levseq-1.5.1}/levseq/seqfit.py +0 -0
  28. {levseq-1.4.3 → levseq-1.5.1}/levseq/simulation.py +0 -0
  29. {levseq-1.4.3 → levseq-1.5.1}/levseq/user.py +0 -0
  30. {levseq-1.4.3 → levseq-1.5.1}/levseq/utils.py +0 -0
  31. {levseq-1.4.3 → levseq-1.5.1}/levseq.egg-info/SOURCES.txt +0 -0
  32. {levseq-1.4.3 → levseq-1.5.1}/levseq.egg-info/dependency_links.txt +0 -0
  33. {levseq-1.4.3 → levseq-1.5.1}/levseq.egg-info/entry_points.txt +0 -0
  34. {levseq-1.4.3 → levseq-1.5.1}/levseq.egg-info/requires.txt +0 -0
  35. {levseq-1.4.3 → levseq-1.5.1}/levseq.egg-info/top_level.txt +0 -0
  36. {levseq-1.4.3 → levseq-1.5.1}/setup.cfg +0 -0
  37. {levseq-1.4.3 → levseq-1.5.1}/tests/test_copy_fastq.py +0 -0
  38. {levseq-1.4.3 → levseq-1.5.1}/tests/test_demultiplex_docker.py +0 -0
  39. {levseq-1.4.3 → levseq-1.5.1}/tests/test_deploy.py +0 -0
  40. {levseq-1.4.3 → levseq-1.5.1}/tests/test_opligopools.py +0 -0
  41. {levseq-1.4.3 → levseq-1.5.1}/tests/test_seqfitvis.py +0 -0
  42. {levseq-1.4.3 → levseq-1.5.1}/tests/test_seqs.py +0 -0
  43. {levseq-1.4.3 → levseq-1.5.1}/tests/test_statistics.py +0 -0
  44. {levseq-1.4.3 → levseq-1.5.1}/tests/test_variant_calling.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: levseq
3
- Version: 1.4.3
3
+ Version: 1.5.1
4
4
  Home-page: https://github.com/fhalab/levseq/
5
5
  Author: Yueming Long, Ariane Mora, Francesca-Zhoufan Li, Emre Gursoy
6
6
  Author-email: ylong@caltech.edu
@@ -63,39 +63,89 @@ LevSeq provides a streamlined pipeline for sequencing and analyzing genetic vari
63
63
 
64
64
  ![Figure 1: LevSeq Workflow](manuscript/figures/LevSeq_Figure-1.jpeg)
65
65
  Figure 1: Overview of the LevSeq variant sequencing workflow using Nanopore technology. This diagram illustrates the key steps in the process, from sample preparation to data analysis and visualization.
66
+
67
+ ## <span style="color: orange;">**Important: Barcode Improvements and LevSeq 2.0 Development**</span>
68
+
69
+ **We have identified and resolved demultiplexing challenges in the original barcode set.** Version 1.4 introduced alignment-aware variant calling to address these issues and significantly improve accuracy.
70
+
71
+ **We are actively developing LevSeq 2.0** in collaboration with DTU and AITHYRA to fundamentally redesign the barcode system. The updated approach includes:
72
+
73
+ - **Enhanced barcode design**: New barcodes will be strain-aware and sequence-aware, generated using an advanced barcode design tool
74
+ - **Reversed workflow architecture**: LevSeq 2.0 will perform alignment first, then demultiplexing (rather than the current demultiplexing-first approach), resolving issues with forward and reverse read handling
75
+ - **Improved accuracy**: These changes will provide more robust demultiplexing and variant calling across diverse experimental conditions
76
+
77
+ **If you are planning to order barcoded primers now, or need detailed help with troubleshooting or barcode design, please reach out at [lyming2021@gmail.com](mailto:lyming2021@gmail.com).**
78
+
66
79
  ## Notes
67
80
 
68
- LevSeq was designed for epPCR and SSM experiments, however, we are currently extending it to work for other enzyme engineering designs as well, the current features are under development:
81
+ LevSeq was designed for epPCR and SSM experiments. We are also extending it to support additional enzyme engineering designs. Current features under development include:
82
+
83
+ 1. Insertion handling (see version 4.1.3). Thanks to Brian Zhong for contributions to this section.
84
+ 2. Gene calling for experiments with different genes, using the `--oligopool` flag.
85
+
86
+ If you notice issues with new features or have adapted LevSeq for your own use case, community contributions are welcome. Please submit an issue or pull request and we will aim to incorporate the changes.
69
87
 
70
- 1. Insertion handling (see version 4.1.3) - thanks to Brian Zhong for his contributions to this section!
71
- 2. Gene calling (handling different genes, use the `--oligopool` flag)
88
+ Performance update: demultiplexing now runs in parallel batches of 8 plates and input FASTQs are staged once per run, improving throughput on multi-core systems.
72
89
 
73
- If you notice any issues with new features or have adapted the LevSeq code for your own use cases, we would love community contributions! Please submit either an issue, or a pull request and we will aim to incorperate the changes.
90
+ Recent repository polish:
91
+ - Faster imports: `import levseq` no longer initializes visualization libraries unless they are needed.
92
+ - Cleaner run startup: plotting dependencies are loaded only when platemaps are generated.
93
+ - Packaging cleanup: bundled barcode files and demultiplex binaries are now declared through package discovery.
94
+ - Git hygiene: local `node_modules/` folders are ignored.
74
95
 
75
96
  ## Quick Start
76
97
 
77
- Note the current stable version is: `1.4.2`, the latest version is `1.4.3`.
98
+ Note the current stable version is: `1.5.1`, the latest version is `1.5.1`.
78
99
 
79
100
  For stable releases these are made available via docker and pip. For latest versions, please clone the repo and install locally (see *Local development or install of latest version* below).
80
101
 
102
+ ### How to Run LevSeq
103
+
104
+ Before running LevSeq, prepare:
105
+ - A folder containing Oxford Nanopore basecalled FASTQ files, usually from a `fastq_pass` directory.
106
+ - A reference CSV file with the columns `barcode_plate`, `name`, and `refseq` (see [Reference File Format](#reference-file-format-refcsv)).
107
+ - A run name, which LevSeq uses as the output folder name.
108
+
109
+ The basic command format is:
110
+
111
+ ```bash
112
+ levseq <run_name> <path_to_fastq_folder> <path_to_ref_csv>
113
+ ```
114
+
115
+ Example:
116
+
117
+ ```bash
118
+ levseq my_experiment /path/to/fastq_pass /path/to/ref.csv
119
+ ```
120
+
121
+ LevSeq writes results to an output folder named after `<run_name>`. Key outputs include `variants.csv`, `visualization_partial.csv`, result CSV files, logs, and interactive platemap HTML files.
122
+
123
+ Common run options:
124
+ - Use `--output /path/to/output` to choose where the run folder is created.
125
+ - Use `--skip_demultiplexing` if reads have already been demultiplexed.
126
+ - Use `--skip_variantcalling` if you only want to run demultiplexing.
127
+ - Use `--oligopool` for experiments with multiple genes or references per barcode plate.
128
+ - Use `--show_msa` to include multiple sequence alignment views in the output.
129
+
81
130
  ### Docker Installation (Recommended)
82
131
 
83
132
  1. Install Docker: [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/)
84
133
  2. Pull the appropriate image:
85
134
  ```bash
86
135
  # For Linux/Windows x86 systems:
87
- docker pull yueminglong/levseq:levseq-1.4-x86
136
+ docker pull yueminglong/levseq:levseq-1.5.1-x86
88
137
 
89
138
  # For Mac M-series chips (M1, M2, M3, M4):
90
- docker pull yueminglong/levseq:levseq-1.4-arm64
139
+ docker pull yueminglong/levseq:levseq-1.5.1-arm64
91
140
  ```
92
141
  3. Run LevSeq:
93
142
  ```bash
94
- docker run --rm -v "/full/path/to/data:/levseq_results" yueminglong/levseq:levseq-1.4-arm64 my_experiment levseq_results/ levseq_results/ref.csv
143
+ docker run --rm -v "/full/path/to/data:/levseq_results" yueminglong/levseq:levseq-1.5.1-arm64 my_experiment levseq_results/ levseq_results/ref.csv
95
144
  ```
145
+ Replace `levseq-1.5.1-arm64` with the image tag that matches your platform and release.
96
146
  4. Connect function data to your sequence data
97
147
  ```bash
98
- docker run --rm -v "/full/path/to/data:/levseq_results" yueminglong/levseq:levseq-1.4-arm64 my_experiment levseq_results/ levseq_results/ref.csv --fitness_files "levseq_results/20250712_epPCR_Q06714_37.csv,levseq_results/20250712_epPCR_Q06714_39.csv,levseq_results/20250712_epPCR_Q06714_40.csv" --smiles 'O=P(OC1=CC=CC=C1)(OC2=CC=CC=C2)OC3=CC=CC=C3>>O=P(O)(OC4=CC=CC=C4)OC5=CC=CC=C5' --compound dPPi --variant_df "levseq_results/visualization_partial.csv"
148
+ docker run --rm -v "/full/path/to/data:/levseq_results" yueminglong/levseq:levseq-1.5.1-arm64 my_experiment levseq_results/ levseq_results/ref.csv --fitness_files "levseq_results/20250712_epPCR_Q06714_37.csv,levseq_results/20250712_epPCR_Q06714_39.csv,levseq_results/20250712_epPCR_Q06714_40.csv" --smiles 'O=P(OC1=CC=CC=C1)(OC2=CC=CC=C2)OC3=CC=CC=C3>>O=P(O)(OC4=CC=CC=C4)OC5=CC=CC=C5' --compound dPPi --variant_df "levseq_results/visualization_partial.csv"
99
149
  ```
100
150
  ### Pip Installation (Mac/Linux only)
101
151
 
@@ -130,11 +180,11 @@ brew install gcc@13 gcc@14
130
180
  levseq my_experiment /path/to/data/ /path/to/ref.csv "LCMS_file_{barcode1}.csv,LCMS_file_{barcode2}.csv," --smiles 'reaction_smiles_string' --compound "name_of_compound_in_LCMS_file" --variant_df "visualization_partial.csv"
131
181
  ```
132
182
 
133
- Note for function data we currently expect a LCMS file e.g. with the columns:
183
+ For function data, LevSeq currently expects LCMS files with these columns:
134
184
  - `Sample Vial Number` (corresponding to the well that the sample was from).
135
185
  - `Area` (which becomes fitness value).
136
186
  - `Compound Name` which is the name of the compound we filter for that is passed as a parameter.
137
- - The last `_X.csv` needs to be the barcode number to match that sample to your plate e.g. if you ran LevSeq with barcode 33 for plate 2 you need to have `_33.csv` for the fitness file for plate 2. e.g. `some_fitnes_for_plate_2_33.csv`.
187
+ - The final `_X.csv` suffix should contain the barcode number used to match that sample to the correct plate. For example, if plate 2 used barcode 33, the fitness file should end in `_33.csv`, such as `some_fitness_for_plate_2_33.csv`.
138
188
 
139
189
 
140
190
  ## Data and Visualization
@@ -173,6 +223,10 @@ For oligopool experiments (multiple proteins per plate), use:
173
223
  - `--output`: Custom save location (defaults to current directory)
174
224
  - `--show_msa`: Show multiple sequence alignment for each well
175
225
  - `--oligopool`: Process data as oligopool experiment
226
+ - `--fitness_files`: Comma-separated LCMS or function-data CSV files to join with sequence results
227
+ - `--smiles`: Reaction SMILES string used when joining function data
228
+ - `--compound`: Compound name to filter in the function-data files
229
+ - `--variant_df`: LevSeq variant dataframe to join with function data, usually `visualization_partial.csv`
176
230
 
177
231
  ## Step-by-Step Tutorial
178
232
 
@@ -183,7 +237,7 @@ For oligopool experiments (multiple proteins per plate), use:
183
237
  2. **Run LevSeq**:
184
238
  ```bash
185
239
  # Via Docker
186
- docker run --rm -v "/path/to/data:/levseq_results" yueminglong/levseq:levseq-1.4-arm64 my_experiment levseq_results/ levseq_results/ref.csv
240
+ docker run --rm -v "/path/to/data:/levseq_results" yueminglong/levseq:levseq-1.5.1-arm64 my_experiment levseq_results/ levseq_results/ref.csv
187
241
 
188
242
  # Via pip
189
243
  levseq my_experiment /path/to/data/ /path/to/ref.csv
@@ -214,7 +268,7 @@ conda create --name levseq python=3.10
214
268
  git clone git@github.com:fhalab/LevSeq.git
215
269
  cd LevSeq
216
270
  python setup.py sdist bdist_wheel
217
- pip install dist/levseq-1.4.3.tar.gz
271
+ pip install dist/levseq-1.5.1.tar.gz
218
272
  ```
219
273
 
220
274
  ## Citing LevSeq
@@ -233,4 +287,4 @@ If you find LevSeq useful, please cite our paper:
233
287
 
234
288
  ## Contact
235
289
 
236
- Leave a feature request in the issues or reach us via [email](mailto:levseqdb@gmail.com).
290
+ For detailed questions, troubleshooting, barcode design support, or feature requests, email [lyming2021@gmail.com](mailto:lyming2021@gmail.com). Reproducible bugs and public feature discussions are also welcome as GitHub issues.
@@ -4,39 +4,89 @@ LevSeq provides a streamlined pipeline for sequencing and analyzing genetic vari
4
4
 
5
5
  ![Figure 1: LevSeq Workflow](manuscript/figures/LevSeq_Figure-1.jpeg)
6
6
  Figure 1: Overview of the LevSeq variant sequencing workflow using Nanopore technology. This diagram illustrates the key steps in the process, from sample preparation to data analysis and visualization.
7
+
8
+ ## <span style="color: orange;">**Important: Barcode Improvements and LevSeq 2.0 Development**</span>
9
+
10
+ **We have identified and resolved demultiplexing challenges in the original barcode set.** Version 1.4 introduced alignment-aware variant calling to address these issues and significantly improve accuracy.
11
+
12
+ **We are actively developing LevSeq 2.0** in collaboration with DTU and AITHYRA to fundamentally redesign the barcode system. The updated approach includes:
13
+
14
+ - **Enhanced barcode design**: New barcodes will be strain-aware and sequence-aware, generated using an advanced barcode design tool
15
+ - **Reversed workflow architecture**: LevSeq 2.0 will perform alignment first, then demultiplexing (rather than the current demultiplexing-first approach), resolving issues with forward and reverse read handling
16
+ - **Improved accuracy**: These changes will provide more robust demultiplexing and variant calling across diverse experimental conditions
17
+
18
+ **If you are planning to order barcoded primers now, or need detailed help with troubleshooting or barcode design, please reach out at [lyming2021@gmail.com](mailto:lyming2021@gmail.com).**
19
+
7
20
  ## Notes
8
21
 
9
- LevSeq was designed for epPCR and SSM experiments, however, we are currently extending it to work for other enzyme engineering designs as well, the current features are under development:
22
+ LevSeq was designed for epPCR and SSM experiments. We are also extending it to support additional enzyme engineering designs. Current features under development include:
23
+
24
+ 1. Insertion handling (see version 4.1.3). Thanks to Brian Zhong for contributions to this section.
25
+ 2. Gene calling for experiments with different genes, using the `--oligopool` flag.
26
+
27
+ If you notice issues with new features or have adapted LevSeq for your own use case, community contributions are welcome. Please submit an issue or pull request and we will aim to incorporate the changes.
10
28
 
11
- 1. Insertion handling (see version 4.1.3) - thanks to Brian Zhong for his contributions to this section!
12
- 2. Gene calling (handling different genes, use the `--oligopool` flag)
29
+ Performance update: demultiplexing now runs in parallel batches of 8 plates and input FASTQs are staged once per run, improving throughput on multi-core systems.
13
30
 
14
- If you notice any issues with new features or have adapted the LevSeq code for your own use cases, we would love community contributions! Please submit either an issue, or a pull request and we will aim to incorperate the changes.
31
+ Recent repository polish:
32
+ - Faster imports: `import levseq` no longer initializes visualization libraries unless they are needed.
33
+ - Cleaner run startup: plotting dependencies are loaded only when platemaps are generated.
34
+ - Packaging cleanup: bundled barcode files and demultiplex binaries are now declared through package discovery.
35
+ - Git hygiene: local `node_modules/` folders are ignored.
15
36
 
16
37
  ## Quick Start
17
38
 
18
- Note the current stable version is: `1.4.2`, the latest version is `1.4.3`.
39
+ Note the current stable version is: `1.5.1`, the latest version is `1.5.1`.
19
40
 
20
41
  For stable releases these are made available via docker and pip. For latest versions, please clone the repo and install locally (see *Local development or install of latest version* below).
21
42
 
43
+ ### How to Run LevSeq
44
+
45
+ Before running LevSeq, prepare:
46
+ - A folder containing Oxford Nanopore basecalled FASTQ files, usually from a `fastq_pass` directory.
47
+ - A reference CSV file with the columns `barcode_plate`, `name`, and `refseq` (see [Reference File Format](#reference-file-format-refcsv)).
48
+ - A run name, which LevSeq uses as the output folder name.
49
+
50
+ The basic command format is:
51
+
52
+ ```bash
53
+ levseq <run_name> <path_to_fastq_folder> <path_to_ref_csv>
54
+ ```
55
+
56
+ Example:
57
+
58
+ ```bash
59
+ levseq my_experiment /path/to/fastq_pass /path/to/ref.csv
60
+ ```
61
+
62
+ LevSeq writes results to an output folder named after `<run_name>`. Key outputs include `variants.csv`, `visualization_partial.csv`, result CSV files, logs, and interactive platemap HTML files.
63
+
64
+ Common run options:
65
+ - Use `--output /path/to/output` to choose where the run folder is created.
66
+ - Use `--skip_demultiplexing` if reads have already been demultiplexed.
67
+ - Use `--skip_variantcalling` if you only want to run demultiplexing.
68
+ - Use `--oligopool` for experiments with multiple genes or references per barcode plate.
69
+ - Use `--show_msa` to include multiple sequence alignment views in the output.
70
+
22
71
  ### Docker Installation (Recommended)
23
72
 
24
73
  1. Install Docker: [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/)
25
74
  2. Pull the appropriate image:
26
75
  ```bash
27
76
  # For Linux/Windows x86 systems:
28
- docker pull yueminglong/levseq:levseq-1.4-x86
77
+ docker pull yueminglong/levseq:levseq-1.5.1-x86
29
78
 
30
79
  # For Mac M-series chips (M1, M2, M3, M4):
31
- docker pull yueminglong/levseq:levseq-1.4-arm64
80
+ docker pull yueminglong/levseq:levseq-1.5.1-arm64
32
81
  ```
33
82
  3. Run LevSeq:
34
83
  ```bash
35
- docker run --rm -v "/full/path/to/data:/levseq_results" yueminglong/levseq:levseq-1.4-arm64 my_experiment levseq_results/ levseq_results/ref.csv
84
+ docker run --rm -v "/full/path/to/data:/levseq_results" yueminglong/levseq:levseq-1.5.1-arm64 my_experiment levseq_results/ levseq_results/ref.csv
36
85
  ```
86
+ Replace `levseq-1.5.1-arm64` with the image tag that matches your platform and release.
37
87
  4. Connect function data to your sequence data
38
88
  ```bash
39
- docker run --rm -v "/full/path/to/data:/levseq_results" yueminglong/levseq:levseq-1.4-arm64 my_experiment levseq_results/ levseq_results/ref.csv --fitness_files "levseq_results/20250712_epPCR_Q06714_37.csv,levseq_results/20250712_epPCR_Q06714_39.csv,levseq_results/20250712_epPCR_Q06714_40.csv" --smiles 'O=P(OC1=CC=CC=C1)(OC2=CC=CC=C2)OC3=CC=CC=C3>>O=P(O)(OC4=CC=CC=C4)OC5=CC=CC=C5' --compound dPPi --variant_df "levseq_results/visualization_partial.csv"
89
+ docker run --rm -v "/full/path/to/data:/levseq_results" yueminglong/levseq:levseq-1.5.1-arm64 my_experiment levseq_results/ levseq_results/ref.csv --fitness_files "levseq_results/20250712_epPCR_Q06714_37.csv,levseq_results/20250712_epPCR_Q06714_39.csv,levseq_results/20250712_epPCR_Q06714_40.csv" --smiles 'O=P(OC1=CC=CC=C1)(OC2=CC=CC=C2)OC3=CC=CC=C3>>O=P(O)(OC4=CC=CC=C4)OC5=CC=CC=C5' --compound dPPi --variant_df "levseq_results/visualization_partial.csv"
40
90
  ```
41
91
  ### Pip Installation (Mac/Linux only)
42
92
 
@@ -71,11 +121,11 @@ brew install gcc@13 gcc@14
71
121
  levseq my_experiment /path/to/data/ /path/to/ref.csv "LCMS_file_{barcode1}.csv,LCMS_file_{barcode2}.csv," --smiles 'reaction_smiles_string' --compound "name_of_compound_in_LCMS_file" --variant_df "visualization_partial.csv"
72
122
  ```
73
123
 
74
- Note for function data we currently expect a LCMS file e.g. with the columns:
124
+ For function data, LevSeq currently expects LCMS files with these columns:
75
125
  - `Sample Vial Number` (corresponding to the well that the sample was from).
76
126
  - `Area` (which becomes fitness value).
77
127
  - `Compound Name` which is the name of the compound we filter for that is passed as a parameter.
78
- - The last `_X.csv` needs to be the barcode number to match that sample to your plate e.g. if you ran LevSeq with barcode 33 for plate 2 you need to have `_33.csv` for the fitness file for plate 2. e.g. `some_fitnes_for_plate_2_33.csv`.
128
+ - The final `_X.csv` suffix should contain the barcode number used to match that sample to the correct plate. For example, if plate 2 used barcode 33, the fitness file should end in `_33.csv`, such as `some_fitness_for_plate_2_33.csv`.
79
129
 
80
130
 
81
131
  ## Data and Visualization
@@ -114,6 +164,10 @@ For oligopool experiments (multiple proteins per plate), use:
114
164
  - `--output`: Custom save location (defaults to current directory)
115
165
  - `--show_msa`: Show multiple sequence alignment for each well
116
166
  - `--oligopool`: Process data as oligopool experiment
167
+ - `--fitness_files`: Comma-separated LCMS or function-data CSV files to join with sequence results
168
+ - `--smiles`: Reaction SMILES string used when joining function data
169
+ - `--compound`: Compound name to filter in the function-data files
170
+ - `--variant_df`: LevSeq variant dataframe to join with function data, usually `visualization_partial.csv`
117
171
 
118
172
  ## Step-by-Step Tutorial
119
173
 
@@ -124,7 +178,7 @@ For oligopool experiments (multiple proteins per plate), use:
124
178
  2. **Run LevSeq**:
125
179
  ```bash
126
180
  # Via Docker
127
- docker run --rm -v "/path/to/data:/levseq_results" yueminglong/levseq:levseq-1.4-arm64 my_experiment levseq_results/ levseq_results/ref.csv
181
+ docker run --rm -v "/path/to/data:/levseq_results" yueminglong/levseq:levseq-1.5.1-arm64 my_experiment levseq_results/ levseq_results/ref.csv
128
182
 
129
183
  # Via pip
130
184
  levseq my_experiment /path/to/data/ /path/to/ref.csv
@@ -155,7 +209,7 @@ conda create --name levseq python=3.10
155
209
  git clone git@github.com:fhalab/LevSeq.git
156
210
  cd LevSeq
157
211
  python setup.py sdist bdist_wheel
158
- pip install dist/levseq-1.4.3.tar.gz
212
+ pip install dist/levseq-1.5.1.tar.gz
159
213
  ```
160
214
 
161
215
  ## Citing LevSeq
@@ -174,4 +228,4 @@ If you find LevSeq useful, please cite our paper:
174
228
 
175
229
  ## Contact
176
230
 
177
- Leave a feature request in the issues or reach us via [email](mailto:levseqdb@gmail.com).
231
+ For detailed questions, troubleshooting, barcode design support, or feature requests, email [lyming2021@gmail.com](mailto:lyming2021@gmail.com). Reproducible bugs and public feature discussions are also welcome as GitHub issues.
@@ -0,0 +1,215 @@
1
+ ###############################################################################
2
+ # #
3
+ # This program is free software: you can redistribute it and/or modify #
4
+ # it under the terms of the GNU General Public License as published by #
5
+ # the Free Software Foundation, either version 3 of the License, or #
6
+ # (at your option) any later version. #
7
+ # #
8
+ # This program is distributed in the hope that it will be useful, #
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of #
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
11
+ # GNU General Public License for more details. #
12
+ # #
13
+ # You should have received a copy of the GNU General Public License #
14
+ # along with this program. If not, see <http://www.gnu.org/licenses/>. #
15
+ # #
16
+ ###############################################################################
17
+
18
+ __title__ = 'levseq'
19
+ __description__ = 'LevSeq nanopore sequencing'
20
+ __url__ = 'https://github.com/fhalab/levseq/'
21
+ __version__ = '1.5.1'
22
+ __author__ = 'Yueming Long, Ariane Mora, Francesca-Zhoufan Li, Emre Gursoy'
23
+ __author_email__ = 'ylong@caltech.edu'
24
+ __license__ = 'GPL3'
25
+
26
+ from importlib import import_module
27
+ import sys as _sys
28
+
29
+
30
+ _LAZY_MODULES = {
31
+ 'cmd': 'levseq.cmd',
32
+ 'filter_orientation': 'levseq.filter_orientation',
33
+ 'globals': 'levseq.globals',
34
+ 'interface': 'levseq.interface',
35
+ 'run_levseq': 'levseq.run_levseq',
36
+ 'simulation': 'levseq.simulation',
37
+ 'user': 'levseq.user',
38
+ 'utils': 'levseq.utils',
39
+ 'variantcaller': 'levseq.variantcaller',
40
+ 'visualization': 'levseq.visualization',
41
+ }
42
+
43
+ _LAZY_EXPORTS = {
44
+ 'ALL_AAS': 'levseq.variantcaller',
45
+ 'AlignIO': 'levseq.visualization',
46
+ 'CODONS': 'levseq.globals',
47
+ 'CWD': 'levseq.interface',
48
+ 'ColumnDataSource': 'levseq.visualization',
49
+ 'Counter': 'levseq.visualization',
50
+ 'CustomJS': 'levseq.visualization',
51
+ 'DEFAULT_TARGETS': 'levseq.globals',
52
+ 'Div': 'levseq.visualization',
53
+ 'FactorRange': 'levseq.visualization',
54
+ 'HoverTool': 'levseq.visualization',
55
+ 'Label': 'levseq.visualization',
56
+ 'Legend': 'levseq.visualization',
57
+ 'LegendItem': 'levseq.visualization',
58
+ 'Motif': 'levseq.visualization',
59
+ 'MultipleSeqAlignment': 'levseq.visualization',
60
+ 'NUC_COLOR_DICT': 'levseq.visualization',
61
+ 'PCA': 'levseq.user',
62
+ 'Path': 'levseq.variantcaller',
63
+ 'Range1d': 'levseq.visualization',
64
+ 'RangeSlider': 'levseq.visualization',
65
+ 'Rect': 'levseq.visualization',
66
+ 'SCORE_MATRIX': 'levseq.globals',
67
+ 'SW_ALIGN_PARAMS': 'levseq.globals',
68
+ 'SciUtil': 'levseq.user',
69
+ 'Seq': 'levseq.filter_orientation',
70
+ 'SeqIO': 'levseq.variantcaller',
71
+ 'Spacer': 'levseq.visualization',
72
+ 'Tap': 'levseq.visualization',
73
+ 'TapTool': 'levseq.visualization',
74
+ 'Text': 'levseq.visualization',
75
+ 'ThreadPool': 'levseq.variantcaller',
76
+ 'ThreadPoolExecutor': 'levseq.filter_orientation',
77
+ 'VariantCaller': 'levseq.variantcaller',
78
+ 'WELL_IDS': 'levseq.visualization',
79
+ 'aa1': 'levseq.variantcaller',
80
+ 'aa_to_index': 'levseq.user',
81
+ 'aggregate_conservation': 'levseq.visualization',
82
+ 'aggregate_gray_blocks': 'levseq.visualization',
83
+ 'alignment_from_cigar': 'levseq.variantcaller',
84
+ 'amino_acid_to_codon': 'levseq.variantcaller',
85
+ 'amino_acids': 'levseq.user',
86
+ 'annotations': 'levseq.visualization',
87
+ 'argparse': 'levseq.interface',
88
+ 'as_completed': 'levseq.filter_orientation',
89
+ 'basecall_model': 'levseq.interface',
90
+ 'binomtest': 'levseq.variantcaller',
91
+ 'build_cli_parser': 'levseq.interface',
92
+ 'build_kmer_set': 'levseq.filter_orientation',
93
+ 'calc_mutation_significance_for_position_in_well': 'levseq.variantcaller',
94
+ 'calculate_mutation_significance_across_well': 'levseq.variantcaller',
95
+ 'cc': 'levseq.visualization',
96
+ 'check_demultiplexing': 'levseq.variantcaller',
97
+ 'check_variants': 'levseq.simulation',
98
+ 'column': 'levseq.visualization',
99
+ 'combine_pvalues': 'levseq.variantcaller',
100
+ 'combine_seq_func_data': 'levseq.interface',
101
+ 'convert_variant_df_to_seqs': 'levseq.user',
102
+ 'count_kmer_hits': 'levseq.filter_orientation',
103
+ 'deepcopy': 'levseq.variantcaller',
104
+ 'defaultdict': 'levseq.variantcaller',
105
+ 'execute_LevSeq': 'levseq.interface',
106
+ 'figure': 'levseq.visualization',
107
+ 'filter_demultiplexed_folder': 'levseq.filter_orientation',
108
+ 'filter_single_file': 'levseq.filter_orientation',
109
+ 'generate_epcr_library': 'levseq.simulation',
110
+ 'generate_platemaps': 'levseq.visualization',
111
+ 'generate_ssm_library': 'levseq.simulation',
112
+ 'get_colour': 'levseq.user',
113
+ 'get_cons': 'levseq.visualization',
114
+ 'get_cons_diff_colorNseq': 'levseq.visualization',
115
+ 'get_cons_seq': 'levseq.visualization',
116
+ 'get_dummy_plate_df': 'levseq.variantcaller',
117
+ 'get_mut': 'levseq.variantcaller',
118
+ 'get_reads_for_well': 'levseq.variantcaller',
119
+ 'get_sequence_colors': 'levseq.visualization',
120
+ 'get_sequence_diff_colorNseq': 'levseq.visualization',
121
+ 'get_template_df': 'levseq.variantcaller',
122
+ 'get_variant_label_for_well': 'levseq.variantcaller',
123
+ 'get_well_ids': 'levseq.visualization',
124
+ 'glob': 'levseq.variantcaller',
125
+ 'gridplot': 'levseq.visualization',
126
+ 'gzip': 'levseq.filter_orientation',
127
+ 'hv': 'levseq.visualization',
128
+ 'init_notebook_env': 'levseq.visualization',
129
+ 'insert_nt': 'levseq.simulation',
130
+ 'iter_fastq_records': 'levseq.filter_orientation',
131
+ 'logger': 'levseq.variantcaller',
132
+ 'logging': 'levseq.variantcaller',
133
+ 'main': 'levseq.cmd',
134
+ 'make_epcr_de_experiment': 'levseq.simulation',
135
+ 'make_experiment': 'levseq.simulation',
136
+ 'make_mixed_well_epcr_de_experiment': 'levseq.simulation',
137
+ 'make_msa': 'levseq.user',
138
+ 'make_oligopool_plates': 'levseq.visualization',
139
+ 'make_pca': 'levseq.user',
140
+ 'make_row_from_read_pileup_across_well': 'levseq.variantcaller',
141
+ 'make_ssm_de_experiment': 'levseq.simulation',
142
+ 'make_well_df_for_saving': 'levseq.simulation',
143
+ 'make_well_df_from_reads': 'levseq.variantcaller',
144
+ 'match_color': 'levseq.visualization',
145
+ 'math': 'levseq.variantcaller',
146
+ 'min_depth': 'levseq.interface',
147
+ 'mpl': 'levseq.visualization',
148
+ 'multipletests': 'levseq.variantcaller',
149
+ 'mutate_sequence': 'levseq.simulation',
150
+ 'np': 'levseq.variantcaller',
151
+ 'ns': 'levseq.visualization',
152
+ 'one_hot_encode': 'levseq.user',
153
+ 'os': 'levseq.variantcaller',
154
+ 'output_file': 'levseq.visualization',
155
+ 'output_notebook': 'levseq.visualization',
156
+ 'padding_end': 'levseq.interface',
157
+ 'padding_start': 'levseq.interface',
158
+ 'pd': 'levseq.variantcaller',
159
+ 'plot_empty': 'levseq.visualization',
160
+ 'plot_seaborn_heatmap': 'levseq.visualization',
161
+ 'plot_sequence_alignment': 'levseq.visualization',
162
+ 'plt': 'levseq.visualization',
163
+ 'pn': 'levseq.visualization',
164
+ 'postprocess_variant_df': 'levseq.variantcaller',
165
+ 'pysam': 'levseq.variantcaller',
166
+ 'random': 'levseq.variantcaller',
167
+ 're': 'levseq.variantcaller',
168
+ 'row': 'levseq.visualization',
169
+ 'run_LevSeq': 'levseq.interface',
170
+ 'sample_kmer_positions': 'levseq.filter_orientation',
171
+ 'save': 'levseq.visualization',
172
+ 'show': 'levseq.visualization',
173
+ 'shutil': 'levseq.variantcaller',
174
+ 'sns': 'levseq.visualization',
175
+ 'subprocess': 'levseq.variantcaller',
176
+ 'sys': 'levseq.visualization',
177
+ 'threshold': 'levseq.interface',
178
+ 'tqdm': 'levseq.variantcaller',
179
+ 'translate': 'levseq.variantcaller',
180
+ 'u': 'levseq.user',
181
+ 'warnings': 'levseq.variantcaller',
182
+ 'well2nb': 'levseq.visualization',
183
+ 'write_msa_for_df': 'levseq.simulation',
184
+ }
185
+
186
+ __all__ = [
187
+ '__title__',
188
+ '__description__',
189
+ '__url__',
190
+ '__version__',
191
+ '__author__',
192
+ '__author_email__',
193
+ '__license__',
194
+ *sorted(_LAZY_MODULES),
195
+ *sorted(_LAZY_EXPORTS),
196
+ ]
197
+
198
+
199
+ def __getattr__(name):
200
+ if name in _LAZY_MODULES:
201
+ module = import_module(_LAZY_MODULES[name])
202
+ vars(_sys.modules[__name__])[name] = module
203
+ return module
204
+
205
+ if name in _LAZY_EXPORTS:
206
+ module = import_module(_LAZY_EXPORTS[name])
207
+ value = getattr(module, name)
208
+ vars(_sys.modules[__name__])[name] = value
209
+ return value
210
+
211
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
212
+
213
+
214
+ def __dir__():
215
+ return sorted(set(vars(_sys.modules[__name__])) | set(__all__))