From 0bf05f15daaffe675979acccfc6b7542d8395997 Mon Sep 17 00:00:00 2001
From: David  BIKARD <david.bikard@pasteur.fr>
Date: Wed, 4 Dec 2019 16:23:58 +0100
Subject: [PATCH] cleaned-up the code a bit

---
 library_design/generate_library.py | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/library_design/generate_library.py b/library_design/generate_library.py
index a7bd326..9f89557 100644
--- a/library_design/generate_library.py
+++ b/library_design/generate_library.py
@@ -44,10 +44,6 @@ def add_annotations(targets,records):
     '''adds annotations to the dataframe providing the gene name (if present) or locus_tag and NaN if no gene name or locus tag is present.
     Returns a dataframe that only includes guides targeting regions marked as gene. 
     Guides target overlapping genes will be present on several rows, once with each seperate gene annotation'''
-    #targets['gene']='NaN' #defines new column gene in dataframe target that contains for all rows NaN, in case a gene name of locus tag is present NaN is overwritten
-    #targets['gene_ori']=None
-    #targets['targets_coding_strand']=None
-    #targets["second_half_gene"]=False
     genes_df=pd.DataFrame()
     
     for rec in records: 
@@ -72,7 +68,7 @@ def add_annotations(targets,records):
                 gene_df.loc[(gene_df.pos>start)&(gene_df.pos<end-int(L/2)),"second_half_gene"]=True
                 gene_df.loc[(gene_df.strand=="+"),'targets_coding_strand']=True
                 gene_df.loc[(gene_df.strand=="-"),'targets_coding_strand']=False
-            #targets.loc[in_gene]=gene_df
+
             genes_df=genes_df.append(gene_df)
             
     return genes_df
@@ -253,4 +249,4 @@ def generate_library(ref,n,output):
     #return library
 
 if __name__ == '__main__':
-    generate_library()
\ No newline at end of file
+    generate_library()
-- 
GitLab