valerio_mazza Nov 18th, 2019 84 Never
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)
- print "ERROR: sequence",seqN,"not found"
- pos_startName = seqFile.rfind(">", 0, pos_seq)
- pos_endName = seqFile.find("\n", pos_startName)
- print "Found in",seqFile[pos_startName:pos_endName]
RAW Paste Data