Trees | Indices | Help |
---|
|
object --+ | list --+ | GenericTools.VerboseList --+ | Location
this is really best interfaced through LocationFromString fuzzy: < or > join: {0 = no join, 1 = join, 2 = order}
>>> location = Location([Location([339]), Location([564])]) # zero-based >>> location Location(Location(339), Location(564)) >>> print location # one-based 340..565 >>> print location.five_prime() 340 >>> location_rev = Location([Location([339]), Location([564])], 1) >>> print location_rev complement(340..565) >>> print location_rev.five_prime() 565
|
|||
new list |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
direction2index = {1: 0,-1:-1}
|
|||
Inherited from |
|
|||
Inherited from |
|
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
str(x)
|
repr(x)
|
1: 5' -1: 3' >>> loc1 = LocationFromString("join(1..3,complement(5..6))") >>> loc1.direction_and_index(1) (1, 0) >>> loc1.direction_and_index(-1) (-1, -1) >>> loc1.reverse() >>> print loc1 complement(join(1..3,complement(5..6))) >>> loc1.direction_and_index(1) (-1, -1) |
WARNING: doesn't deal with joins!!!! >>> location1 = LocationFromString("1..50") >>> location2 = LocationFromString("25..200") >>> print location1.intersection(location2) 25..50 >>> print location1.intersection(location2) 25..50 |
x+y
|
reverse *IN PLACE*
|
works for single level non-complex joins >>> LOC = LocationFromString >>> l1 = LOC("join(alpha:1..30,alpha:50..70)") >>> print l1.bounding() join(alpha:1..70) >>> l2 = LOC("join(alpha:1..30,alpha:complement(50..70))") >>> print l2.bounding() join(alpha:1..30,alpha:complement(50..70)) >>> l3 = LOC("join(alpha:1..30,alpha:complement(50..70),beta:6..20,alpha:25..45)") >>> print l3.bounding() join(alpha:1..45,alpha:complement(50..70),beta:6..20) |
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Wed Dec 16 11:25:25 2009 | http://epydoc.sourceforge.net |