Bio.Fasta.Iterator
From Biocourse
Bio.Fasta.Iterator
1. 종류
- class
2. 설명
- 파일 내에 많은 Record가 있을 경우, 파일의 내용을 Record 단위로 순차적으로 읽어들인다.
- 이 작업을 해주는 method 가 next( )이다.
- Fasta 파일 안에 Fasta 포멧 형식의 sequence 가 다수일 때 그 각각의 sequence 를 처리하고자 할 때 사용한다.
3. Initialize
- __init__(self, handle, parser = None, debug = 0)
- handle
: 파일 handle 을 입력받는다.
- parser
: Bio.Fasta.RecordParser 나 Bio.Fasta.SequenceParser 형식의 값을 설정한다.
- debug
: 보통은 다른 값을 설정하지 않는다.
4. Attribute
5. Method
- next(self)
: 인스턴스 생성시 parser의 설정에 따라 리턴값이 달라진다.
: 설정하지 않으면 string 타입을 리턴한다. RecordParser 는 Bio.Fasta.Record 형식, SequenceParser 는 Bio.SeqRecord.SeqRecord 형식을 리턴한다.
