[med-svn] [Git][med-team/umis][master] 9 commits: Fix watchfile to detect new versions on github

Andreas Tille (@tille) gitlab at salsa.debian.org
Tue Oct 12 08:18:04 BST 2021



Andreas Tille pushed to branch master at Debian Med / umis


Commits:
f6634139 by Andreas Tille at 2021-10-12T09:00:13+02:00
Fix watchfile to detect new versions on github

- - - - -
dd42ef2b by Andreas Tille at 2021-10-12T09:00:16+02:00
New upstream version 1.0.8
- - - - -
1acaec3b by Andreas Tille at 2021-10-12T09:00:16+02:00
routine-update: New upstream version

- - - - -
efb26b83 by Andreas Tille at 2021-10-12T09:00:18+02:00
Update upstream source from tag 'upstream/1.0.8'

Update to upstream version '1.0.8'
with Debian dir 00cfc35c5b964cfbacf182fffd379d01471a0ce0
- - - - -
37d27f82 by Andreas Tille at 2021-10-12T09:00:18+02:00
routine-update: Standards-Version: 4.6.0

- - - - -
b64a40f4 by Andreas Tille at 2021-10-12T09:00:18+02:00
routine-update: debhelper-compat 13

- - - - -
0152f9ca by Andreas Tille at 2021-10-12T09:00:22+02:00
Update renamed lintian tag names in lintian overrides.

Changes-By: lintian-brush
Fixes: lintian: renamed-tag
See-also: https://lintian.debian.org/tags/renamed-tag.html

- - - - -
a04d036c by Andreas Tille at 2021-10-12T09:00:26+02:00
Apply multi-arch hints.
+ umis-examples: Add Multi-Arch: foreign.

Changes-By: apply-multiarch-hints

- - - - -
df622ce3 by Andreas Tille at 2021-10-12T09:05:57+02:00
Upload to unstable

- - - - -


7 changed files:

- HISTORY.md
- debian/changelog
- debian/control
- debian/umis-examples.lintian-overrides
- debian/watch
- setup.py
- umis/umis.py


Changes:

=====================================
HISTORY.md
=====================================
@@ -1,3 +1,6 @@
+## 1.0.8
+- Add support for dual UMI indexes. Thanks @lbeltrame!
+
 ## 1.0.7
 - Ensure headers are not written when writing out a Series, to make us compatible with pandas > 0.24.
 - Fix for deprecated .ix call, .loc is the new replacement. Thanks to @naumenko-sa.


=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+umis (1.0.8-1) unstable; urgency=medium
+
+  * Fix watchfile to detect new versions on github
+  * New upstream version
+  * Standards-Version: 4.6.0 (routine-update)
+  * debhelper-compat 13 (routine-update)
+  * Update renamed lintian tag names in lintian overrides.
+  * Apply multi-arch hints.
+    + umis-examples: Add Multi-Arch: foreign.
+
+ -- Andreas Tille <tille at debian.org>  Tue, 12 Oct 2021 09:04:50 +0200
+
 umis (1.0.7-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -3,13 +3,13 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.
 Uploaders: Andreas Tille <tille at debian.org>
 Section: science
 Priority: optional
-Build-Depends: debhelper-compat (= 12),
+Build-Depends: debhelper-compat (= 13),
                dh-python,
                cython3,
                python3-dev,
                python3-setuptools
 Build-Depends-Arch: python3-pysam
-Standards-Version: 4.5.0
+Standards-Version: 4.6.0
 Vcs-Browser: https://salsa.debian.org/med-team/umis
 Vcs-Git: https://salsa.debian.org/med-team/umis.git
 Homepage: https://github.com/vals/umis
@@ -44,6 +44,7 @@ Architecture: all
 Depends: ${shlibs:Depends},
          ${misc:Depends}
 Recommends: umis
+Multi-Arch: foreign
 Description: tools for processing UMI RNA-tag data (examples)
  Umis provides tools for estimating expression in RNA-Seq data which
  performs sequencing of end tags of transcript, and incorporate molecular


=====================================
debian/umis-examples.lintian-overrides
=====================================
@@ -1,5 +1,5 @@
 # These files are needed in compressed and uncompressed form
-umis-examples: duplicated-compressed-file usr/share/doc/umis/examples/CEL-Seq/SRP036633_1.fastq.gz
-umis-examples: duplicated-compressed-file usr/share/doc/umis/examples/CEL-Seq/SRP036633_2.fastq.gz
-umis-examples: duplicated-compressed-file usr/share/doc/umis/examples/tagcount/cb-histogram.txt.gz
+umis-examples: compressed-duplicate usr/share/doc/umis/examples/CEL-Seq/SRP036633_1.fastq.gz
+umis-examples: compressed-duplicate usr/share/doc/umis/examples/CEL-Seq/SRP036633_2.fastq.gz
+umis-examples: compressed-duplicate usr/share/doc/umis/examples/tagcount/cb-histogram.txt.gz
 


=====================================
debian/watch
=====================================
@@ -1,3 +1,3 @@
 version=4
 
-https://github.com/vals/umis/releases .*/archive/v?@ANY_VERSION@@ARCHIVE_EXT@
+https://github.com/vals/umis/releases .*/v?@ANY_VERSION@@ARCHIVE_EXT@


=====================================
setup.py
=====================================
@@ -8,7 +8,7 @@ def read(fname):
 
 setup(
         name='umis',
-        version='1.0.7',
+        version='1.0.8',
         description='Package for estimating UMI counts in Transcript Tag Counting data.',
         packages=find_packages(),
         install_requires=['click', 'pysam>=0.8.3', 'pandas', 'regex', 'scipy', 'toolz'],


=====================================
umis/umis.py
=====================================
@@ -102,7 +102,7 @@ def write_fastq(filename):
     """
     if filename:
         if filename.endswith('gz'):
-            filename_fh = gzip.open(filename, mode='wb')
+            filename_fh = gzip.open(filename, mode='wt')
         else:
             filename_fh = open(filename, mode='w')
     else:
@@ -190,7 +190,7 @@ def fastqtransform(transform, fastq1, fastq2, fastq3, fastq4, keep_fastq_tags,
     options = _infer_transform_options(transform)
     read_template = '{name}'
     logger.info("Transforming %s." % fastq1)
-    if options.dual_index:
+    if options.dual_index and options.CB:
         logger.info("Detected dual cellular indexes.")
         if separate_cb:
             read_template += ':CELL_{CB1}-{CB2}'
@@ -205,9 +205,12 @@ def fastqtransform(transform, fastq1, fastq2, fastq3, fastq4, keep_fastq_tags,
     elif options.CB or demuxed_cb:
         logger.info("Detected cellular barcodes.")
         read_template += ':CELL_{CB}'
-    if options.MB:
+    if options.MB and options.dual_index:
+        logger.info("Detected dual UMI.")
+        read_template += ':UMI_{MB1}-{MB2}'
+    elif options.MB:
         logger.info("Detected UMI.")
-        read_template += ':UMI_{MB}'
+        read_template += ":UMI_{MB}"
     if options.SB:
         logger.info("Detected sample.")
         read_template += ':SAMPLE_{SB}'
@@ -251,7 +254,7 @@ def fastqtransform(transform, fastq1, fastq2, fastq3, fastq4, keep_fastq_tags,
         for chunk in p.map(transform, list(bigchunk)):
             if paired:
                 for read1_dict, read2_dict in tz.partition(2, chunk):
-                    if options.dual_index:
+                    if options.dual_index and options.CB:
                         if not separate_cb:
                             read1_dict['CB'] = read1_dict['CB1'] + read1_dict['CB2']
                             read2_dict['CB'] = read2_dict['CB1'] + read2_dict['CB2']
@@ -259,6 +262,8 @@ def fastqtransform(transform, fastq1, fastq2, fastq3, fastq4, keep_fastq_tags,
                     if demuxed_cb:
                         read1_dict['CB'] = demuxed_cb
                         read2_dict['CB'] = demuxed_cb
+                    if options.dual_index and options.MB:
+                        read1_dict['MB'] = read1_dict['MB1'] + read2_dict['MB2']
 
                     # Deal with spaces in read names
                     if keep_fastq_tags:
@@ -282,13 +287,16 @@ def fastqtransform(transform, fastq1, fastq2, fastq3, fastq4, keep_fastq_tags,
                         fastq2out_fh.write(read_template.format(**read2_dict))
             else:
                 for read1_dict in chunk:
-                    if options.dual_index:
+                    if options.dual_index and options.CB:
                         if not separate_cb:
                             read1_dict['CB'] = read1_dict['CB1'] + read1_dict['CB2']
 
                     if demuxed_cb:
                         read1_dict['CB'] = demuxed_cb
 
+                    if options.dual_index and options.MB:
+                        read1_dict['MB'] = read1_dict['MB1'] + read1_dict['MB2']
+
                     # Deal with spaces in read names
                     if keep_fastq_tags:
                         name, tag = read1_dict['name'].split(' ')
@@ -326,6 +334,8 @@ def _infer_transform_options(transform):
                 triple_index = True
             else:
                 dual_index = True
+        if "MB1" in rx:
+            dual_index = True
         if "SB" in rx:
             SB = True
         if "CB" in rx:
@@ -353,7 +363,7 @@ def _extract_readnum(read_dict):
 def transformer(chunk, read1_regex, read2_regex, read3_regex, read4_regex,
                 paired=False):
     # Parse the reads with the regexes
-    update_keys = ("MB", "CB", "CB1", "CB2", "SP")
+    update_keys = ("MB", "CB", "CB1", "CB2", "SP", "MB1", "MB2")
     reads = []
     for read1, read2, read3, read4 in chunk:
         read1_match = read1_regex.search(read1)



View it on GitLab: https://salsa.debian.org/med-team/umis/-/compare/f057d388e07a4830dbdb4cdd38c30dbf2bf72817...df622ce327613b00cb55f433599950d6e5925798

-- 
View it on GitLab: https://salsa.debian.org/med-team/umis/-/compare/f057d388e07a4830dbdb4cdd38c30dbf2bf72817...df622ce327613b00cb55f433599950d6e5925798
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/20211012/29d6453f/attachment-0001.htm>


More information about the debian-med-commit mailing list