pycoqc-ng 3.0.0__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 (35) hide show
  1. pycoqc_ng-3.0.0/CHANGELOG.md +90 -0
  2. pycoqc_ng-3.0.0/CODE_OF_CONDUCT.md +46 -0
  3. pycoqc_ng-3.0.0/CONTRIBUTING.md +81 -0
  4. pycoqc_ng-3.0.0/LICENSE +674 -0
  5. pycoqc_ng-3.0.0/MANIFEST.in +8 -0
  6. pycoqc_ng-3.0.0/PKG-INFO +168 -0
  7. pycoqc_ng-3.0.0/README.md +126 -0
  8. pycoqc_ng-3.0.0/pycoQC/Bam_to_seq_summary.py +232 -0
  9. pycoqc_ng-3.0.0/pycoQC/Barcode_split.py +121 -0
  10. pycoqc_ng-3.0.0/pycoQC/Fast5_to_seq_summary.py +333 -0
  11. pycoqc_ng-3.0.0/pycoQC/Fastq_to_seq_summary.py +401 -0
  12. pycoqc_ng-3.0.0/pycoQC/Pod5_to_seq_summary.py +207 -0
  13. pycoqc_ng-3.0.0/pycoQC/__init__.py +16 -0
  14. pycoqc_ng-3.0.0/pycoQC/__main__.py +403 -0
  15. pycoqc_ng-3.0.0/pycoQC/common.py +490 -0
  16. pycoqc_ng-3.0.0/pycoQC/pycoQC.py +174 -0
  17. pycoqc_ng-3.0.0/pycoQC/pycoQC_parse.py +409 -0
  18. pycoqc_ng-3.0.0/pycoQC/pycoQC_plot.py +2356 -0
  19. pycoqc_ng-3.0.0/pycoQC/pycoQC_report.py +196 -0
  20. pycoqc_ng-3.0.0/pycoQC/templates/pycoQC_config.json +159 -0
  21. pycoqc_ng-3.0.0/pycoQC/templates/spectre.html.j2 +74 -0
  22. pycoqc_ng-3.0.0/pycoqc_ng.egg-info/PKG-INFO +168 -0
  23. pycoqc_ng-3.0.0/pycoqc_ng.egg-info/SOURCES.txt +33 -0
  24. pycoqc_ng-3.0.0/pycoqc_ng.egg-info/dependency_links.txt +1 -0
  25. pycoqc_ng-3.0.0/pycoqc_ng.egg-info/entry_points.txt +7 -0
  26. pycoqc_ng-3.0.0/pycoqc_ng.egg-info/requires.txt +18 -0
  27. pycoqc_ng-3.0.0/pycoqc_ng.egg-info/top_level.txt +1 -0
  28. pycoqc_ng-3.0.0/pyproject.toml +81 -0
  29. pycoqc_ng-3.0.0/setup.cfg +4 -0
  30. pycoqc_ng-3.0.0/tests/test_common.py +123 -0
  31. pycoqc_ng-3.0.0/tests/test_converters.py +101 -0
  32. pycoqc_ng-3.0.0/tests/test_end_to_end.py +90 -0
  33. pycoqc_ng-3.0.0/tests/test_fastq_parser.py +122 -0
  34. pycoqc_ng-3.0.0/tests/test_over_time_data.py +100 -0
  35. pycoqc_ng-3.0.0/tests/test_plot_helpers.py +66 -0
@@ -0,0 +1,90 @@
1
+ # Changelog
2
+
3
+ ### 2026-10-19 — pycoqc-ng 3.0.0 (unreleased)
4
+
5
+ Renamed the distribution to `pycoqc-ng`, continuing from pycoQC 2.5.2. The
6
+ import package is still `pycoQC`, so existing scripts keep working.
7
+
8
+ **Packaging**
9
+
10
+ * Metadata moved to `pyproject.toml`; the project is now pure Python and the
11
+ conda recipe is `noarch`.
12
+ * Removed the Cython extension. The two callers used `import functions`, an
13
+ absolute import of a module built at the repository root, so an installed
14
+ copy crashed on use.
15
+ * Replaced `pkg_resources` with `importlib.resources`.
16
+ * Declared the missing `pod5` dependency and dropped `cython` at runtime.
17
+
18
+ **Fixed**
19
+
20
+ * `Fastq_to_seq_summary` reused one dict for every read in a file and queued
21
+ that same object repeatedly; because `mp.Queue` pickles asynchronously, a
22
+ 200-read file produced 200 rows containing only 2 distinct reads.
23
+ * `max_fastq` processed one file fewer than requested.
24
+ * N50 sorted a pandas-owned array in place, which fails on read-only views.
25
+ * Writing elapsed timedeltas into a datetime column, rejected by pandas 3.
26
+ * `__over_time_data` dropped missing values from the value column only while
27
+ reading times from the undropped frame, pairing values with the wrong times.
28
+ * `plotly` 7 compatibility (the removed `show_link` argument).
29
+ * `python -m pycoQC` did nothing, as `__main__.py` had no entry guard.
30
+ * `mkdir` raised `pycoMethError`, a name from another project, so any failure
31
+ to create an output directory surfaced as a `NameError`.
32
+ * FASTQ chunk sizes were counted in lines. A fastq record is four lines, so a
33
+ size that was not a multiple of four split a record and silently dropped
34
+ it. Chunks are now counted in reads, and a block ending mid-record warns.
35
+
36
+ **Performance**
37
+
38
+ * Timestamps are parsed with `datetime.fromisoformat` instead of dateutil,
39
+ 160-220x faster per read.
40
+ * Mean q-scores are computed with a 256-bin count and one dot product.
41
+ * Together: 3.3x faster FASTQ parsing, with byte-identical output.
42
+ * Vectorised the over-time percentile binning and the coverage offsets.
43
+ * Flattened the nested multiprocessing in `Fastq_to_seq_summary`. Each worker
44
+ process used to open a process pool of its own, so the process count was
45
+ roughly the square of the thread count: 202 processes at `-t 16`, now 17.
46
+ Removing the oversubscription also cut 48,000 reads over 16 files from
47
+ 4.16s to 3.33s, and a single 50,000-read file from 5.01s to 3.97s.
48
+
49
+ **Refactoring**
50
+
51
+ * Replaced `from pycoQC.common import *` and `from collections import *` with
52
+ explicit imports throughout. Two modules had been using `logging` and `pd`
53
+ without importing them, relying on them leaking through the star import,
54
+ which also made the namespace fragile. With that done pyflakes resolves
55
+ names for the first time and found several unused imports and variables,
56
+ now removed.
57
+
58
+ **Project**
59
+
60
+ * Added a test suite (73 tests) and GitHub Actions CI across Python 3.9-3.13;
61
+ replaced the dead Travis configuration.
62
+ * pyflakes runs as a CI lint job, so undefined names and dead imports fail
63
+ the build.
64
+
65
+
66
+ ### 18/11/2023 v-3.0.0.0
67
+
68
+ * Added support for Fastq input.
69
+ * If Fastq provided, %GC graphs are added
70
+ * Added support for BAM input if Doraro is used to basecall
71
+ * Added support for pod5 input
72
+ * Improved support for barcodes
73
+
74
+ ### 11/10/2019 v-2.5.0.17
75
+
76
+ * Style update to comply with codacity
77
+ * Update summary table functions and split into 3 Run, Basecall and align
78
+
79
+ ### 11/10/2019 v-2.5.0.14
80
+
81
+ * Add min_pass_len option to specify a minimal read length to be "pass"
82
+ * Update pycoQC usage doc and fix notebooks broken links
83
+
84
+ ### 10/10/2019 v-2.5.0.12
85
+
86
+ * Start documenting changelog
87
+ * Change alignment score for identity frequency
88
+ * Reorganise documentation directory
89
+ * File names in HTML reports are now absolute paths
90
+ * Fix errors in Fast5_to_seq_summary
@@ -0,0 +1,46 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ * Using welcoming and inclusive language
12
+ * Being respectful of differing viewpoints and experiences
13
+ * Gracefully accepting constructive criticism
14
+ * Focusing on what is best for the community
15
+ * Showing empathy towards other community members
16
+
17
+ Examples of unacceptable behavior by participants include:
18
+
19
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+ * Trolling, insulting/derogatory comments, and personal or political attacks
21
+ * Public or private harassment
22
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue at https://github.com/duceppemo/pycoqc-ng/issues. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+ Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
39
+
40
+ ## Attribution
41
+
42
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
43
+
44
+ [homepage]: https://www.contributor-covenant.org
45
+
46
+ For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq
@@ -0,0 +1,81 @@
1
+ # Contributing to pycoQC
2
+
3
+ First of all, thanks for considering contributing to `pycoQC`! 👍 It's people like you that make it rewarding for us to work on `pycoQC`.
4
+
5
+ `pycoQC` is an open source project, maintained by publicly funded academic researchers.
6
+
7
+ [repo]: https://github.com/duceppemo/pycoqc-ng
8
+ [issues]: https://github.com/duceppemo/pycoqc-ng/issues
9
+ [new_issue]: https://github.com/duceppemo/pycoqc-ng/issues/new
10
+ [email]: https://github.com/duceppemo/pycoqc-ng/issues
11
+ [code_of_conduct]: https://github.com/duceppemo/pycoqc-ng/blob/master/CODE_OF_CONDUCT.md
12
+
13
+ ## Code of conduct
14
+
15
+ Please note that this project is released with a [Contributor Code of Conduct][code_of_conduct]. By participating in this project you agree to abide by its terms.
16
+
17
+ ## How you can contribute
18
+
19
+ There are several ways you can contribute to this project. If you want to know more about why and how to contribute to open source projects like this one, see this [Open Source Guide](https://opensource.guide/how-to-contribute/).
20
+
21
+ ### Share the love ❤️
22
+
23
+ Think `pycoQC` is useful? Let others discover it, by telling them in person, via Twitter or a blog post.
24
+
25
+ Using `pycoQC` for a paper you are writing? Please cite it.
26
+
27
+ ### Ask a question ⁉️
28
+
29
+ Using `pycoQC` and got stuck? Browse the [documentation][https://github.com/duceppemo/pycoqc-ng#usage] to see if you can find a solution.
30
+
31
+ Still stuck? Post your question as an [issue on GitHub][new_issue] or you can chat with the developers using our [gitter chat room](https://gitter.im/pycoQC/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link)
32
+
33
+ While we cannot offer user support, we'll try to do our best to address it, as questions often lead to better documentation or the discovery of bugs.
34
+
35
+ Want to ask a question in private? Contact the package maintainer by [email][email].
36
+
37
+ ### Propose an idea 💡
38
+
39
+ Have an idea for a new `pycoQC` feature? Take a look at the [issue list][issues] to see if it isn't included or suggested yet. If not, suggest your idea as an [issue on GitHub][new_issue]. While we can't promise to implement your idea, it helps to:
40
+
41
+ * Explain in detail how it would work.
42
+ * Keep the scope as narrow as possible.
43
+
44
+ See below if you want to contribute code for your idea as well.
45
+
46
+ ### Report a bug 🐛
47
+
48
+ Using `pycoQC` and discovered a bug? That's annoying! Don't let others have the same experience and report it as an [issue on GitHub][new_issue] so we can fix it. A good bug report makes it easier for us to do so, so please include:
49
+
50
+ * Your operating system name and version (e.g. Mac OS 10.13.6).
51
+ * Any details about your local setup that might be helpful in troubleshooting.
52
+ * Detailed steps to reproduce the bug.
53
+
54
+ ### Improve the documentation 📖
55
+
56
+ Noticed a typo on the website? Think a function could use a better example? Good documentation makes all the difference, so your help to improve it is very welcome!
57
+
58
+ 1. Fork [this repo][repo] and clone it to your computer. To learn more about this process, see [this guide](https://guides.github.com/activities/forking/).
59
+ 2. Edit the README.md file and submit a pull request. We will review your changes and include the fix in the next release.
60
+
61
+ ### Contribute code 📝
62
+
63
+ Care to fix bugs or implement new functionality for `pycoQC`? Awesome! 👏 Have a look at the [issue list][issues] and leave a comment on the things you want to work on. See also the development guidelines below.
64
+
65
+ ## Development guidelines
66
+
67
+ We try to follow the [GitHub flow](https://guides.github.com/introduction/flow/) for development and the [PEP 8](https://www.python.org/dev/peps/pep-0008/) style Guide for Python Code.
68
+
69
+ 1. Fork [this repo][repo] and clone it to your computer. To learn more about this process, see [this guide](https://guides.github.com/activities/forking/).
70
+
71
+ 2. If you have forked and cloned the project before and it has been a while since you worked on it, [pull changes from the original repo](https://help.github.com/articles/merging-an-upstream-repository-into-your-fork/) to your clone by using `git pull upstream master`.
72
+
73
+ 3. Make your changes and test the modified code.
74
+
75
+ 4. Commit and push your changes.
76
+
77
+ 5. Submit a [pull request](https://guides.github.com/activities/forking/#making-a-pull-request).
78
+
79
+ ---
80
+
81
+ This file was adapted from a template created by [peterdesmet](https://gist.github.com/peterdesmet/e90a1b0dc17af6c12daf6e8b2f044e7c).