Skip to content

Commit adfe1aa

Browse files
committed
Fix #902
1 parent 780e5da commit adfe1aa

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
- Updated pipeline template to [nf-core/tools 2.7.1](https://github.com/nf-core/tools/releases/tag/2.7.1)
1212
- [[#896](https://github.com/nf-core/rnaseq/issues/896)] - Remove `copyTo` call for iGenomes README
1313
- [[#897](https://github.com/nf-core/rnaseq/issues/897)] - Use `--skip_preseq` by default
14+
- [[#900](https://github.com/nf-core/rnaseq/issues/900)] - Add `--recursive` option to `fastq_dir_to_samplesheet.py` script
15+
- [[#902](https://github.com/nf-core/rnaseq/issues/902)] - `check_samplesheet.py` script doesn't output optional columns in samplesheet
1416
- [[#907](https://github.com/nf-core/rnaseq/issues/907)] - Add `--extra_star_align_args` and `--extra_salmon_quant_args` parameter
1517

1618
### Parameters

bin/check_samplesheet.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def check_samplesheet(file_in, file_out):
7070
line,
7171
)
7272

73-
num_cols = len([x for x in lspl if x])
73+
num_cols = len([x for x in lspl[:len(HEADER)] if x])
7474
if num_cols < MIN_COLS:
7575
print_error(
7676
f"Invalid number of populated columns (minimum = {MIN_COLS})!",
@@ -124,6 +124,7 @@ def check_samplesheet(file_in, file_out):
124124
print_error("Invalid combination of columns provided!", "Line", line)
125125

126126
## Create sample mapping dictionary = {sample: [[ single_end, fastq_1, fastq_2, strandedness ]]}
127+
sample_info = sample_info + lspl[len(HEADER):]
127128
if sample not in sample_mapping_dict:
128129
sample_mapping_dict[sample] = [sample_info]
129130
else:
@@ -137,7 +138,7 @@ def check_samplesheet(file_in, file_out):
137138
out_dir = os.path.dirname(file_out)
138139
make_dir(out_dir)
139140
with open(file_out, "w") as fout:
140-
fout.write(",".join(["sample", "single_end", "fastq_1", "fastq_2", "strandedness"]) + "\n")
141+
fout.write(",".join(["sample", "single_end", "fastq_1", "fastq_2", "strandedness"] + header[len(HEADER):]) + "\n")
141142
for sample in sorted(sample_mapping_dict.keys()):
142143

143144
## Check that multiple runs of the same sample are of the same datatype i.e. single-end / paired-end
@@ -149,7 +150,7 @@ def check_samplesheet(file_in, file_out):
149150
)
150151

151152
## Check that multiple runs of the same sample are of the same strandedness
152-
if not all(x[-1] == sample_mapping_dict[sample][0][-1] for x in sample_mapping_dict[sample]):
153+
if not all(x[3] == sample_mapping_dict[sample][0][3] for x in sample_mapping_dict[sample]):
153154
print_error(
154155
f"Multiple runs of a sample must have the same strandedness!",
155156
"Sample",

0 commit comments

Comments
 (0)