diff small_rna_maps.py @ 1:40972a8dfab9 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/small_rna_maps commit ad60e6655aabe30246043d95f14646b2527c9255
author artbio
date Mon, 24 Jul 2017 12:31:04 -0400
parents 6d48150495e3
children 507383cce5a8
line wrap: on
line diff
--- a/small_rna_maps.py	Mon Jul 24 06:28:45 2017 -0400
+++ b/small_rna_maps.py	Mon Jul 24 12:31:04 2017 -0400
@@ -51,8 +51,6 @@
                 for pos in positions:
                     if not map_dictionary[(chrom, pos+1, 'F')]:
                         map_dictionary[(chrom, pos+1, 'F')] = []
-                    if not map_dictionary[(chrom, pos+1, 'R')]:
-                        map_dictionary[(chrom, pos+1, 'R')] = []
                 if read.is_reverse:
                     map_dictionary[(chrom, positions[-1]+1,
                                     'R')].append(read.query_alignment_length)
@@ -113,7 +111,6 @@
         for chrom in self.chromosomes:
             coverage_dictionary[(chrom, 1, 'F')] = 0
             coverage_dictionary[(chrom, self.chromosomes[chrom], 'F')] = 0
-
         for key in map_dictionary:
             coverage = self.bam_object.count_coverage(
                                                 reference=key[0],
@@ -132,7 +129,7 @@
         {chrom: {polarity: {size: nbre of reads}}}
         '''
         size_dictionary = defaultdict(lambda: defaultdict(
-                                      lambda: defaultdict( int )))
+                                      lambda: defaultdict(int)))
         #  to track empty chromosomes
         for chrom in self.chromosomes:
             if self.bam_object.count(chrom) == 0: