File: pyfasta_fasta_random_access.py

package info (click to toggle)
pyfastx 2.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,336 kB
  • sloc: ansic: 4,826; python: 1,816; sh: 505; perl: 66; makefile: 31
file content (12 lines) | stat: -rw-r--r-- 183 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
import sys
import pyfasta

idfile, fafile = sys.argv[1:]

fa = pyfasta.Fasta(fafile)

with open(idfile) as fh:
	for line in fh:
		seqid = line.strip()
		s = str(fa[seqid])
		print(s)