Exemplo n.º 1
0
def test_fasta():
    fasta = FASTA()
    fasta.load_fasta(None)
    fasta.load_fasta("P43403")
    fasta.load_fasta("P43403") # already there 
    fasta.header
    fasta.gene_name
    fasta.sequence
    fasta.fasta
    fasta.identifier
    fh = tempfile.NamedTemporaryFile(delete=False)
    fasta.save_fasta(fh.name)
    fasta.read_fasta(fh.name)
    fh.delete = True
    fh.close()
Exemplo n.º 2
0
def read_fasta(file_name):
    '''
    :param file_name:
    :return: the fasta raw data
    '''
    f = FASTA.read_fasta(file_name)
    return f._fasta