# Retrieve information from .command.log and add as table

**URL:** <https://community.seqera.io/t/retrieve-information-from-command-log-and-add-as-table/352>\
**Category:** Ask for help\
**Tags:** multiqc\
**Created:** [December 19, 2023, 10:30am UTC](https://community.seqera.io/t/retrieve-information-from-command-log-and-add-as-table/352 "2023-12-19T10:30:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FriederikeHanssen](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/friederikehanssen/32/59_2.png) [@FriederikeHanssen](https://community.seqera.io/u/FriederikeHanssen)\
**Post date:** [December 19, 2023, 10:30am UTC](https://community.seqera.io/t/retrieve-information-from-command-log-and-add-as-table/352/1 "2023-12-19T10:30:24Z")

</div>

Hey!

I am using a tool not yet available as MultiQC module as far as I see (picard liftover). As far as I can tell, the tool does not write it’s own log file, but prints everything interesting directly. Nextflow captures this in the .command.log file (edit: managed to at least dump this into its own file to publish alongside the results). Is there a way I can fetch this info with MultiQC and display it as a table. Does anyone have an example flying around on how to do it?

---

<div class="post-metadata">

**Author:** ![ewels](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/ewels/32/1_2.png) [@ewels](https://community.seqera.io/u/ewels)\
**Post date:** [December 19, 2023, 11:14am UTC](https://community.seqera.io/t/retrieve-information-from-command-log-and-add-as-table/352/2 "2023-12-19T11:14:28Z")

</div>

I think that the safest way to do this is to capture the STDOUT to a dedicated file, rather than relying on `.command.out`. You can do this by redirecting it, eg.

```bash
picard [options] > mysample_picard_liftover.log

```

Once you have the file, it’s likely not super trivial to convert it into a table for a MultiQC report. Picard outputs are typically not in a standard format that you can pipe directly into [Custom Content](https://multiqc.info/docs/custom_content/) (eg. not a TSV file etc). So I think that your best bet is really to write proper MultiQC support for it (or creating an issue for it with some example outputs). The source code for the various Picard tool support in MultiQC is here:

> <https://github.com/MultiQC/MultiQC/tree/main/multiqc/modules/picard>
>
> //github.com/MultiQC/MultiQC/tree/main/multiqc/modules/picard

---

<div class="post-metadata">

**Author:** ![ewels](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/ewels/32/1_2.png) [@ewels](https://community.seqera.io/u/ewels)\
**Post date:** [December 19, 2023, 11:36am UTC](https://community.seqera.io/t/retrieve-information-from-command-log-and-add-as-table/352/3 "2023-12-19T11:36:16Z")

</div>

> <https://github.com/MultiQC/MultiQC/issues/2247>
>
> \### Name of the tool
> 
> picard liftover
> 
> \### Tool homepage
> 
> https://gatk.broadinst…itute.org/hc/en-us/articles/13832753098907-LiftoverVcf-Picard-
> 
> \### Tool description
> 
> The tool lifts variants over to different genome version. 
> 
> \### Tool output
> 
> I haven't found a way yet to print the important information to a file, but the tool prints several interesting information to the console, and it can be found i.e. in the .command.log file when running with nextflow:
> 
> \[liftover.command.log\](https://github.com/MultiQC/MultiQC/files/13714335/liftover.command.log)
> 
> 
> 
> \### Log filename pattern
> 
> na
> 
> \### Data suitable for MultiQC plot(s)
> 
> \_No response\_
> 
> \### Most interesting data for the General Stats table
> 
> \`\`\`
> LiftoverVcf Processed 24 variants.
> INFO 2023-12-19 10:04:40 LiftoverVcf 0 variants failed to liftover.
> INFO 2023-12-19 10:04:40 LiftoverVcf 0 variants lifted over but had mismatching reference alleles after lift over.
> INFO 2023-12-19 10:04:40 LiftoverVcf 0.0000% of variants were not successfully lifted over and written to the output.
> \`\`\`
> 
> \### Before submitting
> 
> \- \[X\] I have included example data (zipped, not pasted) that can be used to write the module.
