# Bismark Meth. Extractor not generating coverage files

**URL:** <https://help.galaxyproject.org/t/bismark-meth-extractor-not-generating-coverage-files/6125>\
**Category:** usegalaxy.eu support\
**Tags:** tool-install, bismark\_methylation\_extractor\
**Created:** [June 7, 2021, 1:28pm UTC](https://help.galaxyproject.org/t/bismark-meth-extractor-not-generating-coverage-files/6125 "2021-06-07T13:28:56Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lewis](https://avatars.discourse-cdn.com/v4/letter/l/e9bcb4/32.png) [@Lewis](https://help.galaxyproject.org/u/Lewis)\
**Post date:** [June 7, 2021, 1:28pm UTC](https://help.galaxyproject.org/t/bismark-meth-extractor-not-generating-coverage-files/6125/1 "2021-06-07T13:28:56Z")

</div>

Hello,  
I am currently trying to analyse some methylation sequencing data using Bismark. When I try to extract the methylation status using the Bismark Meth. Extractor, I am expecting to also get a .cov coverage file. However, this does not appear to be being generated.

The tool output gives the following:

Writing bedGraph to file: dataset\_e734b08e-b355-49c5-94cc-61ef7b831d1e.datbedGraph.gz.  
Also writing out a coverage file including counts methylated and unmethylated residues to file: dataset\_e734b08e-b355-49c5-94cc-61ef7b831d1e.datbismark.cov.gz

However, I do not see the cov.gz in the resulting result archive. Am I using an incorrect setting (I had asked it to give me the genome wide cytosine report) or is this something that it currently does not output?

Any help would be greatly appreicated!  
Many thanks,  
Lewis

---

<div class="post-metadata">

**Author:** ![David](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/david/32/7031_2.png) [@David](https://help.galaxyproject.org/u/David)\
**Post date:** [June 7, 2021, 2:10pm UTC](https://help.galaxyproject.org/t/bismark-meth-extractor-not-generating-coverage-files/6125/2 "2021-06-07T14:10:00Z")

</div>

Welcome @Lewis!

I think your cov file is supposed to be the

> **Methylation proportion report for each possible position in the read (Mbias Report)**
> 
> This report shows the methylation proportion across each possible position in the read (described in further detail in:Hansen et al., Genome Biology, 2012, 13:R83). The data for the M-bias plot is also written into a text file and is in the following format:

> read position | count methylated | count unmethylated | % methylation | total coverage

Can you check if this is in the output datasets?

---

<div class="post-metadata">

**Author:** ![Lewis](https://avatars.discourse-cdn.com/v4/letter/l/e9bcb4/32.png) [@Lewis](https://help.galaxyproject.org/u/Lewis)\
**Post date:** [June 7, 2021, 2:24pm UTC](https://help.galaxyproject.org/t/bismark-meth-extractor-not-generating-coverage-files/6125/3 "2021-06-07T14:24:52Z")

</div>

Hi David,

Many thanks for your reply! The M-bias report is not quite what I am after. This report is to check whether there is any bias in methylation across the read. As I did 150 PE sequencing, this outputs a file for each one of the 150 positions. What I am after is a coverage file that has counts (both methylated and unmethylated) and their genomic position. The methylation extractor should give this as a .cov file, but this doesn’t appear to be being saved. Here is a screenshot from the Bismark manual of what I am after:

 ![Untitled](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/0/0ec2c11aaff3ba584731f645bc423cda5a27b156.png)

Kind regards,  
Lewis

---

<div class="post-metadata">

**Author:** ![David](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/david/32/7031_2.png) [@David](https://help.galaxyproject.org/u/David)\
**Post date:** [June 7, 2021, 4:11pm UTC](https://help.galaxyproject.org/t/bismark-meth-extractor-not-generating-coverage-files/6125/4 "2021-06-07T16:11:08Z")

</div>

Ok, @Lewis ,

I have some guesses:

1. The \*cov.gz file declared at the output log is only created as a temp file in order to build other outputs;

> Writing bedGraph to file: dataset\_f5b173bc-5683-4e3a-aae9-bbfab0223a5b.datbedGraph.gz  
> Also writing out a coverage file including counts methylated and unmethylated residues to file: **dataset\_f5b173bc-5683-4e3a-aae9-bbfab0223a5b.datbismark.cov.gz**

(…)

> Output will be written into the directory: /data/dnb03/galaxy\_db/job\_working\_directory/022/607/22607745/tmp/tmp7xnxvb6j/  
> Summary of parameters for genome-wide cytosine report:
> 
> **Coverage infile: dataset\_f5b173bc-5683-4e3a-aae9-bbfab0223a5b.datbismark.cov.gz**  
> Output directory: \>/data/dnb03/galaxy\_db/job\_working\_directory/022/607/22607745/tmp/tmp7xnxvb6j/\<  
> Parent directory: \>/data/dnb03/galaxy\_db/job\_working\_directory/022/607/22607745/tmp/tmp7xnxvb6j/\<  
> Genome directory: \>/data/dnb03/galaxy\_db/job\_working\_directory/022/607/22607745/tmp/tmpeuc9ajoz/\<  
> CX context: yes  
> Genome coordinates used: 1-based (default)  
> GZIP compression: no  
> Split by chromosome: no  
> .

1. The coverage files are only output separately with the optional parameter `--bedgraph` ([(IV) Bismark methylation extractor](https://rawgit.com/FelixKrueger/Bismark/master/Docs/Bismark_User_Guide.html#iv-bismark-methylation-extractor)):

> Alternatively, the output of the methylation extractor can be transformed into a `bedGraph` and `coverage` file using the option `--bedGraph` (see also `--counts` ).;

- which I can’t see in the command line of my tests:

`Methylation extractor run with: 'bismark_methylation_extractor --no_header -o /data/dnb03/galaxy_db/job_working_directory/022/607/22607745/tmp/tmp7xnxvb6j --single-end --comprehensive --report --bedGraph --CX_context --cytosine_report --CX_context --genome_folder /data/dnb03/galaxy_db/job_working_directory/022/607/22607745/tmp/tmpeuc9ajoz /data/dnb03/galaxy_db/files/f/5/b/dataset_f5b173bc-5683-4e3a-aae9-bbfab0223a5b.dat'`

1. Previsously, this error was [solved](https://github.com/FelixKrueger/Bismark/issues/403#issuecomment-757111111) and related to another optional parameter, buffer size (`--buffer`), in standalone bismark\_methylation\_extractor v0.20.0; But I can’t test this now.

---

<div class="post-metadata">

**Author:** ![Lewis](https://avatars.discourse-cdn.com/v4/letter/l/e9bcb4/32.png) [@Lewis](https://help.galaxyproject.org/u/Lewis)\
**Post date:** [June 7, 2021, 7:00pm UTC](https://help.galaxyproject.org/t/bismark-meth-extractor-not-generating-coverage-files/6125/5 "2021-06-07T19:00:03Z")

</div>

Hi David,

I totally agree with you that it seems the .cov file is not being saved, and instead is being used only as a temporary file to generate the genome-wide cytosine coverage report. The --bedGraph option is definitely there in the command line code you copied above, so I don’t think that this is the issue. The bedgraph file (.datbedGraph.gz) is present in the results archive generated when asking for the genome-wide cytosine report, which is why I found it odd that the .cov file is not there as well. It would definitely be interesting to see if the --buffer option is the cause of this file not being present, however if it can’t be fixed then I think I’ll most likely have to find another way of running the bismark extractor! Many thanks for your help so far!

---

<div class="post-metadata">

**Author:** ![David](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/david/32/7031_2.png) [@David](https://help.galaxyproject.org/u/David)\
**Post date:** [June 7, 2021, 7:28pm UTC](https://help.galaxyproject.org/t/bismark-meth-extractor-not-generating-coverage-files/6125/6 "2021-06-07T19:28:01Z")

</div>

Sorry! I showed the text from the log file, but I meant the text in the `Commmand Line` field, from the `Job Information`

> python ‘/opt/galaxy/shed\_tools/toolshed.g2.bx.psu.edu/repos/bgruening/bismark/ff6ee551b153/bismark/bismark\_methylation\_extractor.py’ --multicore “${GALAXY\_SLOTS:-4}” --infile ‘/data/dnb03/galaxy\_db/files/f/5/b/dataset\_f5b173bc-5683-4e3a-aae9-bbfab0223a5b.dat’ --single-end --splitting\_report ‘/data/dnb03/galaxy\_db/job\_working\_directory/022/607/22607745/outputs/galaxy\_dataset\_d5147783-6aac-4b1f-ab32-0634ac21f788.dat’ --mbias\_report ‘/data/dnb03/galaxy\_db/job\_working\_directory/022/607/22607745/outputs/galaxy\_dataset\_9855a442-64fa-4f61-9305-d4f581661ad8.dat’ --cytosine\_report ‘/data/dnb03/galaxy\_db/job\_working\_directory/022/607/22607745/outputs/galaxy\_dataset\_5a7de963-e281-40a2-af49-df099dde7ebb.dat’ --genome\_file ‘/data/db/data\_managers/h7n7\_360722/seq/h7n7\_360722.fa’ --cx\_context --comprehensive --compress  
> ‘/data/dnb03/galaxy\_db/job\_working\_directory/022/607/22607745/outputs/galaxy\_dataset\_d1e0feca-7641-4b02-84e6-7dff0081a634.dat’ --log\_report ‘/data/dnb03/galaxy\_db/job\_working\_directory/022/607/22607745/outputs/galaxy\_dataset\_61ded233-440e-4bf5-81b8-9214fa10b5d8.dat’

---

<div class="post-metadata">

**Author:** ![Lewis](https://avatars.discourse-cdn.com/v4/letter/l/e9bcb4/32.png) [@Lewis](https://help.galaxyproject.org/u/Lewis)\
**Post date:** [June 7, 2021, 7:34pm UTC](https://help.galaxyproject.org/t/bismark-meth-extractor-not-generating-coverage-files/6125/7 "2021-06-07T19:34:57Z")

</div>

Ah I see, that definitely could be it! Is there any way of testing this theory out? I have no idea who to contact to see if the methylation extractor could be changed or modified on Galaxy to be able to produce the .cov file, or even if this is possible!

---

<div class="post-metadata">

**Author:** ![David](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/david/32/7031_2.png) [@David](https://help.galaxyproject.org/u/David)\
**Post date:** [June 7, 2021, 8:08pm UTC](https://help.galaxyproject.org/t/bismark-meth-extractor-not-generating-coverage-files/6125/8 "2021-06-07T20:08:08Z")

</div>

It can be updated by someone from Galaxy team, but, unfortunately, they are very busy.

I can try to run Bismark standalone and test --buffer, but I can’t say when I’ll be able to do it.

Another option is try the `bismark2bedGraph` script mentioned in the manual, which may be also quicker.

---

<div class="post-metadata">

**Author:** ![gallardoalba](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/gallardoalba/32/1903_2.png) [@gallardoalba](https://help.galaxyproject.org/u/gallardoalba)\
**Post date:** [June 7, 2021, 8:43pm UTC](https://help.galaxyproject.org/t/bismark-meth-extractor-not-generating-coverage-files/6125/9 "2021-06-07T20:43:18Z")

</div>

Hi @Lewis,  
I have updated Bismark extractor in order to provide the coverage file: [Bismark methylation extractor: include coverage output by gallardoalba · Pull Request #1131 · bgruening/galaxytools · GitHub](https://github.com/bgruening/galaxytools/pull/1131). It will be available soon.

However, I recommend you to use [Methyldakel](https://usegalaxy.eu/root?tool_id=toolshed.g2.bx.psu.edu/repos/bgruening/pileometh/pileometh/0.5.2+galaxy0) instead of Bismark.

Regards

---

<div class="post-metadata">

**Author:** ![Lewis](https://avatars.discourse-cdn.com/v4/letter/l/e9bcb4/32.png) [@Lewis](https://help.galaxyproject.org/u/Lewis)\
**Post date:** [June 8, 2021, 7:29am UTC](https://help.galaxyproject.org/t/bismark-meth-extractor-not-generating-coverage-files/6125/10 "2021-06-08T07:29:14Z")

</div>

@David and @gallardoalba many thanks for all of your help and input, and for updating the extractor to provide the coverage file. I’ll make sure to look into Methyldakel if you recommend this as a better way of getting the methylation statistics.

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [January 22, 2025, 7:31pm UTC](https://help.galaxyproject.org/t/bismark-meth-extractor-not-generating-coverage-files/6125/12 "2025-01-22T19:31:06Z")

</div>

Continued at → [Bismark Meth. Extractor version to generate coverage file](https://help.galaxyproject.org/t/bismark-meth-extractor-version-to-generate-coverage-file/14509)

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [January 22, 2025, 7:31pm UTC](https://help.galaxyproject.org/t/bismark-meth-extractor-not-generating-coverage-files/6125/13 "2025-01-22T19:31:56Z")

</div>


