Commits

Anonymous committed d2df696

Skip single sequence containing blocks from CpG masking, which should take care of the index errors being thrown by the script.

Comments (0)

Files changed (1)

lib/bx/align/sitemask/cpg.py

         
     def __call__( self, block ):
         if not block: return block
+        if len(block.components) < 2:
+            return
         cpglist = list_cpg_restricted( \
             string.upper(block.components[0].text), \
             string.upper(block.components[1].text) )
         
     def __call__( self, block ):
         if not block: return block
+        if len(block.components) < 2:
+            return
         cpglist = list_cpg( \
             string.upper(block.components[0].text), \
             string.upper(block.components[1].text) )
         
     def __call__( self, block ):
         if not block: return block
+        if len(block.components) < 2:
+            return
         noncpglist = list_non_cpg( \
             string.upper(block.components[0].text), \
             string.upper(block.components[1].text) )