Skip to content

Commit

Permalink
bbmap: Correctly handle adapter stats files with additional columns
Browse files Browse the repository at this point in the history
* Add explicit list of potential extra columns
* Fix indentation error in 'return False' statement

Fixes #1556
  • Loading branch information
ewels committed Jan 27, 2022
1 parent 4e7dbb6 commit 9ace57a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

### Module updates

- **bbmap**
- Correctly handle adapter stats files with additional columns ([#1556](https://github.com/ewels/MultiQC/issues/1556))
- **bclconvert**
- Handle change in output format in v3.9.3 with new `Quality_Metrics.csv` file ([#1563](https://github.com/ewels/MultiQC/issues/1563))
- **bowtie**
Expand Down
4 changes: 2 additions & 2 deletions multiqc/modules/bbmap/bbmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ def parse_logs(self, file_type, root, s_name, fn, f, **kw):
else:
# It should be the table header. Verify:
if line != cols:
if line != cols + list(log_descr["extracols"].keys()):
if line != cols + list(log_descr.get("extracols", {}).keys()):
log.error("Table headers do not match those 'on file'. %s != %s", repr(line), repr(cols))
return False
return False
else:
if isinstance(log_descr["cols"], OrderedDict):
line = [value_type(value) for value_type, value in zip(log_descr["cols"].values(), line)]
Expand Down
4 changes: 4 additions & 0 deletions multiqc/modules/bbmap/bbmap_filetypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ def __getitem__(self, keys):
),
},
"cols": odict["Name":str, "Reads":int, "ReadsPct" : lambda v: float(v.strip("%"))],
"extracols": odict[
"Bases":int,
"BasesPct":float,
],
"plot_func": None, ## Plotting for 'stats' not implemented
"plot_params": {},
},
Expand Down

0 comments on commit 9ace57a

Please sign in to comment.