Mercurial > repos > p.lucas > extract_fasta_subsequence
comparison exseq_multi.py @ 6:612269711364 draft default tip
Uploaded
| author | p.lucas |
|---|---|
| date | Wed, 26 Sep 2018 08:48:08 -0400 |
| parents | 746e286edff0 |
| children |
comparison
equal
deleted
inserted
replaced
| 5:76a5d10c40f0 | 6:612269711364 |
|---|---|
| 44 | 44 |
| 45 # Ouputs : | 45 # Ouputs : |
| 46 with open(infile, "rU") as inf: | 46 with open(infile, "rU") as inf: |
| 47 # Input treatment : | 47 # Input treatment : |
| 48 for rec in SeqIO.parse(inf, "fasta"): | 48 for rec in SeqIO.parse(inf, "fasta"): |
| 49 outputfile.write(rec.id+'\n') | 49 outputfile.write('>'+rec.id+'\n') |
| 50 outputfile.write(str(rec.seq[int(spos):int(epos)])+'\n') | 50 outputfile.write(str(rec.seq[int(spos):int(epos)])+'\n') |
| 51 | 51 |
| 52 # Fermeture des fichiers. | 52 # Fermeture des fichiers. |
| 53 outputfile.close() | 53 outputfile.close() |
| 54 | 54 |
