Statistics
| Branch: | Revision:

root / Am1.0 / buildscaffold.py @ 8c368a17

History | View | Annotate | Download (403 Bytes)

1
print 'ROOT\tchromosome\t0\nROOT\tcontig\t0'
2

    
3
fout=open('longstr','w')
4

    
5
with open('chromlen') as fin:
6
        for line in fin:
7
                lst=line.rstrip().split('\t')
8
                if lst[0].startswith('Scaffold') or lst[0].startswith('scaffold'):
9
                        print 'chromosome\t{0}\t{1}'.format(lst[0],lst[1])
10
                        fout.write(lst[0]+',')
11
                else:
12
                        print 'contig\t{0}\t{1}'.format(lst[0],lst[1])
13
fout.write('\n')
14
fout.close()
15

    
16
# sort -k2nr