本文整理汇总了Python中jacquard.utils.vcf.VcfRecord.text方法的典型用法代码示例。如果您正苦于以下问题:Python VcfRecord.text方法的具体用法?Python VcfRecord.text怎么用?Python VcfRecord.text使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jacquard.utils.vcf.VcfRecord
的用法示例。
在下文中一共展示了VcfRecord.text方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_asTextWhenEmptyFormatField
# 需要导入模块: from jacquard.utils.vcf import VcfRecord [as 别名]
# 或者: from jacquard.utils.vcf.VcfRecord import text [as 别名]
def test_asTextWhenEmptyFormatField(self):
sampleA = OrderedDict({})
sampleB = OrderedDict({})
sample_tag_values = OrderedDict({"SampleA": sampleA, "SampleB": sampleB})
record = VcfRecord("CHROM", "POS", "REF", "ALT", "ID", "QUAL", "FILTER", "INFO", sample_tag_values)
expected = self.entab("CHROM|POS|ID|REF|ALT|QUAL|FILTER|INFO|.|.|.\n")
self.assertEquals(expected, record.text())
示例2: test_text
# 需要导入模块: from jacquard.utils.vcf import VcfRecord [as 别名]
# 或者: from jacquard.utils.vcf.VcfRecord import text [as 别名]
def test_text(self):
sampleA = OrderedDict(sorted({"F1": "SA.1", "F2": "SA.2", "F3": "SA.3"}.items()))
sampleB = OrderedDict(sorted({"F1": "SB.1", "F2": "SB.2", "F3": "SB.3"}.items()))
sample_tag_values = OrderedDict(sorted({"SampleA": sampleA, "SampleB": sampleB}.items()))
record = VcfRecord("CHROM", "POS", "REF", "ALT", "ID", "QUAL", "FILTER", "INFO", sample_tag_values)
expected = self.entab("CHROM|POS|ID|REF|ALT|QUAL|FILTER|INFO|F1:F2:F3|SA.1:SA.2:SA.3|SB.1:SB.2:SB.3\n")
self.assertEquals(expected, record.text())
示例3: test_empty_record
# 需要导入模块: from jacquard.utils.vcf import VcfRecord [as 别名]
# 或者: from jacquard.utils.vcf.VcfRecord import text [as 别名]
def test_empty_record(self):
sample_names = ["SampleA"]
base = VcfRecord.parse_record(self.entab("chr2|1|ID|A|C|QUAL|FILTER|INFO|F|S\n"), sample_names)
empty_record = base.get_empty_record()
expected_record = VcfRecord(chrom="chr2", pos="1", ref="A", alt="C")
self.assertEquals(expected_record.text(), empty_record.text())