changeset 5:c380b7da5b65 draft default tip

Uploaded
author ieguinoa
date Mon, 07 Jun 2021 16:33:53 +0000
parents bacd91d8b05a
children
files README.md data_manager/.Rhistory data_manager/data_manager_fetch_tx2gene.py data_manager_conf.xml tool_data_table_conf.xml.sample
diffstat 4 files changed, 9 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/README.md	Sun Oct 21 17:48:48 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-# data_manager_fetch_tx2gene
-Load entries in tx2gene table with transcript to gene tables or GTF/GFF file.
--- a/data_manager/data_manager_fetch_tx2gene.py	Sun Oct 21 17:48:48 2018 -0400
+++ b/data_manager/data_manager_fetch_tx2gene.py	Mon Jun 07 16:33:53 2021 +0000
@@ -27,7 +27,7 @@
 
 CHUNK_SIZE = 2**20  # 1mb
 
-DATA_TABLE_NAME = 'tx2gene'
+DATA_TABLE_NAME = 'tx2gene_table'
 
 def cleanup_before_exit( tmp_dir ):
     if tmp_dir and os.path.exists( tmp_dir ):
@@ -45,14 +45,14 @@
     sequence_id = params['param_dict']['sequence_id']
     if not sequence_id:
         sequence_id = dbkey #uuid.uuid4() generate and use an uuid instead?
-    
+
 #    if params['param_dict']['dbkey_source']['dbkey_source_selector'] == 'new':
 #        dbkey_name = params['param_dict']['dbkey_source']['dbkey_name']
 #        if not dbkey_name:
 #            dbkey_name = dbkey
 #    else:
 #        dbkey_name = None
-    dbkey = params['param_dict']['dbkey'] 
+    dbkey = params['param_dict']['dbkey']
     dbkey_name = dbkey_description
     sequence_name = params['param_dict']['sequence_name']
     if not sequence_name:
@@ -290,7 +290,6 @@
     parser.add_option( '-b', '--base_dir', dest='base_dir', action='store', type='string', default=None, help='base_dir')
     parser.add_option( '-t', '--type', dest='file_type', action='store', type='string', default=None, help='file_type')
     (options, args) = parser.parse_args()
-    
     filename = args[0]
     #global DATA_TABLE_NAME
     rscript_gff_to_tx2gene=os.path.join( options.base_dir, 'get_tx2gene_table.R')
@@ -298,14 +297,14 @@
     #input_type='gff_gtf'
     #if options.file_type != 'gff_gtf':
     # 	file_type='tx2gene'
-        
+
     params = loads( open( filename ).read() )
     target_directory = params[ 'output_data' ][0]['extra_files_path']
     os.mkdir( target_directory )
     data_manager_dict = {}
-    
+
     dbkey, dbkey_name, sequence_id, sequence_name = get_dbkey_dbname_id_name( params, dbkey_description=options.dbkey_description ) 
-    
+
     if dbkey in [ None, '', '?' ]:
         raise Exception( '"%s" is not a valid dbkey. You must specify a valid dbkey.' % ( dbkey ) )
 
@@ -318,6 +317,6 @@
         cleanup_before_exit(tmp_dir)
     #save info to json file
     open( filename, 'wb' ).write( dumps( data_manager_dict ).encode() )
-        
+
 if __name__ == "__main__":
     main()
--- a/data_manager_conf.xml	Sun Oct 21 17:48:48 2018 -0400
+++ b/data_manager_conf.xml	Mon Jun 07 16:33:53 2021 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <data_managers>
 <data_manager tool_file="data_manager/data_manager_fetch_tx2gene.xml" id="data_manager_fetch_tx2gene">
-      <data_table name="tx2gene">
+      <data_table name="tx2gene_table">
             <output>
                 <column name="value" />
                 <column name="dbkey" />
--- a/tool_data_table_conf.xml.sample	Sun Oct 21 17:48:48 2018 -0400
+++ b/tool_data_table_conf.xml.sample	Mon Jun 07 16:33:53 2021 +0000
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
 <tables>
-	<table name="tx2gene" comment_char="#" allow_duplicate_entries="False"><columns>value, dbkey, name, path</columns><file path="tool-data/tx2gene.loc" /></table>
+	<table name="tx2gene_table" comment_char="#" allow_duplicate_entries="False"><columns>value, dbkey, name, path</columns><file path="tool-data/tx2gene.loc" /></table>
 </tables>