From 13c2c54f5150a70e7b2d72c90346dd140474b860 Mon Sep 17 00:00:00 2001
From: LauraU123 <laura.urbanska@stud.unibas.ch>
Date: Fri, 2 Dec 2022 11:12:50 +0100
Subject: [PATCH] updated exe script

---
 scripts/new_exe.py | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/scripts/new_exe.py b/scripts/new_exe.py
index e2bdb31..c074272 100644
--- a/scripts/new_exe.py
+++ b/scripts/new_exe.py
@@ -5,19 +5,18 @@ import representative as rtcl
 import poisson_sampling as ps
 import writegtf as gt
 import match_reprtranscript_expressionlevel as ma
-
-
-def exe(input_file, csv, gtf, transcript_nr):
-    file_name,source_pathway_name_2,deposit_pathway_name_2 = te.extract_transcript(input_file, deposit_pathway_name = True, Input_free = Input_free)
+​
+def exe(input_file, csv, gtf, transcript_nr,input_free = True):
+    file_name,source_pathway_name_2,deposit_pathway_name_2 = te.extract_transcript(input_file, Input_free = input_free)
     inter_mediate_file_directory = input_file +"_intermediate_file.txt"
-
+​
     print("Transcripts are filtered based on transcript score. Please wait...")
-
+​
     pre_filter_representative_transcripts_dict = rtcl.find_repr_by_SupportLevel(inter_mediate_file_directory)
-
+​
     print("Transcripts filtered\n")
-    elf.exon_length_filter(file_name,gen_dict= pre_filter_representative_transcripts_dict, Input_free = True)
-
+    elf.exon_length_filter(file_name,gen_dict= pre_filter_representative_transcripts_dict, Input_free = input_free)
+​
     tsv_input = ma.output_tsv()
     print("Poisson sampling of transcripts")
     ps.transcript_sampling(transcript_nr, tsv_input, csv)
@@ -25,9 +24,9 @@ def exe(input_file, csv, gtf, transcript_nr):
     
     print("writing output gtf file")
     gt.gtf_file_writer(input_file, csv, gtf)
-
-
-
+​
+​
+​
 if __name__ == '__main__':
     parser = argparse.ArgumentParser(
         description="transcript sampler",
@@ -38,4 +37,4 @@ if __name__ == '__main__':
     parser.add_argument("--output_gtf", required=True, help="output gtf file")
     parser.add_argument("--transcript_number", required=True, help="total number of transcripts to sample")
     args = parser.parse_args()
-    exe(args.annotation, args.output_csv, args.output_gtf, args.transcript_number)
\ No newline at end of file
+    exe(args.annotation, args.output_csv, args.output_gtf, args.transcript_number)
-- 
GitLab