Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nanostat - ignores some output styles #1547

Closed
ceolder opened this issue Sep 10, 2021 · 6 comments
Closed

Nanostat - ignores some output styles #1547

ceolder opened this issue Sep 10, 2021 · 6 comments
Labels
bug: module Bug in a MultiQC module

Comments

@ceolder
Copy link

ceolder commented Sep 10, 2021

Description of bug

Hi, first thank you for adding a module for nanostat output!
I ran nanostat on several files and am now attemping to run multiqc and running into the issue "No analysis results found. Cleaning up..."
Version 1.11
Command I'm running:
multiqc NanoStat/*.txt -n NanoStat_multiqc --m nanostat

I have tried without the *.txt (only the output txt files are in this directory) and the -m nanostat, but adding those on in case.

I've attached two files of the 32 that I am trying to use multiqc on.

I have looked at the search patterns specifically for the NanoStat module. My files were generated using the default parameters for NanoStat (version 1.5.0) and I checked to see if there's any parameters I could mess with to change the output and there are not. The search parameters say it should have 20 lines, but my output has 27 and while it does not start with the text listed under contents "Number, percentage ...", they are in my files on line 10. So I'm not sure if I'm supposed to modify the resulting files to be accessible for MultiQC?

File that triggers the error

10X_Pond1_1525_filt.txt
10X_Pond1_1492_filt.txt

MultiQC Error log

multiqc NanoStat/*.txt -n NanoStat_multiqc -m nanostat

  /// ;id=61841;https://multiqc.infoMultiQC;;  | v1.11

|           multiqc | Only using modules: nanostat
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/10X_Pond1_1492_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/10X_Pond1_1525_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/10X_Pond2_1492_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/10X_Pond2_1525_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/10X_Pond3_1492_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/10X_Pond3_1525_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/10X_Pond4_1492_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/10X_Pond4_1525_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/10X_Pond5_1492_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/10X_Pond5_1525_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/10X_Pond6_1492_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/10X_Pond6_1525_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/10X_Pond7_1492_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/10X_Pond7_1525_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/10X_Pond8_1492_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/10X_Pond8_1525_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/35X_Pond1_1492_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/35X_Pond1_1525_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/35X_Pond2_1492_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/35X_Pond2_1525_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/35X_Pond3_1492_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/35X_Pond3_1525_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/35X_Pond4_1492_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/35X_Pond4_1525_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/35X_Pond5_1492_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/35X_Pond5_1525_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/35X_Pond6_1492_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/35X_Pond6_1525_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/35X_Pond7_1492_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/35X_Pond7_1525_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/35X_Pond8_1492_filt.txt
|           multiqc | Search path : /home/caitlin/OttPonds/NanoStat/35X_Pond8_1525_filt.txt
|         searching | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 32/32
|           multiqc | No analysis results found. Cleaning up..
|           multiqc | MultiQC complete
@sherryxuePKU
Copy link

I've encountered the same problem.

@MillironX
Copy link
Contributor

Same problem here.

  • MultiQC v1.11 (conda)
  • Fedora 34

Example file: f479_nanostat.log

@ewels
Copy link
Member

ewels commented Nov 15, 2021

Right, so I tested your file @MillironX and the verbose log (-v) shows that it's being ignored by this code:

https://github.com/ewels/MultiQC/blob/a259b0890a6e0706a4440b1438a25e21cb3b6962/multiqc/modules/nanostat/nanostat.py#L108-L116

The file indeed does not contain either of these strings. All of the outputs that we have in the test data repo do though.

Presumably this is another flavour of of Nanostat output. The module needs updating to handle this style.

The search parameters say it should have 20 lines,

Right, this is a little confusing @ceolder - the search parameters say that the content string that it's looking for should be within the first 20 lines. Not that the file itself should have no more than 20 lines. (I had to check my own docs to clear this one up for myself..!)

@ewels ewels added the bug: module Bug in a MultiQC module label Nov 15, 2021
@ewels ewels changed the title No analysis results found - nanostat module Nanostat - ignores some output styles Nov 15, 2021
ewels added a commit to MultiQC/test-data that referenced this issue Nov 15, 2021
@MillironX
Copy link
Contributor

Hi @ewels, I've been thinking about why there is such a divergence in output styles, and I think I figured it out. NanoStat allows four different types of input

  1. fastq
  2. fasta
  3. sequencing_summary
  4. bam

My original log came from running NanoStat on a fastq, and I assume @ceolder's logs came from fastq analysis as well. As an experiment, I ran NanoStat on the same sample as an alignment and as a fasta (I don't have the sequencing summary file), and got the following logs:

The aligned analysis was found by MultiQC, but the fasta analysis was not.

I noticed that the fasta log has the least information (and also doesn't have the identifier string), so I propose the NanoStat module should be refactored in one of two ways:

  1. Target the fasta NanoStat output as the lowest common denominator, only adding quality metrics if available
  2. Target the fastq NanoStat (next lowest common log), and add a note to the documentation that the module is incompatible with NanoStat fasta logs

@ceolder
Copy link
Author

ceolder commented Nov 19, 2021

@ewels Thank you for spending some time looking into this and explaining the issue.
@MillironX is correct, my logs also came from fastq files.

@ewels
Copy link
Member

ewels commented Nov 20, 2021

Sounds good, thanks both - and thanks for the tests and example files @MillironX. Let's go for option 1, get the module to recognise everything and plot what it can.

If you fancy making a pull request, it would be nice to reorganise the test data in ewels/MultiQC_TestData into subfolders based on what it ran on so that this is clear for the future. Then of course the updates to the module. Otherwise I'll get to it when I can 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: module Bug in a MultiQC module
Projects
None yet
Development

No branches or pull requests

4 participants