Skip to content

Commit

Permalink
Issue273/README fixes and HTML stats (#283)
Browse files Browse the repository at this point in the history
* Correcting single image link for testing.

* Correcting single image link for testing.

* Initial adding of readfish summarise.

* Adding images, making minor corrections to text and adding breif readfish stats section.

* Adding images, making minor corrections to text and adding breif readfish stats section.

* Adding images, making minor corrections to text and adding breif readfish stats section.

* Adding images, making minor corrections to text and adding breif readfish stats section. Closes #273 and closes #270 and closes #268

* Updating to a more conventional N50 statistic.

* Adding additional 5khz bulkfile and link to close #268

* Add html flag to `stats` command
Test HTML table in README.md

* Make args optional style and required
Rename to --fastq-directory

* Bump readfish summarise version requirement

* Add default of Non 🇫🇷 to html path

* Updating README to html formatted tables driven by readfish_summarise

* Update to readfish stats command example.

* Move text to correct location

* Point image links to main branch

* Fix bulk file links and some typos

* fix typo

---------

Co-authored-by: Adoni5 <roryjmunro1@gmail.com>
  • Loading branch information
mattloose and Adoni5 committed Oct 11, 2023
1 parent d7cf756 commit f058cdd
Show file tree
Hide file tree
Showing 11 changed files with 92 additions and 28 deletions.
92 changes: 69 additions & 23 deletions README.md

Large diffs are not rendered by default.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/images/PlaybackRunTargeted.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/images/PlaybackRunTargetedPeak.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/images/UnblockAllMessages.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies = [
"more_itertools",
'exceptiongroup ; python_version<"3.11"',
"read_until @ git+https://github.com/nanoporetech/read_until_api@v3.4.1",
"readfish_summarise >= 0.2.4",
"readfish_summarise >= 0.2.5",
"readfish[all]",
]
dynamic = ["version"]
Expand Down
24 changes: 20 additions & 4 deletions src/readfish/entry_points/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@
readfish stats --toml tests/static/stats_test/yeast_summary_test.toml --fastq-directory tests/static/stats_test/
To run and output PAF alignments and demutiplexed FASTQ, and output a HTML summary file at summary_adaptive.html
.. code-block:: bash
readfish stats --toml tests/static/stats_test/yeast_summary_test.toml --fastq-directory tests/static/stats_test/ --html summary_adaptive
"""
from __future__ import annotations
import argparse
Expand All @@ -84,12 +90,13 @@

_help = "Readfish experiment summary stats"
_cli = BASE_ARGS + (
("toml", dict(help="TOML file used in the readfish experiment.")),
("--toml", dict(help="TOML file used in the readfish experiment.", required=True)),
(
"fastq_dir",
"--fastq-directory",
dict(
help="Path to the directory containing the FASTQ files produced by the readfish experiment",
type=Path,
required=True,
),
),
(
Expand All @@ -116,10 +123,18 @@
(
"--prom",
dict(
help="Use this flag if the target platform was a PromethION",
help="Use this flag if the target platform was a PromethION. Disabled by default.",
action="store_true",
),
),
(
"--html",
dict(
help="Filepath to output a HTML file of the summary. Will append .html to given filename/path. Disabled by default.",
type=Path,
default=None,
),
),
)


Expand Down Expand Up @@ -152,11 +167,12 @@ def run(_parser, args: argparse.NameSpace, _extras):
try:
_fastq(
args.toml,
args.fastq_dir,
args.fastq_directory,
demultiplex=args.no_demultiplex,
paf_out=args.no_paf_out,
prom=args.prom,
csv=args.no_csv,
html=args.html,
)
except Exception as exc:
logger.error("Fastq data couldn't be summarised, see below for details:")
Expand Down
2 changes: 2 additions & 0 deletions tests/stats_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ def test_fastq_stats(capfd, toml_file, fastq_directory, expected):
readfish._cli_base.main(
[
"stats",
"--toml",
str(toml_file),
"--fastq-directory",
str(fastq_directory),
"--no-paf-out",
"--no-demultiplex",
Expand Down

0 comments on commit f058cdd

Please sign in to comment.