ó
’wÑIc           @   s  d  d l  Z  d  d l m Z d  d l m Z d „  Z d d d d d	 d
 d g Z e j ƒ  Z e j e j	 e ƒ Z
 xL e D]D Z d e GHe  j j d e ƒ Z e e ƒ Z e j e ƒ Z e GHqx Wxm e D]e Z d e GHe  j j d e ƒ Z e e ƒ Z e
 j e ƒ Z e j GHe j GHe j GHe e j ƒ GHqÇ Wd d d d g Z e j e j e ƒ Z
 xL e D]D Z d e GHe  j j d e ƒ Z e e ƒ Z e j e ƒ Z e GHq^Wxm e D]e Z d e GHe  j j d e ƒ Z e e ƒ Z e
 j e ƒ Z e j GHe j GHe j GHe e j ƒ GHq­Wd S(   iÿÿÿÿN(   t   Fasta(   t   Alphabetc         C   sb   |  j  d ƒ } | d } | d } d j | ƒ } | j  d ƒ } | d } | d } | | | f S(   s½   Function to convert a title into the id, name, and description.

    This is just a quick-n-dirty implementation, and is definately not meant
    to handle every FASTA title line case.
    t    i    i   t   |i   i   (   t   splitt   join(   t   titlet   all_infot   id_infot   restt   descrt   id_info_itemst   idt   name(    (    s   test_Fasta2.pyt   title_to_ids
   s    



s	   lupine.nus   elderberry.nus   phlox.nus   centaurea.nus   wisteria.nus   sweetpea.nus   lavender.nus
   testing %st   Nucleics	   aster.pros   rosemary.pros   rose.pros   loveliesbleeding.prot   Amino(   t   ost   BioR    R   R   t   testst   RecordParsert   record_parsert   SequenceParsert   generic_dnat   sequence_parsert   testt   pathR   t   datafilet   opent
   src_handlet   parset   dataR   R   t   descriptiont   reprt   seqt   generic_protein(    (    (    s   test_Fasta2.pyt   <module>   sN   							