Changeset 1466:91c63a82359a
- Timestamp:
- 08/04/08 10:20:23
(4 months ago)
- Author:
- greg
- branch:
- default
- Message:
Better fix for gops command line parser, now properly handles no strand column.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1463 |
r1466 |
|
| 20 | 20 | """Parse a columns command line argument into a four-tuple""" |
|---|
| 21 | 21 | if cols: |
|---|
| | 22 | # Handle case where no strand column included - in this case, cols |
|---|
| | 23 | # looks something like 1,2,3, |
|---|
| | 24 | if cols.endswith( ',' ): |
|---|
| | 25 | cols += '0' |
|---|
| 22 | 26 | col_list = map( lambda x: int( x ) - 1, cols.split(",") ) |
|---|
| 23 | | if len( col_list ) == 3: |
|---|
| 24 | | # We only have chrom, start and end cols, so we need to add a strand col |
|---|
| 25 | | col_list.append( -1 ) |
|---|
| 26 | 27 | return col_list |
|---|
| 27 | 28 | else: |
|---|