Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
557254d
Template update for nf-core/tools version 2.0
KevinMenden Jul 13, 2021
df3a031
Template update for nf-core/tools version 2.0.1
nf-core-bot Jul 13, 2021
07f688f
Template update for nf-core/tools version 2.1
nf-core-bot Jul 27, 2021
739d10e
Template update for nf-core/tools version 2.2
nf-core-bot Dec 14, 2021
70b7706
Template update for nf-core/tools version 2.3
nf-core-bot Mar 15, 2022
548d18e
Template update for nf-core/tools version 2.3.1
nf-core-bot Mar 23, 2022
5de0c03
Template update for nf-core/tools version 2.3.2
nf-core-bot Mar 24, 2022
fa18e5c
Template update for nf-core/tools version 2.4
nf-core-bot May 16, 2022
b885e01
Template update for nf-core/tools version 2.5
nf-core-bot Aug 30, 2022
2d30726
Template update for nf-core/tools version 2.5.1
nf-core-bot Sep 1, 2022
2aaae1f
Template update for nf-core/tools version 2.6
nf-core-bot Oct 4, 2022
e21525e
Template update for nf-core/tools version 2.7.1
nf-core-bot Dec 8, 2022
ed3a85e
Template update for nf-core/tools version 2.7.2
nf-core-bot Dec 19, 2022
094a183
Template update for nf-core/tools version 2.8
nf-core-bot Apr 28, 2023
292102f
Template update for nf-core/tools version 2.9
nf-core-bot Jun 30, 2023
920305e
Template update for nf-core/tools version 2.10
nf-core-bot Sep 25, 2023
d27b002
Template update for nf-core/tools version 2.11
nf-core-bot Dec 19, 2023
a94050c
Template update for nf-core/tools version 2.11.1
nf-core-bot Dec 20, 2023
104f80c
Template update for nf-core/tools version 2.12
nf-core-bot Jan 29, 2024
1144582
Template update for nf-core/tools version 2.13
nf-core-bot Feb 20, 2024
eb60656
Template update for nf-core/tools version 2.13.1
nf-core-bot Feb 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Template update for nf-core/tools version 2.5.1
  • Loading branch information
nf-core-bot committed Sep 1, 2022
commit 2d307260f2dc65ab809c0c445cd2eae326d25ab2
9 changes: 6 additions & 3 deletions bin/check_samplesheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ def _validate_pair(self, row):
"""Assert that read pairs have the same file extension. Report pair status."""
if row[self._first_col] and row[self._second_col]:
row[self._single_col] = False
if Path(row[self._first_col]).suffixes[-2:] != Path(row[self._second_col]).suffixes[-2:]:
first_col_suffix = Path(row[self._first_col]).suffixes[-2:]
second_col_suffix = Path(row[self._second_col]).suffixes[-2:]
if first_col_suffix != second_col_suffix:
raise AssertionError("FASTQ pairs must have the same file extensions.")
else:
row[self._single_col] = True
Expand Down Expand Up @@ -157,7 +159,7 @@ def sniff_format(handle):
handle.seek(0)
sniffer = csv.Sniffer()
if not sniffer.has_header(peek):
logger.critical(f"The given sample sheet does not appear to contain a header.")
logger.critical("The given sample sheet does not appear to contain a header.")
sys.exit(1)
dialect = sniffer.sniff(peek)
return dialect
Expand Down Expand Up @@ -195,7 +197,8 @@ def check_samplesheet(file_in, file_out):
reader = csv.DictReader(in_handle, dialect=sniff_format(in_handle))
# Validate the existence of the expected header columns.
if not required_columns.issubset(reader.fieldnames):
logger.critical(f"The sample sheet **must** contain the column headers: {', '.join(required_columns)}.")
req_cols = ", ".join(required_columns)
logger.critical(f"The sample sheet **must** contain these column headers: {req_cols}.")
sys.exit(1)
# Validate each row.
checker = RowChecker()
Expand Down
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Config file for Python. Mostly used to configure linting of bin/check_samplesheet.py with Black.
# Should be kept the same as nf-core/tools to avoid fighting with template synchronisation.
[tool.black]
line-length = 120
target_version = ["py37", "py38", "py39", "py310"]

[tool.isort]
profile = "black"
known_first_party = ["nf_core"]
multi_line_output = 3