[med-svn] [Git][med-team/paleomix][upstream] New upstream version 1.3.7

Andreas Tille (@tille) gitlab at salsa.debian.org
Fri Aug 26 06:35:49 BST 2022



Andreas Tille pushed to branch upstream at Debian Med / paleomix


Commits:
34abe8a1 by Andreas Tille at 2022-08-26T07:33:12+02:00
New upstream version 1.3.7
- - - - -


12 changed files:

- CHANGES.md
- docs/installation.rst
- paleomix/__init__.py
- paleomix/common/argparse.py
- paleomix/nodegraph.py
- paleomix/nodes/commands.py
- paleomix/pipeline.py
- paleomix/pipelines/bam/mkfile.py
- paleomix/pipelines/bam/parts/lane.py
- paleomix/pipelines/bam/parts/summary.py
- paleomix/pipelines/bam/pipeline.py
- paleomix_environment.yaml


Changes:

=====================================
CHANGES.md
=====================================
@@ -1,5 +1,23 @@
 # Changelog
 
+## [1.3.7] - 2022-08-22
+
+#### Added
+  - Added example to BAM pipeline YAML template, showing how to increase the maximum
+    allowed Phred score for AdapterRemoval. This is needed due to the value being
+    capped at 41 by default, lower than the maximum observed in some modern data.
+
+#### Fixed
+  - Fixed regression in config file parsing, that would cause failure if no value
+    was specified for an option.
+  - Fixed error message not being printed correctly when attempting to use Phred+64
+    data with BWA mem/bwasw.
+  - Fixed regressions that prevented the use of "regions of interest" in the BAM
+    pipeline.
+  - Fixed failure when using `--list-output-files` and auxilary files were missing
+    or dependecies were unmet. Output files are now printed.
+
+
 ## [1.3.6] - 2021-11-28
 
 ### Added
@@ -768,6 +786,7 @@ the (partially) updated documentation now hosted on ReadTheDocs.
   - Switching to more traditional version-number tracking.
 
 
+[1.3.7]: https://github.com/MikkelSchubert/paleomix/compare/v1.3.6...v1.3.7
 [1.3.6]: https://github.com/MikkelSchubert/paleomix/compare/v1.3.5...v1.3.6
 [1.3.5]: https://github.com/MikkelSchubert/paleomix/compare/v1.3.4...v1.3.5
 [1.3.4]: https://github.com/MikkelSchubert/paleomix/compare/v1.3.3...v1.3.4


=====================================
docs/installation.rst
=====================================
@@ -17,13 +17,13 @@ In addition, some libraries used by PALEOMIX may require additional development
 
 Once all requirements have been installed, PALEOMIX may be installed using `pip`::
 
-    $ python3 -m pip install paleomix==1.3.6
+    $ python3 -m pip install paleomix==1.3.7
 
 To verify that the installation was carried out correctly, run the command `paleomix`::
 
     $ paleomix
     PALEOMIX - pipelines and tools for NGS data analyses
-    Version: v1.3.6
+    Version: v1.3.7
 
     ...
 
@@ -45,7 +45,7 @@ This installation method requires the `venv` module. On Debian based systems, th
 Once `venv` is installed, creation of a virtual environment and installation of PALEOMIX may be carried out as shown here::
 
     $ python3 -m venv venv
-    $ ./venv/bin/pip install paleomix==v1.3.6
+    $ ./venv/bin/pip install paleomix==v1.3.7
 
 Following successful completion of these commands, the `paleomix` executable will be accessible in the `./venv/bin/` folder. However, as this folder also contains a copy of Python itself, it is not recommended to add it to your `PATH`. Instead, simply link the `paleomix` executable to a folder in your `PATH`. This can be accomplished as follows::
 
@@ -78,7 +78,7 @@ To install `conda` and also set it up so it can use the `bioconda`_ bioinformati
 
 Next, run the following commands to download the conda environment template for this release of PALEOMIX and to create a new conda environment named `paleomix` using that template::
 
-    $ curl -fL https://github.com/MikkelSchubert/paleomix/releases/download/v1.3.6/paleomix_environment.yaml > paleomix_environment.yaml
+    $ curl -fL https://github.com/MikkelSchubert/paleomix/releases/download/v1.3.7/paleomix_environment.yaml > paleomix_environment.yaml
     $ conda env create -n paleomix -f paleomix_environment.yaml
 
 You can now activate the paleomix environment with::


=====================================
paleomix/__init__.py
=====================================
@@ -21,5 +21,5 @@
 # SOFTWARE.
 #
 
-__version_info__ = (1, 3, 6)
+__version_info__ = (1, 3, 7)
 __version__ = "%i.%i.%i" % __version_info__


=====================================
paleomix/common/argparse.py
=====================================
@@ -58,7 +58,7 @@ class ArgumentParser(configargparse.ArgumentParser):
 
     def convert_item_to_command_line_arg(self, action, key, value):
         # Ignore empty options from old config files
-        if action and value == "=":
+        if action and value in ("", "="):
             return []
 
         return super().convert_item_to_command_line_arg(action, key, value)


=====================================
paleomix/nodegraph.py
=====================================
@@ -103,7 +103,12 @@ class NodeGraph:
     NUMBER_OF_STATES = 6
     DONE, RUNNING, RUNABLE, QUEUED, OUTDATED, ERROR = range(NUMBER_OF_STATES)
 
-    def __init__(self, nodes, cache_factory=FileStatusCache):
+    def __init__(
+        self,
+        nodes,
+        allow_missing_files=False,
+        cache_factory=FileStatusCache,
+    ):
         self._cache_factory = cache_factory
         self._states = {}
         self._state_counts = [0] * self.NUMBER_OF_STATES
@@ -126,17 +131,19 @@ class NodeGraph:
 
         self._logger.info("Checking for auxiliary files")
         if not self._check_auxiliary_files(self._reverse_dependencies):
-            raise NodeGraphError(
-                "Please refer to the PALEOMIX installation instructions at "
-                "https://paleomix.readthedocs.io/en/stable/"
-            )
+            if not allow_missing_files:
+                raise NodeGraphError(
+                    "Please refer to the PALEOMIX installation instructions at "
+                    "https://paleomix.readthedocs.io/en/stable/"
+                )
 
         self._logger.info("Checking required software")
         if not self._check_version_requirements(self._reverse_dependencies):
-            raise NodeGraphError(
-                "Please refer to the PALEOMIX installation instructions at "
-                "https://paleomix.readthedocs.io/en/stable/"
-            )
+            if not allow_missing_files:
+                raise NodeGraphError(
+                    "Please refer to the PALEOMIX installation instructions at "
+                    "https://paleomix.readthedocs.io/en/stable/"
+                )
 
         self._logger.info("Determining states")
         self._refresh_states()


=====================================
paleomix/nodes/commands.py
=====================================
@@ -104,7 +104,8 @@ class DepthHistogramNode(CommandNode):
         if regions_file:
             builder.set_option("--regions-file", "%(IN_REGIONS)s")
             builder.set_kwargs(
-                IN_REGIONS=regions_file, TEMP_IN_INDEX=input_file + index_format
+                IN_REGIONS=regions_file,
+                IN_INDEX=input_file + index_format,
             )
 
         CommandNode.__init__(


=====================================
paleomix/pipeline.py
=====================================
@@ -218,7 +218,11 @@ class Pypeline:
 
     def list_output_files(self):
         cache = FileStatusCache()
-        nodegraph = NodeGraph(self._nodes, lambda: cache)
+        nodegraph = NodeGraph(
+            self._nodes,
+            allow_missing_files=True,
+            cache_factory=lambda: cache,
+        )
         output_files = {}
 
         def collect_output_files(node):


=====================================
paleomix/pipelines/bam/mkfile.py
=====================================
@@ -53,6 +53,9 @@ Options:
      --collapse: yes
      --trimns: yes
      --trimqualities: yes
+     # Increase the maximum Phred allowed for input FASTQs, as well as for merged bases
+     # when using --collapse (default = 41). This is needed for some modern FASTQs.
+#     --qualitymax: 42
 """
 
 _TEMPLATE_BAM_OPTIONS = """  # Settings for aligners supported by the pipeline


=====================================
paleomix/pipelines/bam/parts/lane.py
=====================================
@@ -209,7 +209,7 @@ class Lane:
             raise MakefileError(
                 "Mapping with BWA using the %r algorithm currently does not support "
                 "QualityOffsets other than 33; please convert your FASTQ if you wish "
-                "to proceed."
+                "to proceed." % (parameters["algorithm"],)
             )
 
         parameters = self._set_pe_input_files(parameters)


=====================================
paleomix/pipelines/bam/parts/summary.py
=====================================
@@ -112,8 +112,8 @@ class SummaryTableNode(Node):
             self._write_areas_of_interest(table, rois)
             table.write("#\n#\n")
 
-            for roi in rois.values():
-                genomes[roi["Label"]] = {"Size": roi["Size"]}
+            for key, roi in rois.items():
+                genomes[":".join(key)] = {"Size": roi["Size"]}
             self._write_tables(table, genomes)
 
     def _teardown(self, _config, temp):


=====================================
paleomix/pipelines/bam/pipeline.py
=====================================
@@ -31,6 +31,7 @@ import paleomix.resources
 import paleomix.yaml
 
 from paleomix.pipeline import Pypeline
+from paleomix.node import NodeError
 from paleomix.nodes.samtools import FastaIndexNode
 from paleomix.nodes.bwa import BWAIndexNode
 from paleomix.nodes.bowtie2 import Bowtie2IndexNode
@@ -206,10 +207,9 @@ def run(config, pipeline_variant):
         logger.info("Building BAM pipeline for %r", makefile["Filename"])
         try:
             nodes = pipeline_func(config, makefile)
-        except paleomix.node.NodeError as error:
-            logger.error(
-                "Error while building pipeline for %r:\n%s", makefile["Filename"], error
-            )
+        except (NodeError, MakefileError) as error:
+            logger.error("Error while building pipeline for %r", makefile["Filename"])
+            logger.error("%s", error)
             return 1
 
         pipeline.add_nodes(*nodes)


=====================================
paleomix_environment.yaml
=====================================
@@ -17,4 +17,4 @@ dependencies:
   - r-gam
   - r-inline
   - pip:
-    - paleomix==1.3.6
+      - paleomix==1.3.7



View it on GitLab: https://salsa.debian.org/med-team/paleomix/-/commit/34abe8a11ed0d190c24f6d649f69ae2d7c2d08fb

-- 
View it on GitLab: https://salsa.debian.org/med-team/paleomix/-/commit/34abe8a11ed0d190c24f6d649f69ae2d7c2d08fb
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220826/5716b9e3/attachment-0001.htm>


More information about the debian-med-commit mailing list