__author__ = 'paulsalvatore57'




#I first need to access the PDB file for the uniprot entry.

#A text file can be generated by the following url:

    #   http://www.uniprot.org/uniprot/ACCESSION_NUMBER.txt



#Alternatively, you can get the just FASTA file by the entry:

    #   http://www.uniprot.org/uniprot/ACCESSION_NUMBER.fasta

    #This will be more useful for the purposes of this problem


from Rosalind.SEQUENCE import *

def findMotifs(file):
    motif = 'N(P)[ST](P)'
    motif = Protein_sequence('N-glycosidase', motif, None, True)
     proteins = FASTA_LOAD_PROT(file)
    for protein in proteins:
        print protein.getAccession()
        ans = ''
        mtf = protein.findMotif(motif)
        for i in mtf:
            ans += str(i) + ' '
        print ans

findMotifs('test1')



#I changed my program such that a protein sequence can optionally be a motif and there cantBe/either/exactly libraries do not need to be recomputed constantly.