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

sequana / sequana / 28578229798

02 Jul 2026 09:01AM UTC coverage: 70.046% (-0.6%) from 70.652%
28578229798

push

github

web-flow
Merge pull request #907 from cokelaer/main

add non b-DNA modules

1213 of 1758 new or added lines in 30 files covered. (69.0%)

324 existing lines in 4 files now uncovered.

16491 of 23543 relevant lines covered (70.05%)

2.1 hits per line

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

66.67
/sequana/scripts/main/samplesheet.py
1
#  This file is part of Sequana software
2
#
3
#  Copyright (c) 2016-2020 - Sequana Development Team
4
#
5
#  Distributed under the terms of the 3-clause BSD license.
6
#  The full license is in the LICENSE file, distributed with this software.
7
#
8
#  website: https://github.com/sequana/sequana
9
#  documentation: http://sequana.readthedocs.io
10
#
11
##############################################################################
12
import colorlog
3✔
13
import rich_click as click
3✔
14

15
from sequana.iem import SampleSheetFactory
3✔
16
from sequana.scripts.utils import CONTEXT_SETTINGS
3✔
17

18
logger = colorlog.getLogger(__name__)
3✔
19

20

21
@click.command(context_settings=CONTEXT_SETTINGS)
3✔
22
@click.argument("name", type=click.STRING)
3✔
23
@click.option("--check", is_flag=True, help="report validity of the input file")
3✔
24
@click.option("--full-check", is_flag=True, help="report complete report of all checks")
3✔
25
@click.option(
3✔
26
    "--extract-adapters",
27
    is_flag=True,
28
    help="extract adapters from the settings section and save them into a fasta file",
29
)
30
@click.option("--quick-fix", is_flag=True)
3✔
31
@click.option("--output", default=None)
3✔
32
def samplesheet(**kwargs):
3✔
33
    """Standalone application to validate/check Illumina sample sheet"""
34
    name = kwargs["name"]
3✔
35
    if kwargs["check"]:
3✔
36
        iem = SampleSheetFactory(name)
3✔
37
        iem.validate()
3✔
38
        logger.info("SampleSheet looks correct")
3✔
39
    elif kwargs["full_check"]:
3✔
NEW
40
        iem = SampleSheetFactory(name)
×
41

42
        checks = iem.checker()
×
43
        for check in checks:
×
44
            if check["status"] == "Error":
×
45
                try:
×
46
                    print(f"\u274C {check['status']}, {check['msg']} {check['caller']}")
×
47
                except:
×
48
                    print(f"\u274C {check['status']}, {check['msg']} ")
×
49

50
        for check in checks:
×
51
            if check["status"] == "Warning":
×
52
                print(f"\u26A0 {check['status']}, {check['msg']}")
×
53

54
        for check in checks:
×
55
            if check["status"] == "Success":
×
56
                print(f"\u2714 {check['status']}, {check['msg']}")
×
57

58
    elif kwargs["extract_adapters"]:
3✔
59
        iem = SampleSheetFactory(name)
3✔
60
        iem.to_fasta()
3✔
61
    elif kwargs["quick_fix"]:
3✔
62
        iem = SampleSheetFactory(name)
3✔
63
        if kwargs["output"]:
3✔
64
            filename = kwargs["output"]
3✔
65
        else:  # pragma: no cover
66
            filename = name + ".fixed"
67
        logger.info("Saving fixed version in {}".format(filename))
3✔
68
        iem.quick_fix(output_filename=filename)
3✔
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

© 2026 Coveralls, Inc