本文整理汇总了Python中skbio.io._base._get_nth_sequence函数的典型用法代码示例。如果您正苦于以下问题:Python _get_nth_sequence函数的具体用法?Python _get_nth_sequence怎么用?Python _get_nth_sequence使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_get_nth_sequence函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _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)
示例2: _qseq_to_protein_sequence
def _qseq_to_protein_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=partial(Protein, validate=False)),
seq_num)
示例3: _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)
示例4: test_seq_num_just_right
def test_seq_num_just_right(self):
value = _get_nth_sequence(self.gen, 3)
self.assertEqual(value, 'goldilocks: 3')
示例5: 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))
示例6: 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))
示例7: _fastq_to_protein_sequence
def _fastq_to_protein_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=partial(Protein, validate=False)),
seq_num)
示例8: _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)
示例9: _fastq_to_nucleotide_sequence
def _fastq_to_nucleotide_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=NucleotideSequence),
seq_num)
示例10: _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)
示例11: _fasta_to_protein_sequence
def _fasta_to_protein_sequence(fh, qual=FileSentinel, seq_num=1):
return _get_nth_sequence(
_fasta_to_generator(fh, qual=qual,
constructor=partial(Protein, validate=False)),
seq_num)
示例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)
示例13: _fasta_to_protein_sequence
def _fasta_to_protein_sequence(fh, qual=FileSentinel, seq_num=1):
return _get_nth_sequence(
_fasta_to_generator(fh, qual=qual, constructor=ProteinSequence),
seq_num)
示例14: _fasta_to_nucleotide_sequence
def _fasta_to_nucleotide_sequence(fh, qual=FileSentinel, seq_num=1):
return _get_nth_sequence(
_fasta_to_generator(fh, qual=qual, constructor=NucleotideSequence),
seq_num)
示例15: _fasta_to_rna_sequence
def _fasta_to_rna_sequence(fh, qual=FileSentinel, seq_num=1, **kwargs):
return _get_nth_sequence(
_fasta_to_generator(fh, qual=qual,
constructor=RNA, **kwargs),
seq_num)