Module fastaObservedDist
[hide private]
[frames] | no frames]

Source Code for Module fastaObservedDist

 1  #!/usr/local/bin/python 
 2  """\ 
 3  ------------------------------------------------------- 
 4   fastaObservedDist.py 
 5  ------------------------------------------------------- 
 6   
 7  fastaObservedDist.py [-h|--help] <fastafile>" 
 8   
 9      add length data on all sequences in the fasta file. 
10   
11  ------------------------------------------------------- 
12  -h    --help                       : print this help 
13  ------------------------------------------------------- 
14  """ 
15   
16  import fileinput 
17  import getopt 
18   
19  from obitools.fasta import fastaAligmentReader 
20  from obitools.distances.observed import PairewiseGapRemoval 
21  from obitools.distances.r import writeRMatrix 
22  from obitools.utils import checkHelpOption 
23   
24   
25   
26  if __name__=='__main__': 
27       
28      checkHelpOption(__doc__) 
29   
30      ali = fastaAligmentReader(fileinput.input()) 
31      dist= PairewiseGapRemoval(ali) 
32       
33      print writeRMatrix(dist) 
34