本文整理汇总了Python中skbio.io.format._base._get_nth_sequence函数的典型用法代码示例。如果您正苦于以下问题:Python _get_nth_sequence函数的具体用法?Python _get_nth_sequence怎么用?Python _get_nth_sequence使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_get_nth_sequence函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: _qseq_to_protein_sequence
def _qseq_to_protein_sequence(fh, seq_num=1,
phred_offset=_default_phred_offset,
variant=_default_variant, **kwargs):
return _get_nth_sequence(_qseq_to_generator(fh, filter=False,
phred_offset=phred_offset, variant=variant,
constructor=Protein, **kwargs),
seq_num)
开发者ID:sunhuaibo,项目名称:scikit-bio,代码行数:7,代码来源:qseq.py
示例2: _fastq_to_protein_sequence
def _fastq_to_protein_sequence(fh, variant=None, phred_offset=None, seq_num=1,
**kwargs):
return _get_nth_sequence(
_fastq_to_generator(fh, variant=variant, phred_offset=phred_offset,
constructor=Protein,
**kwargs),
seq_num)
开发者ID:sunhuaibo,项目名称:scikit-bio,代码行数:7,代码来源:fastq.py
示例3: _construct_seq
def _construct_seq(fh, constructor=DNA, seq_num=1):
lines = []
for i, (data_type, seq_id, l) in enumerate(_yield_record(fh), 1):
if data_type == 'data' and seq_num == i:
lines = l
seq = _get_nth_sequence(_fasta_to_generator(fh, constructor=constructor),
seq_num=seq_num)
seq.interval_metadata = _parse_record(lines, len(seq))
return seq
开发者ID:ElDeveloper,项目名称:biolopy,代码行数:9,代码来源:gff3.py
示例4: _genbank_to_protein
def _genbank_to_protein(fh, seq_num=1, **kwargs):
record = _get_nth_sequence(_parse_genbanks(fh), seq_num)
return _construct(record, Protein, **kwargs)
开发者ID:anderspitman,项目名称:scikit-bio,代码行数:3,代码来源:genbank.py
示例5: _genbank_to_rna
def _genbank_to_rna(fh, seq_num=1, **kwargs):
record = _get_nth_sequence(_parse_genbanks(fh), seq_num)
return _construct(record, RNA, **kwargs)
开发者ID:anderspitman,项目名称:scikit-bio,代码行数:3,代码来源:genbank.py
示例6: _qseq_to_biological_sequence
def _qseq_to_biological_sequence(fh, seq_num=1,
phred_offset=_default_phred_offset,
variant=_default_variant):
return _get_nth_sequence(_qseq_to_generator(fh, filter=False,
phred_offset=phred_offset, variant=variant,
constructor=Sequence), seq_num)
开发者ID:sunhuaibo,项目名称:scikit-bio,代码行数:6,代码来源:qseq.py
示例7: test_seq_num_just_right
def test_seq_num_just_right(self):
value = _get_nth_sequence(self.gen, 3)
self.assertEqual(value, "goldilocks: 3")
开发者ID:RNAer,项目名称:scikit-bio,代码行数:3,代码来源:test_base.py
示例8: test_seq_num_too_big
def test_seq_num_too_big(self):
with self.assertRaises(ValueError) as cm:
_get_nth_sequence(self.gen, 6)
self.assertIn("end of file", str(cm.exception))
self.assertIn("6th", str(cm.exception))
开发者ID:RNAer,项目名称:scikit-bio,代码行数:6,代码来源:test_base.py
示例9: test_seq_num_too_small
def test_seq_num_too_small(self):
with self.assertRaises(ValueError) as cm:
_get_nth_sequence(self.gen, 0)
self.assertIn("between 1 and", str(cm.exception))
self.assertIn("0", str(cm.exception))
开发者ID:RNAer,项目名称:scikit-bio,代码行数:6,代码来源:test_base.py
示例10: _fasta_to_protein
def _fasta_to_protein(fh, qual=FileSentinel, seq_num=1, **kwargs):
return _get_nth_sequence(
_fasta_to_generator(fh, qual=qual,
constructor=Protein, **kwargs),
seq_num)
开发者ID:ElDeveloper,项目名称:biolopy,代码行数:5,代码来源:fasta.py
示例11: _fastq_to_biological_sequence
def _fastq_to_biological_sequence(fh, variant=None, phred_offset=None,
seq_num=1):
return _get_nth_sequence(
_fastq_to_generator(fh, variant=variant, phred_offset=phred_offset,
constructor=Sequence),
seq_num)
开发者ID:sunhuaibo,项目名称:scikit-bio,代码行数:6,代码来源:fastq.py
示例12: _fasta_to_biological_sequence
def _fasta_to_biological_sequence(fh, qual=FileSentinel, seq_num=1):
return _get_nth_sequence(
_fasta_to_generator(fh, qual=qual, constructor=Sequence),
seq_num)
开发者ID:sunhuaibo,项目名称:scikit-bio,代码行数:4,代码来源:fasta.py
示例13: _embl_to_RNA
def _embl_to_RNA(fh, seq_num=1, **kwargs):
record = _get_nth_sequence(_parse_records(fh, _parse_single_embl), seq_num)
return _construct(record, RNA, **kwargs)
开发者ID:biocore,项目名称:micronota,代码行数:3,代码来源:embl.py
示例14: _sam_to_RNA
def _sam_to_RNA(fh, seq_num=1, **kwargs):
record = _get_nth_sequence(_parse_records(fh), seq_num)
return _construct(record, RNA, **kwargs)
开发者ID:biocore,项目名称:micronota,代码行数:3,代码来源:sam.py
注:本文中的skbio.io.format._base._get_nth_sequence函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论