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

'xcats' positional argument error in coverage_by_chrom #197

Open
laramiemckenna opened this issue Dec 19, 2023 · 4 comments
Open

'xcats' positional argument error in coverage_by_chrom #197

laramiemckenna opened this issue Dec 19, 2023 · 4 comments

Comments

@laramiemckenna
Copy link

Hi there, I recently came across pairtools and I am super excited to start implementing it in our workflows. I tried to visualize the stats file via multiqc, but encountered this error. Do you have any thoughts as to what might be contributing to this? If it is helpful, I've attached the mc3_hap1_pairtools.stats file.

mc3_hap1_pairtools.stats.txt

If it would be better to share this on https://github.com/open2c/MultiQC, let me know.

  /// MultiQC 🔍 | v1.12.dev0

|           multiqc | MultiQC Version v1.19 now available!
|           multiqc | Search path : /cluster/home/lasmith/mc3_hap1_pairtools.stats
|         searching | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 1/1  
|         pairtools | parsing .stats file: mc3_hap1_pairtools.stats
|         pairtools | Found 1 reports
╭─────────────────────────────────────────────────────── Oops! The 'pairtools' MultiQC module broke... ────────────────────────────────────────────────────────╮
│ Please copy this log and report it at https://github.com/ewels/MultiQC/issues                                                                                │
│ Please attach a file that triggers the error. The last file found was: mc3_hap1_pairtools.stats                                                              │
│                                                                                                                                                              │
│ Traceback (most recent call last):                                                                                                                           │
│   File "/cluster/home/lasmith/miniforge3/envs/multiqc_pt/lib/python3.6/site-packages/multiqc/multiqc.py", line 651, in run                                   │
│     output = mod()                                                                                                                                           │
│   File "/cluster/home/lasmith/miniforge3/envs/multiqc_pt/lib/python3.6/site-packages/multiqc/modules/pairtools/pairtools.py", line 187, in __init__          │
│     plot=self.coverage_by_chrom(),                                                                                                                           │
│   File "/cluster/home/lasmith/miniforge3/envs/multiqc_pt/lib/python3.6/site-packages/multiqc/modules/pairtools/pairtools.py", line 444, in coverage_by_chrom │
│     return heatmap.plot([])                                                                                                                                  │
│ TypeError: plot() missing 1 required positional argument: 'xcats'                                                                                            │
│                                                                                                                                                              │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|           multiqc | No analysis results found. Cleaning up..
|           multiqc | MultiQC complete
@golobor
Copy link
Member

golobor commented Dec 20, 2023

@sergpolly , could we ask you for your help? :)

@sergpolly
Copy link
Member

HI @laramiemckenna ,
pairtools module of multiqc hasn't been updated for some time. I apologize for its state ! It is supposed to make it to the main multiqc repository eventually ...

That being said it typically runs without many issues, so let's try to investigate:

  • how did you install it in the first place ? I think we ended up removing coverage_by_chrom step for simplicity - so the fact that error is about that suggest to me that you're running an older version ...
  • There is a nice little write up on how to best use pairtools-multiqc here https://pairtools.readthedocs.io/en/latest/stats.html#interactive-visualization-of-stats-with-multiqc - could you possibly try installing it this way preferably in an isolated environment ?
  • your .stats file seems absolutely fine

@laramiemckenna
Copy link
Author

Hi @sergpolly and @golobor ,

Thank you both for the quick response!

I installed it based on the write-up you shared in your comment using pip install --upgrade --force-reinstall git+https://github.com/open2c/MultiQC.git in an isolated environment with Python 3.6 as the base.

However, I was able to get it to work, but only in a very particular context that I thought you might want to know about:

Yesterday, I was excited to see the results from the .stats output of pairtools parse2 and so I attempted to run multiqc . and, alternatively, multiqc mc3_hap1_pairtools.stats on it before pairtools dedup had finished running and produced its own .stats file.

Earlier today, after pairtools dedup had completed, I went to troubleshoot it some more and it worked perfectly with multiqc .. Some more investigating revealed that both .stats files were required for multiqc to produce a report. If I moved either .stats file to the parent directory, then I would get the error I shared above.

Are both .stats files required for multiqc to work?

@jolbi
Copy link

jolbi commented Feb 16, 2024

Hi,

I am facing a similar issue. Multiqc does not find any compatible file in the directory with stats file. I only have the stats file of pairtools dedup step, so based on laramiemckenna comment it seems this might be the problem.

Do I need stats file from pairtools parse step also?
Is it possible to produce the stats file for pairtools parse step without rerunning it (my mapping pipeline runs for 2 days on 100 threads and I have a few of those and no intermediate bams...)?

I Installed mutliqc from the fork provided in the docs (v1.21.dev0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants