本文整理汇总了Python中micall.core.remap.sam_to_conseqs函数的典型用法代码示例。如果您正苦于以下问题:Python sam_to_conseqs函数的具体用法?Python sam_to_conseqs怎么用?Python sam_to_conseqs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sam_to_conseqs函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: testDebugReportsOnReverseRead
def testDebugReportsOnReverseRead(self):
sam_file = StringIO(
"@SQ\tSN:test\n"
"test1\t99\ttest\t1\t44\t3M3I2M\t=\t1\t8\tACTGGGAG\tJJJJJJJJ\n"
"test1\t147\ttest\t5\t44\t8M\t=\t1\t-8\tGACCCAAC\tJJJJJIJJ\n"
"test1\t99\ttest\t1\t44\t3M3I2M\t=\t1\t12\tATTGGGAG\tJJJJJJJJ\n"
"test1\t147\ttest\t5\t44\t8M\t=\t1\t-12\tGACCCAAC\tJJJJJHJJ\n"
)
reports = {('test', 10): None}
expected_reports = {('test', 10): 'H{A: 2}, I{A: 1}'}
remap.sam_to_conseqs(sam_file, debug_reports=reports)
self.assertDictEqual(expected_reports, reports)
开发者ID:cfe-lab,项目名称:MiCall,代码行数:14,代码来源:test_remap.py
示例2: testDebugReports
def testDebugReports(self):
sam_file = StringIO(
"@SQ\tSN:test\n"
"test1\t99\ttest\t1\t44\t3M3I9M\t=\t1\t12\tACTGGGAGACCCAAC\tJIJJJJJJJJJJJJJ\n"
"test1\t147\ttest\t1\t44\t3M3I9M\t=\t1\t-12\tACTGGGAGACCCAAC\tJIJJJJJJJJJJJJJ\n"
"test1\t99\ttest\t1\t44\t3M3I9M\t=\t1\t12\tATTGGGAGACCCAAC\tJHJJJJJJJJJJJJJ\n"
"test1\t147\ttest\t1\t44\t3M3I9M\t=\t1\t-12\tATTGGGAGACCCAAC\tJHJJJJJJJJJJJJJ\n"
)
reports = {('test', 2): None}
expected_reports = {('test', 2): 'H{C: 1, T: 1}, I{C: 1}'}
remap.sam_to_conseqs(sam_file, debug_reports=reports)
self.assertDictEqual(expected_reports, reports)
开发者ID:cfe-lab,项目名称:MiCall,代码行数:14,代码来源:test_remap.py
示例3: testSeedsConverged
def testSeedsConverged(self):
# SAM:qname, flag, rname, pos, mapq, cigar, rnext, pnext, tlen, seq, qual
sam_file = StringIO(
"@SQ\tSN:test\tSN:other\tSN:wayoff\n"
"test1\t99\ttest\t1\t44\t10M\t=\t1\t10\tATGAGGAGTA\tJJJJJJJJJJJJ\n"
"other1\t99\tother\t1\t44\t10M\t=\t1\t10\tATGACCAGTA\tJJJJJJJJJJJJ\n"
"wayoff1\t99\twayoff\t1\t44\t10M\t=\t1\t10\tATGAGGGTAC\tJJJJJJJJJJJJ\n"
)
seeds = {'test': 'ATGAAGTA',
'other': 'AAGCCGAA',
'wayoff': 'TCATGTAC'}
expected_conseqs = {'test': 'ATGAGGAGTA'}
expected_distances = {'test': dict(seed_dist=2,
other_dist=5,
other_seed='other'),
'other': dict(seed_dist=4,
other_dist=2,
other_seed='test'),
'wayoff': dict(seed_dist=4,
other_dist=3,
other_seed='test')}
distances = {}
conseqs = remap.sam_to_conseqs(sam_file,
seeds=seeds,
original_seeds=seeds,
is_filtered=True,
distance_report=distances)
self.maxDiff = 1000
self.assertEqual(expected_conseqs, conseqs)
self.assertEqual(expected_distances, distances)
开发者ID:cfe-lab,项目名称:MiCall,代码行数:32,代码来源:test_remap.py
示例4: testInsertionAfterLowQuality
def testInsertionAfterLowQuality(self):
sam_file = StringIO(
"@SQ\tSN:test\n"
"test1\t99\ttest\t1\t44\t3M3I3M\t=\t1\t9\tACAGGGAGA\tJJ/JJJJJJ\n"
)
expected_conseqs = {'test': 'ACNAGA'}
conseqs = remap.sam_to_conseqs(sam_file, quality_cutoff=32)
self.assertDictEqual(expected_conseqs, conseqs)
开发者ID:cfe-lab,项目名称:MiCall,代码行数:8,代码来源:test_remap.py
示例5: testSimpleInsertion
def testSimpleInsertion(self):
sam_file = StringIO(
"@SQ\tSN:test\n"
"test1\t99\ttest\t1\t44\t3M3I3M\t=\t1\t9\tACAGGGAGA\tJJJJJJJJJ\n"
)
expected_conseqs = {'test': 'ACAGGGAGA'}
conseqs = remap.sam_to_conseqs(sam_file)
self.assertDictEqual(expected_conseqs, conseqs)
开发者ID:cfe-lab,项目名称:MiCall,代码行数:8,代码来源:test_remap.py
示例6: testSoftClip
def testSoftClip(self):
sam_file = StringIO(
"@SQ\tSN:test\n"
"test1\t99\ttest\t1\t44\t3S5M1S\t=\t1\t9\tACAGGGAGA\tJJJJJJJJJ\n"
)
expected_conseqs = {'test': 'GGGAG'}
conseqs = remap.sam_to_conseqs(sam_file)
self.assertDictEqual(expected_conseqs, conseqs)
开发者ID:cfe-lab,项目名称:MiCall,代码行数:8,代码来源:test_remap.py
示例7: testExtraFields
def testExtraFields(self):
sam_file = StringIO(
"@SQ\tSN:test\n"
"test1\t99\ttest\t1\t44\t3M\t=\t1\t3\tACA\tJJJ\tAS:i:236\tNM:i:12\n"
)
expected_conseqs = {'test': 'ACA'}
conseqs = remap.sam_to_conseqs(sam_file)
self.assertDictEqual(expected_conseqs, conseqs)
开发者ID:cfe-lab,项目名称:MiCall,代码行数:8,代码来源:test_remap.py
示例8: testLowQualityAtEnd
def testLowQualityAtEnd(self):
sam_file = StringIO(
"@SQ\tSN:test\n"
"test1\t99\ttest\t1\t44\t3M\t=\t1\t3\tACG\tJJ/\n"
)
expected_conseqs = {'test': 'ACN'}
conseqs = remap.sam_to_conseqs(sam_file, quality_cutoff=32)
self.assertDictEqual(expected_conseqs, conseqs)
开发者ID:cfe-lab,项目名称:MiCall,代码行数:8,代码来源:test_remap.py
示例9: testHeaderFields
def testHeaderFields(self):
sam_file = StringIO(
"@SQ\tOF:other field: ignored\tSN:test\n"
"test1\t99\ttest\t1\t44\t3M\t=\t1\t3\tACA\tJJJ\n"
)
expected_conseqs = {'test': 'ACA'}
conseqs = remap.sam_to_conseqs(sam_file)
self.assertDictEqual(expected_conseqs, conseqs)
开发者ID:cfe-lab,项目名称:MiCall,代码行数:8,代码来源:test_remap.py
示例10: testOffset
def testOffset(self):
sam_file = StringIO(
"@SQ\tSN:test\n"
"test1\t147\ttest\t4\t44\t12M\t=\t3\t-12\tACAAGACCCAAC\tJJJJJJJJJJJJ\n"
)
expected_conseqs = {'test': 'NNNACAAGACCCAAC'}
conseqs = remap.sam_to_conseqs(sam_file)
self.assertDictEqual(expected_conseqs, conseqs)
开发者ID:cfe-lab,项目名称:MiCall,代码行数:8,代码来源:test_remap.py
示例11: testBigDeletionWithFrameShift
def testBigDeletionWithFrameShift(self):
sam_file = StringIO(
"@SQ\tSN:test\n"
"test1\t99\ttest\t1\t44\t3M4D3M\t=\t3\t6\tACAGGG\tJJJJJJ\n"
)
expected_conseqs = {'test': 'ACA----GGG'}
conseqs = remap.sam_to_conseqs(sam_file)
self.assertDictEqual(expected_conseqs, conseqs)
开发者ID:cfe-lab,项目名称:MiCall,代码行数:8,代码来源:test_remap.py
示例12: testUnknownReferenceName
def testUnknownReferenceName(self):
sam_file = StringIO(
"@SQ\tSN:testX\n"
"test1\t99\ttestY\t1\t44\t12M\t=\t1\t3\tACA\tJJJ\n"
)
expected_conseqs = {}
conseqs = remap.sam_to_conseqs(sam_file)
self.assertDictEqual(expected_conseqs, conseqs)
开发者ID:cfe-lab,项目名称:MiCall,代码行数:8,代码来源:test_remap.py
示例13: testDeletion
def testDeletion(self):
samIO = StringIO.StringIO(
"@SQ\tSN:test\n"
"test1\t99\ttest\t1\t44\t3M3D3M\t=\t3\t6\tACAGGG\tJJJJJJ\n"
)
expected_conseqs = {'test': 'ACAGGG'}
conseqs = remap.sam_to_conseqs(samIO)
self.assertDictEqual(expected_conseqs, conseqs)
开发者ID:tarah28,项目名称:MiCall,代码行数:8,代码来源:remap_test.py
示例14: testTie
def testTie(self):
sam_file = StringIO(
"@SQ\tSN:test\n"
"test1\t99\ttest\t1\t44\t3M\t=\t1\t3\tGCA\tJJJ\n"
"test2\t147\ttest\t1\t44\t3M\t=\t1\t-3\tTCA\tJJJ\n"
)
expected_conseqs = {'test': 'GCA'}
conseqs = remap.sam_to_conseqs(sam_file)
self.assertDictEqual(expected_conseqs, conseqs)
开发者ID:cfe-lab,项目名称:MiCall,代码行数:9,代码来源:test_remap.py
示例15: testSimple
def testSimple(self):
# SAM:qname, flag, rname, pos, mapq, cigar, rnext, pnext, tlen, seq, qual
sam_file = StringIO(
"@SQ\tSN:test\n"
"test1\t99\ttest\t1\t44\t12M\t=\t1\t12\tACAAGACCCAAC\tJJJJJJJJJJJJ\n"
)
expected_conseqs = {'test': 'ACAAGACCCAAC'}
conseqs = remap.sam_to_conseqs(sam_file)
self.assertDictEqual(expected_conseqs, conseqs)
开发者ID:cfe-lab,项目名称:MiCall,代码行数:9,代码来源:test_remap.py
示例16: testLowQualityForward
def testLowQualityForward(self):
sam_file = StringIO(
"@SQ\tSN:test\n"
"test1\t99\ttest\t1\t44\t3M\t=\t3\t3\tATA\tJJA\n"
"test1\t147\ttest\t3\t44\t3M\t=\t1\t-3\tGCC\tJJJ\n"
)
expected_conseqs = {'test': 'ATGCC'}
conseqs = remap.sam_to_conseqs(sam_file)
self.assertDictEqual(expected_conseqs, conseqs)
开发者ID:cfe-lab,项目名称:MiCall,代码行数:9,代码来源:test_remap.py
示例17: testReverseLeftOfForward
def testReverseLeftOfForward(self):
sam_file = StringIO(
"@SQ\tSN:test\n"
"test1\t99\ttest\t2\t44\t1M\t=\t1\t1\tC\tJ\n"
"test1\t147\ttest\t1\t44\t1M\t=\t2\t-1\tA\tJ\n"
)
expected_conseqs = {'test': 'AC'}
conseqs = remap.sam_to_conseqs(sam_file)
self.assertDictEqual(expected_conseqs, conseqs)
开发者ID:cfe-lab,项目名称:MiCall,代码行数:9,代码来源:test_remap.py
示例18: testInsertionAndOffset
def testInsertionAndOffset(self):
sam_file = StringIO(
"@SQ\tSN:test\n"
"test1\t99\ttest\t1\t44\t3M3I3M\t=\t1\t9\tACAGGGAGA\tJJJJJJJJJJJJ\n"
"test2\t99\ttest\t5\t44\t5M\t=\t1\t5\tGACCC\tJJJJJ\n"
)
expected_conseqs = {'test': 'ACAGGGAGACCC'}
conseqs = remap.sam_to_conseqs(sam_file)
self.assertDictEqual(expected_conseqs, conseqs)
开发者ID:cfe-lab,项目名称:MiCall,代码行数:9,代码来源:test_remap.py
示例19: testComplexInsertion
def testComplexInsertion(self):
# Insertions are ignored if not a multiple of three
sam_file = StringIO(
"@SQ\tSN:test\n"
"test1\t99\ttest\t1\t44\t3M1I3M2I6M\t=\t1\t12\tACAGAGAGGCCCAAC\tJJJJJJJJJJJJJJJ\n"
)
expected_conseqs = {'test': 'ACAAGACCCAAC'}
conseqs = remap.sam_to_conseqs(sam_file)
self.assertDictEqual(expected_conseqs, conseqs)
开发者ID:cfe-lab,项目名称:MiCall,代码行数:9,代码来源:test_remap.py
示例20: testDeletionInSomeReads
def testDeletionInSomeReads(self):
sam_file = StringIO(
"@SQ\tSN:test\n"
"test1\t99\ttest\t1\t44\t3M3D3M\t=\t3\t6\tACAGGG\tJJJJJJ\n"
"test2\t99\ttest\t1\t44\t3M3D3M\t=\t3\t6\tACAGGG\tJJJJJJ\n"
"test3\t99\ttest\t1\t44\t9M\t=\t3\t9\tACATTTGGG\tJJJJJJJJJ\n"
)
expected_conseqs = {'test': 'ACATTTGGG'}
conseqs = remap.sam_to_conseqs(sam_file)
self.assertDictEqual(expected_conseqs, conseqs)
开发者ID:cfe-lab,项目名称:MiCall,代码行数:10,代码来源:test_remap.py
注:本文中的micall.core.remap.sam_to_conseqs函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论