miRTop / mirtop

command lines tool to annotate miRNAs with a standard mirna/isomir naming
https://mirtop.readthedocs.org
MIT License
17 stars 24 forks source link

`mirtop gff` produces different md5sum for the same input files #83

Closed atrigila closed 2 months ago

atrigila commented 2 months ago

Expected behavior and actual behavior.

When running mirtop gff with the same input files, the mirtop.gff file that is produced may have different md5sum. This is because the order of the comma-separated elements in the "Variant" section may change.

This has been observed in the nf-core module of mirtop/gff, which required that tests had to check for the presence of a string instead of md5sums. The same was observed with mirtop/counts.

Steps to reproduce the problem.

You can reproduce this by running mirtop gff several times and using the following inputs. You can also do it with nf-test.

  1. In the nf-core/modules, run the command nf-test test [path to mirtop/gff nf-test] --profile docker --debug --verbose. Check the output file mirtop.gff in the corresponding work directory.
  2. Select one or several lines from the mirtop.gff output.
  3. Include those lines in the nf-test snapshot section: such as file(process.out.mirtop_gff[0][1]).readLines().findAll { it.contains("YOUR-MIRTOP-GFF-LINE-HERE") },
  4. Run the command nf-core modules test mirtop/gff or nf-test several times to see that the tests do not match the snapshot as the md5sums change and is not stable.
lpantano commented 2 months ago

thank you, that is not expected indeed. I am not sure now where to look but thank you for the input files.

lpantano commented 2 months ago

@atrigila the new version is up: https://github.com/bioconda/bioconda-recipes/pull/50710, but they removed dependencies because there was a conflict that I am try to figure out. When preparing the new docker containers, dependencies needs to be added, maybe with the new seqera containers is easy?

atrigila commented 2 months ago

I will test it soon and let you know what happens.

lpantano commented 2 months ago

This should be good:

lpantano commented 2 months ago

forgot: - bioconda::samtools=1.21

atrigila commented 2 months ago

In the mirtop/gff example, there are 2 gff outputs produced:

image

atrigila commented 2 months ago

I'll check the dependencies

atrigila commented 2 months ago
channels:
  - conda-forge
  - bioconda
dependencies:
  - "bioconda::mirtop=0.4.27"
  - "bioconda::samtools=1.21"
  - "conda-forge::python=3.11"
  - "conda-forge::biopython=1.83"
  - "bioconda::pysam=0.22.1"
  - "bioconda::pybedtools=0.10.0"
  - "conda-forge::pandas=2.2.2"
lpantano commented 2 months ago

mm, ok, I couldn't get differences. Maybe I need to run more than 3 times...does it happen to you all the time?

atrigila commented 2 months ago

Now with mirtop=0.4.28, it works! Thank you!!