Skip to content
Snippets Groups Projects
Commit 38880ee0 authored by Max Bär's avatar Max Bär
Browse files

Merge branch 'feature_max' into 'main'

First Ideas on the Postprocess module

See merge request !23
parents bf908502 97e28760
Branches
No related tags found
1 merge request!23First Ideas on the Postprocess module
# -*- coding: utf-8 -*-
"""
Created on Wed Nov 16 17:48:04 2022
@author: baerma
"""
# with open("RIBlast output example.txt", 'r') as file:
# content = file.readlines()
# print(content[3:][0].strip(' \n').split(',')[-1].strip('()').split(':'))
# #create a instant of each transcript class
# print(len(content[3:]))
# print((content[3:]))
class CreateTranscript():
def __init__(self):
with open("RIBlast output example.txt", 'r') as file:
self.list_of_interactions = file.readlines()[3:]
def generate_interaction_list(self):
interaction_list = []
for i in range(0, (len(self.list_of_interactions)-1)):
current_interaction = self.list_of_interactions[i].strip(' \n').split(',')
#print(self.list_of_interactions[i].strip(' \n').split(','))
interaction_list.append(current_interaction)
return interaction_list
transcriptlist = CreateTranscript()
print(transcriptlist.generate_interaction_list())
#go from interaction list to transcript list? -no we will serve them a interaction list.
# print(content[3:][0].strip(' \n').split(',')[-1].strip('()').split(':'))
...@@ -4,11 +4,14 @@ Created on Wed Nov 16 16:47:20 2022 ...@@ -4,11 +4,14 @@ Created on Wed Nov 16 16:47:20 2022
@author: baerma @author: baerma
""" """
import csv
with open("RIBlast output example.txt", 'r') as file: with open("RIBlast output example.txt", 'r') as file:
content = file.readlines() content = file.readlines()
print(content[3:][0]) print(content[3:][0].strip(' \n').split(',')[-1].strip('()').split(':'))
#create a instant of each transcript class
#os.chdir('C:/Users/baerma/Desktop/PhD-Local/Lectures/Programming for Life Sciences/priming-site-predictor/primingsitepredictor') #os.chdir('C:/Users/baerma/Desktop/PhD-Local/Lectures/Programming for Life Sciences/priming-site-predictor/primingsitepredictor')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment