AmpliconSuite / AmpliconSuite-pipeline

A quickstart tool for AmpliconArchitect. Performs all preliminary steps (alignment, CNV calling, seed interval detection) required prior to running AmpliconArchitect. Previously called PrepareAA.
Other
53 stars 28 forks source link

There are some small bugs in singularity running scripts #54

Closed panxiaoguang closed 3 months ago

panxiaoguang commented 6 months ago
  1. If the singularity version number is a strange number like "singularity-ce version 3.11.5-1.el7", then the original function test_singularity_version will get a singularity_version like "3.11.5-1.el7", but the 5-1 is impossible to translate into int64 from a string. So I think it's a good idea to use packaging.version instead.
  2. If users get their singularity image according to your recommended command:singularity pull library://jluebeck/ampliconsuite-pipeline/ampliconsuite-pipeline, then the file name they get will be "ampliconsuite-pipeline-latest.sif". So I think it's a good idea to modify the codes for checking singularity images to make them more robust.
jluebeck commented 6 months ago

Hi, thanks much for making this PR!

I agree the 'glob' enhancement is helpful!

Is the packaging library default with python? I believe it is not. I do not want to add more dependencies if I can avoid it. I did not realize the version string could be messy for the patch version. Since it is 3.6 or higher that is needed, I suggest modifying the PR to have similar functionality to the original code, but do not check the patch version (it is irrelevant since it needs anything over 3.6).

major, minor = map(int, singularity_version.split('.')[0:2])
assert (major, minor) >= (3, 6),'Singularity version {singularity_version} is not supported. Please upgrade to version 3.6.0 or higher.'

If this simple change still does not work for you, then please let me know and we can add packaging as a dependency to installation.

jluebeck commented 3 months ago

Issues addressed in AmpliconSuite-pipeline v1.3.3