I would like to ask about the error (fatal error: exit code 1()) from running Bismark Meth Extractor (fig1). I have one run with input sample D3 that worked (fig2), but the subsequent runs with different input files had produced the error, so I tried using the same sample that used to work to test if it is a problem with other input files. It turned out that the run that had worked before produced the same error as other subsequent runs (fig3).Therefore, I am not sure what cause the problem and it would be great if you could help with this. Thank you so much.
The first item I am curious about is the tool version used for the comparisons. Same tool version? Different version? If you toggle to use the version that worked before, what happens? Maybe the latest version has some problem (we can investigate and report this!).
You can try to post more screenshots back from the result, or you are welcome to share your history back and we’ll be able to see those details. Thanks!
Thank you for looking at this issue. I used the same version of this tool for both runs (Galaxy Tool ID: toolshed.g2.bx.psu.edu/repos/bgruening/bismark/bismark_methylation_extractor/0.22.1). The runs that work was performed on Monday Dec 8th 17:43:43 and the one that did not (using exactly same inputs) was on Tuesday Dec 9th 15:39:59, so unlikely it is related to the problem inside the tool.
Nevertheless, I tried an older version (Galaxy Tool ID: toolshed.g2.bx.psu.edu/repos/bgruening/bismark/bismark_methylation_extractor/0.20.0) to see if anything changes, but these runs also returned the same error (image below)
Thanks for posting all of these details, running the extra test, and sharing the history @pannareeb – all very helpful!
Review
Reviewing the messages in the Tool Standard Output (stderr) shows the following message:
The IDs of Read 1 (LH00190:584:22GWM2LT4:1:1402:28538:25051_1:N:0:GTGAACCATC+ATAGGCAGGA) and Read 2 (LH00190:584:22GWM2LT4:1:2391:47571:11100_1:N:0:GTGAACCATC+ATAGGCAGGA) are not the same. This might be the result of sorting the paired-end SAM/BAM files by chromosomal position which is not compatible with correct methylation extraction. Please use an unsorted file instead or sort the file using ‘samtools sort -n’ (by read name). This may also occur using samtools merge as it does not guarantee the read order. To properly merge files please use ‘samtools merge -n’ or ‘samtools cat’.
How to find this – click into the box on the job Details page and it expands. These logs are mostly from the underlying tool.
Galaxy always sort BAMs by coordinate by default. When a tool expects the data to be sorted by the query name, you can create a qname_input_sorted.bam dataset as a pre-processing step.
The output from the upstream Bismark Mapper tool will already be in the correct format, however, moving that file around (Download → Upload) might trigger the coordinate sort!
I see that you Uploaded a unsorted.bam file to start with. Then this was coordinate sorted. Now, try sorting by name again to get everything set up in a way the Bismark Methyl Extractor tool can understand.
The message from the tool included some command line tips for doing this, and Samtools sort is in Galaxy too! I agree with that advice. Run the job like this:
Great, really glad that worked @pannareeb , and thank you confirming! I’m going to mark this as resolved – maybe our troubleshooting here will help someone else in the future!