• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Clinical-Genomics / demultiplexing / 4627485829

pending completion
4627485829

push

github-actions

karlnyr
remova conda stuff, expand aliases

501 of 941 relevant lines covered (53.24%)

0.53 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/demux/cli/indexreport.py
1
import click
×
2
import logging
×
3

4
from pathlib import Path
×
5

6
from demux.constants import REFERENCE_REPORT_HEADER, REPORT_TABLES_INDEX
×
7
from demux.utils.indexreport import IndexReport
×
8

9

10
LOG = logging.getLogger(__name__)
×
11

12

13
@click.group()
×
14
def indexreport():
15
    """Index report commands"""
16

17

18
@indexreport.command()
×
19
@click.option(
×
20
    "--cluster-counts",
21
    type=int,
22
    default=1000000,
23
    help=(
24
        f"Cluster count cut-off, any samples (besides indexcheck ones) with lower cluster counts are"
25
        f" included in the summary"
26
    ),
27
)
28
@click.option(
×
29
    "--dry-run", help="Dry of the function, will not write any report", is_flag=True
30
)
31
@click.option(
×
32
    "--index-report-path",
33
    type=str,
34
    required=True,
35
    help="Path to bcl2fastq indexcheck report (laneBarcode.html)",
36
)
37
@click.option(
×
38
    "--out-dir",
39
    type=str,
40
    required=True,
41
    help="Path of outdirectory for summary report",
42
)
43
@click.option(
×
44
    "--run-parameters-path",
45
    type=str,
46
    required=True,
47
    help="Path to RunParameters.xml file for the flowcell",
48
)
49
def summary(
×
50
    cluster_counts: int,
51
    dry_run: bool,
52
    index_report_path: str,
53
    out_dir: str,
54
    run_parameters_path: str,
55
):
56
    """Create a summary of the indexcheck report, extracting information on samples with low number of clusters
57
    and the topmost common unknown indexes"""
58
    index_report = IndexReport(
×
59
        cluster_counts=cluster_counts,
60
        index_report_path=Path(index_report_path),
61
        out_dir=Path(out_dir),
62
        report_tables_index=REPORT_TABLES_INDEX,
63
        run_parameters_path=Path(run_parameters_path),
64
    )
65
    LOG.info(f"Creating summary of laneBarcode.html for FC: {index_report.flowcell_id}")
×
66
    index_report.validate(reference_report_header=REFERENCE_REPORT_HEADER)
×
67
    if not dry_run:
×
68
        index_report.write_summary(report_tables_index=REPORT_TABLES_INDEX)
×
69
    else:
70
        LOG.info("This is a dry-run, will not write a summary report")
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc