Mercurial > repos > yufei-luo > s_mart
comparison commons/core/parsing/WigParser.py @ 46:169d364ddd91
Uploaded
author | m-zytnicki |
---|---|
date | Mon, 30 Sep 2013 03:19:26 -0400 |
parents | 44d5973c188c |
children |
comparison
equal
deleted
inserted
replaced
45:e454402ba9d9 | 46:169d364ddd91 |
---|---|
83 def makeIndexName(self, chromosome, strand = None): | 83 def makeIndexName(self, chromosome, strand = None): |
84 """ | 84 """ |
85 Create an index name for a file | 85 Create an index name for a file |
86 """ | 86 """ |
87 directoryName = os.path.dirname(self.fileName) | 87 directoryName = os.path.dirname(self.fileName) |
88 baseName = os.path.splitext(os.path.basename(self.fileName))[0] | |
88 if strand == None: | 89 if strand == None: |
89 strandName = "" | 90 strandName = "" |
90 else: | 91 else: |
91 strandName = "+" if strand == 1 else "-" | 92 strandName = "+" if strand == 1 else "-" |
92 indexName = os.path.join(directoryName, ".%s%s.index" % (chromosome, strandName)) | 93 indexName = os.path.join(directoryName, ".%s.%s%s.index" % (baseName, chromosome, strandName)) |
93 return indexName | 94 return indexName |
94 | 95 |
95 | 96 |
96 def findIndexFile(self, chromosome, strand = None): | 97 def findIndexFile(self, chromosome, strand = None): |
97 """ | 98 """ |