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

First unclead version able to generate GTF output file

parent d4d526f8
No related branches found
No related tags found
1 merge request!28First uncleaned version able to generate GTF output file
...@@ -62,7 +62,19 @@ class CreateTranscript(): ...@@ -62,7 +62,19 @@ class CreateTranscript():
return self.df return self.df
transcripts = CreateTranscript() transcripts = CreateTranscript()
interaction_df = transcripts.generate_interaction_df() interaction_df = transcripts.generate_interaction_df()
#print line by line to file and then you're done
output = str()
for i in interaction_df.index:
#print(interaction_df[3][i]+'\t' + 'RIBlast' + '\t' + 'Priming_site' + '\t' + interaction_df[13][i] + '\t' + interaction_df[12][i] + '\t' + '.' + '\t' + '+' + '\t' + '.' + '\t' + f'Accessibility_Energy "{interaction_df["Interaction Energy"][i]}"')
output = output + str(interaction_df[3][i]+'\t' + 'RIBlast' + '\t' + 'Priming_site' + '\t' + interaction_df[13][i] + '\t' + interaction_df[12][i] + '\t' + '.' + '\t' + '+' + '\t' + '.' + '\t' + f'Accessibility_Energy "{interaction_df["Interaction Energy"][i]}"' + '\n')
print(output)
with open('output_transcripts_df.txt', 'w') as f:
f.write(output)
Transcript_1 RIBlast Priming_site 2974 2988 . + . Accessibility_Energy "0.08051396365277928"
Transcript_1 RIBlast Priming_site 4 18 . + . Accessibility_Energy "0.17770481173297115"
Transcript_2 RIBlast Priming_site 1270 1284 . + . Accessibility_Energy "0.6445369481689498"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment