-
Notifications
You must be signed in to change notification settings - Fork 0
/
find sf_lf.py
34 lines (31 loc) · 1.27 KB
/
find sf_lf.py
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
# -*- coding: utf-8 -*-
"""
Created on Wed Oct 19 14:37:35 2016
@author: chahat
"""
import re
import os
from acronym_extract_github_code import extract_acronym
for path, dirs, files in os.walk(r'/media/chahat/Krishna/F DRIVE/M.Tech/for assigning cl/selected/mouse in random 500_l'):
for file in files:
sentences = open(os.path.join(path,file)).readlines();
r=0
rr=0
rt=0
gs_cl=[]
hg=''
for s in sentences:
if s.startswith('!Series_type'):
if s.startswith('!Series_type\t"Expression profiling by array"'):
rr=1
if (rr==1):
acrolist=[]
for s in sentences:
s = s.rstrip()
if s.startswith('!Series_title') or s.startswith('!Series_summary') or s.startswith('!Series_overall_design'):
# s = s.lower()
SfLf_list = extract_acronym(s, search='complex')
if SfLf_list:
print (SfLf_list)
# After trying the code as it is, with the complex and reduced2 modes - 4 matches were found.
# In the reduced1 and simple modes - acro's were found with their counts - no definitions