Ejemplo n.º 1
0
# <codecell>

from itertools import product

list(product('abcdefg', range(5)))

# <codecell>


fields = ['Name','RegionName', 'QueryNucStart','QueryNucStop','QueryNuc',
'RegionNucStart','RegionNucStop','RegionAAStart', 'RegionAAStop', 'QueryAA']
with open('TestData/LocatorRes.tsv', 'w') as handle:
    writer = csv.DictWriter(handle, fields, delimiter='\t')
    writer.writeheader()
    for row in process_seqs(input_seqs, extract_regions = True):
        writer.writerow(row)
        #print row
            
#raise KeyError
    
        

# <codecell>

import csv
headers = ['Name', 'RegionName', 'QueryNucStart', 'QueryNucStop', 'QueryNuc',
           'RegionNucStart', 'RegionNucStop', 'RegionAAStart','RegionAAStop','QueryAA']
with open('test_output.tsv', 'w') as handle:
    writer = csv.DictWriter(handle, headers, delimiter='\t')
    found_pats = set()
# <codecell>

!/home/will/staden-2.0.0b9.x86_64/bin/convert_trace --help

# <codecell>

res = call_muscle(seqs)
with open('align_data.fasta', 'w') as handle:
    fasta_writer(handle, res)

# <codecell>

from HIVTransTool import process_seqs

results = list(process_seqs(seqs[:50], extract_regions = True, known_names = 50))

# <codecell>

for row in results:
    if row['RegionName'] == 'LTR5':
        print row['Name'], row['QueryNuc']

# <codecell>

results[:5]

# <codecell>