Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def find_seqDna(pathFile, seqN):
- # @param pathFile: String.
- # @param seqN: String. Nucleotide sequence to look for
- file = open(pathFile, "rt")
- seqFile = file.read()
- if seqFile.find(seqN) != -1:
- pos_seq = seqFile.find(seqN)
- else:
- print "ERROR: sequence",seqN,"not found"
- return
- pos_startName = seqFile.rfind(">", 0, pos_seq)
- pos_endName = seqFile.find("\n", pos_startName)
- print "Found in",seqFile[pos_startName:pos_endName]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement