[med-svn] [Git][med-team/python-pauvre][upstream] New upstream version 0.2.2

Andreas Tille gitlab at salsa.debian.org
Thu Jun 11 21:41:24 BST 2020



Andreas Tille pushed to branch upstream at Debian Med / python-pauvre


Commits:
f59ed2eb by Andreas Tille at 2020-06-11T22:36:38+02:00
New upstream version 0.2.2
- - - - -


5 changed files:

- PKG-INFO
- README.md
- pauvre.egg-info/PKG-INFO
- pauvre/custommargin.py
- pauvre/version.py


Changes:

=====================================
PKG-INFO
=====================================
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: pauvre
-Version: 0.2.1
+Version: 0.2.2
 Summary: Tools for plotting Oxford Nanopore and other long-read data.
 Home-page: https://github.com/conchoecia/pauvre
 Author: Darrin Schultz


=====================================
README.md
=====================================
@@ -1,12 +1,39 @@
 [![travis-ci](https://travis-ci.org/conchoecia/pauvre.svg?branch=master)](https://travis-ci.org/conchoecia/pauvre) [![DOI](https://zenodo.org/badge/112774670.svg)](https://zenodo.org/badge/latestdoi/112774670)
 
+## <a name="started"></a>Getting Started
 
-## pauvre: a plotting package designed for nanopore and PacBio long reads
+```
+pauvre custommargin -i custom.tsv --ycol length --xcol qual # Custom tsv input
+```
+
+## Table of Contents
+
+- [Getting Started](#started)
+- [Users' Guide](#uguide)
+- [Installation](#installation)
+  - [Requirements](#reqs)
+  - [Install Instructions](#install)
+- [Usage](#usage)
+  - [pauvre stats](#stats)
+  - [pauvre marginplot](#marginplot)
+    - [Basic Usage](#marginbasic)
+    - [Plot Adjustments](#marginadjustments)
+    - [Specialized Options](#marginspecialized)
+- [Contributors](#contributors)
+
+## <a name="uguide"></a>Users' Guide
+
+Pauvre is a plotting package originally designed to help QC the length and
+quality distribution of Oxford Nanopore or PacBio reads. The main outputs
+are marginplots.  Now, `pauvre` also hosts other additional data plotting
+scripts.
 
-This package currently hosts four scripts for plotting and/or printing stats.
+This package currently hosts five scripts for plotting and/or printing stats.
 
 - `pauvre marginplot`
   - takes a fastq file as input and outputs a marginal histogram with a heatmap.
+- `pauvre custommargin`
+  - takes a tsv as input and outputs a marginal histogram with custom columns of your choice.
 - `pauvre stats`
   - Takes a fastq file as input and prints out a table of stats, including how many basepairs/reads there are for a length/mean quality cutoff.
   - This is also automagically called when using `pauvre marginplot`
@@ -24,7 +51,10 @@ This package currently hosts four scripts for plotting and/or printing stats.
     genomes with the fewest crossings-over. Input is one `.gff` file
     per circular genome and one directory of gene alignments.
 
-# Requirements
+
+## <a name="installation"></a>Installation
+
+### <a name="reqs"></a>Requirements
 
 - You must have the following installed on your system to install this software:
   - python 3.x
@@ -33,8 +63,7 @@ This package currently hosts four scripts for plotting and/or printing stats.
   - pandas
   - pillow
 
-# Installation
-
+### <a name="install">Install Instructions
 - Instructions to install on your mac or linux system. Not sure on
   Windows! Make sure *python 3* is the active environment before
   installing.
@@ -44,9 +73,9 @@ This package currently hosts four scripts for plotting and/or printing stats.
 - Or, install with pip
   - `pip3 install pauvre`
 
-# Usage
+## <a name="usage"><a/>Usage
 
-## `stats`
+### <a name="stats"></a>`stats`
   - generate basic statistics about the fastq file. For example, if I
     want to know the number of bases and reads with AT LEAST a PHRED
     score of 5 and AT LEAST a read length of 500, run the program as below
@@ -78,9 +107,9 @@ minLen    Q0   Q5  Q10  Q15  Q17.5  Q20  Q21.5  Q25  Q25.5  Q30
  et cetera...
 ```
 
-##  `marginplot`
+###  <a name="marginplot"></a>`marginplot`
 
-### Basic usage
+#### <a name="marginbasic"></a>Basic Usage
 - automatically calls `pauvre stats` for each fastq file
 - Make the default plot showing the 99th percentile of longest reads
   - `pauvre marginplot --fastq miniDSMN15.fastq`
@@ -90,28 +119,27 @@ minLen    Q0   Q5  Q10  Q15  Q17.5  Q20  Q21.5  Q25  Q25.5  Q30
   - `pauvre marginplot --maxlen 4000 --maxqual 25 --lengthbin 50 --fileform pdf png --qualbin 0.5 --fastq miniDSMN15.fastq`
   - ![example1](files/miniDSMN15.png)
 
-### Filter reads and adjust viewing window
+#### <a name="marginadjustments"></a>Plot Adjustments
+
 - Filter out reads with a mean quality less than 5, and a length
   less than 800. Zoom in to plot only mean quality of at least 4 and
   read length at least 500bp.
   - `pauvre marginplot -f miniDSMN15.fastq --filt_minqual 5 --filt_minlen 800 -y --plot_minlen 500 --plot_minqual 4`
   - ![test4](files/test4.png)
 
-### Specialized Options
+#### <a name="marginspecialized"></a>Specialized Options
 
 - Plot ONT 1D data with a large tail
   - `pauvre marginplot --maxlen 100000 --maxqual 15 --lengthbin 500  <myfile>.fastq`
 - Get more resolution on lengths
   - `pauvre marginplot --maxlen 100000 --lengthbin 5  <myfile>.fastq`
 
-### Transparency
-
 - Turn off transparency if you just want a white background
   - `pauvre marginplot --transparent False <myfile>.fastq`
   - Note: transparency is the default behavior
     - ![transparency](files/transparency.001.jpeg)
 
-# Contributors
+## <a name="contributors"></a>Contributors
 
 @conchoecia (Darrin Schultz)
 @mebbert (Mark Ebbert)


=====================================
pauvre.egg-info/PKG-INFO
=====================================
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: pauvre
-Version: 0.2.1
+Version: 0.2.2
 Summary: Tools for plotting Oxford Nanopore and other long-read data.
 Home-page: https://github.com/conchoecia/pauvre
 Author: Darrin Schultz


=====================================
pauvre/custommargin.py
=====================================
@@ -30,6 +30,7 @@ import pandas as pd
 import os.path as opath
 from sys import stderr
 from pauvre.functions import print_images
+from pauvre.marginplot import generate_panel
 from pauvre.stats import stats
 import pauvre.rcparams as rc
 import sys
@@ -38,44 +39,6 @@ import logging
 # logging
 logger = logging.getLogger('pauvre')
 
-
-def generate_panel(panel_left, panel_bottom, panel_width, panel_height,
-                   axis_tick_param='both', which_tick_param='both',
-                   bottom_tick_param='on', label_bottom_tick_param='on',
-                   left_tick_param='on', label_left_tick_param='on',
-                   right_tick_param='off', label_right_tick_param='off',
-                   top_tick_param='off', label_top_tick_param='off'):
-    """
-        Setting default panel tick parameters. Some of these are the defaults
-        for matplotlib anyway, but specifying them for readability. Here are
-        options and defaults for the parameters used below:
-
-        axis : {'x', 'y', 'both'}; which axis to modify; default = 'both'
-        which : {'major', 'minor', 'both'}; which ticks to modify;
-                default = 'major'
-        bottom, top, left, right : bool or {'on', 'off'}; ticks on or off;
-        labelbottom, labeltop, labelleft, labelright : bool or {'on', 'off'}
-     """
-
-    # create the panel
-    panel_rectangle = [panel_left, panel_bottom, panel_width, panel_height]
-    panel = plt.axes(panel_rectangle)
-
-    # Set tick parameters
-    panel.tick_params(axis=axis_tick_param,
-                      which=which_tick_param,
-                      bottom=bottom_tick_param,
-                      labelbottom=label_bottom_tick_param,
-                      left=left_tick_param,
-                      labelleft=label_left_tick_param,
-                      right=right_tick_param,
-                      labelright=label_right_tick_param,
-                      top=top_tick_param,
-                      labeltop=label_top_tick_param)
-
-    return panel
-
-
 def _generate_histogram_bin_patches(panel, bins, bin_values, horizontal=True):
     """This helper method generates the histogram that is added to the panel.
 
@@ -271,19 +234,19 @@ def custommargin(df, **kwargs):
     print(" - Setting panel options.", file = sys.stderr)
     if kwargs["Y_AXES"]:
         y_bottom_spine = True
-        y_bottom_tick = 'on'
-        y_bottom_label = 'on'
+        y_bottom_tick = True
+        y_bottom_label = True
         x_left_spine = True
-        x_left_tick = 'on'
-        x_left_label = 'on'
+        x_left_tick = True
+        x_left_label = True
         x_y_label = 'Count'
     else:
         y_bottom_spine = False
-        y_bottom_tick = 'off'
-        y_bottom_label = 'off'
+        y_bottom_tick = False
+        y_bottom_label = False
         x_left_spine = False
-        x_left_tick = 'off'
-        x_left_label = 'off'
+        x_left_tick = False
+        x_left_label = False
         x_y_label = None
 
     panels = []
@@ -336,12 +299,12 @@ def custommargin(df, **kwargs):
     legend_panel_height = heat_map_panel_height / fig_height
     legend_panel = generate_panel(legend_panel_left, legend_panel_bottom,
                                   legend_panel_width, legend_panel_height,
-                                  bottom_tick_param='off',
-                                  label_bottom_tick_param='off',
-                                  left_tick_param='off',
-                                  label_left_tick_param='off',
-                                  right_tick_param='on',
-                                  label_right_tick_param='on')
+                                  bottom_tick_param=False,
+                                  label_bottom_tick_param=False,
+                                  left_tick_param=False,
+                                  label_left_tick_param=False,
+                                  right_tick_param=True,
+                                  label_right_tick_param=True)
     panels.append(legend_panel)
 
     #


=====================================
pauvre/version.py
=====================================
@@ -1,4 +1,4 @@
 # -*- coding: utf-8 -*-
 
-__version__ = "0.2.1"
+__version__ = "0.2.2"
 



View it on GitLab: https://salsa.debian.org/med-team/python-pauvre/-/commit/f59ed2eb09a7ba2ccf27880a3470a7c275c79742

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-pauvre/-/commit/f59ed2eb09a7ba2ccf27880a3470a7c275c79742
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/20200611/26f10301/attachment-0001.html>


More information about the debian-med-commit mailing list