コード例 #1
0
ファイル: GtrackComposer.py プロジェクト: brynjagr/gtrackcore
 def _composeBoundingRegionLine(self, boundingRegionTuple):
     region = copy(boundingRegionTuple.region)
     
     if self._headerDict['1-indexed']:
         region.start = region.start+1 if region.start is not None else None
         region.end = region.end+1 if region.end is not None else None
     if self._headerDict['end inclusive']:
         region.end = region.end-1 if region.end is not None else None
         
     brLinePartList = [(Gtrack.convertNameToGtrack(attr), getattr(region, attr)) for attr in ['genome', 'chr', 'start', 'end']]
     return '####' + '; '.join(k + '=' + self._formatPhraseWithCorrectChrUsage(str(v), useUrlEncoding=True, notAllowedChars='=;#\t') \
                               for k,v in brLinePartList if v is not None) + os.linesep
コード例 #2
0
ファイル: GtrackComposer.py プロジェクト: gtrack/gtrackcore
    def _composeBoundingRegionLine(self, boundingRegionTuple):
        region = boundingRegionTuple.region.getCopy()

        if self._headerDict['1-indexed']:
            region.start = region.start + 1 if region.start is not None else None
            region.end = region.end + 1 if region.end is not None else None
        if self._headerDict['end inclusive']:
            region.end = region.end - 1 if region.end is not None else None

        brLinePartList = [(Gtrack.convertNameToGtrack(attr),
                           getattr(region, attr))
                          for attr in ['genome', 'chr', 'start', 'end']]
        return '####' + '; '.join(k + '=' + self._formatPhraseWithCorrectChrUsage(str(v), useUrlEncoding=True, notAllowedChars='=;#\t') \
                                  for k,v in brLinePartList if v is not None) + os.linesep
コード例 #3
0
ファイル: GtrackComposer.py プロジェクト: brynjagr/gtrackcore
 def _getGtrackColumnsFromHbColumns(self, hbColumns):
     return [Gtrack.convertNameToGtrack(col) for col in hbColumns if col != 'weights']
コード例 #4
0
ファイル: GtrackComposer.py プロジェクト: gtrack/gtrackcore
 def _getGtrackColumnsFromHbColumns(self, hbColumns):
     return [
         Gtrack.convertNameToGtrack(col) for col in hbColumns
         if col != 'weights'
     ]