-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathecoparser.py
More file actions
51 lines (31 loc) · 1.07 KB
/
ecoparser.py
File metadata and controls
51 lines (31 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#coding=utf8
import time
import timeit
import os
import sqlite3
# Зверь A T G C GenomeLength GenerationLength TotalLengthOfAllDirectRepeatsReal TotalLengthOfAllDirectRepeatsPseudo001 TotalLengthOfAllDirectRepeatsPseudo002 ... TotalLengthOfAllDirectRepeatsPseudo100
pgen_path = 'Raw\\MammalsGenomesEcology.txt'
pgen = open(pgen_path, "r")
# Species Sequence GenerationLength_d REP.DirRepLength GenomeLength A T G C
# Acinonyx_jubatus genome 2190 3403 17047 5642 4693 2315 4397
path3=("eco.csv")
reps = open(path3, "w")
string = pgen.readline()
#pr=1
while True:
string = pgen.readline().strip()
if string == "":
break
strarr= string.split(" ")
name = strarr[0]
genome = strarr[1]
generlen= strarr[2]
dirreplrn= strarr[3]
genomelen= strarr[4]
a= strarr[5]
t= strarr[6]
g= strarr[7]
c= strarr[8]
print (name,c)
reps.write("%s;%s;%s;%s;%s;%s;%s\n" % (name,a,t,g,c,genomelen,generlen))
#pr=pr+1