Mercurial > repos > trinity_ctat > ctat_genome_resource_libs_data_manager_3
changeset 52:0e3e4f24e300 draft
Adding ctat_cravat_tissues table.
author | trinity_ctat |
---|---|
date | Tue, 06 Nov 2018 11:53:38 -0500 |
parents | 0a4bec29a609 |
children | 9fdaeb356e22 |
files | data_manager/add_ctat_resource_lib.py data_manager/add_ctat_resource_lib.xml data_manager_conf.xml tool-data/cravat_tissues.loc.sample tool-data/ctat_cravat_tissues.loc.sample tool_data_table_conf.xml.sample |
diffstat | 6 files changed, 68 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/data_manager/add_ctat_resource_lib.py Fri Nov 02 14:17:08 2018 -0400 +++ b/data_manager/add_ctat_resource_lib.py Tue Nov 06 11:53:38 2018 -0500 @@ -1324,6 +1324,12 @@ 'Normally they are assumed to reside in the build directory, ' + \ 'but if that directory has not been created yet when this program ' + \ 'is called, you can specify the full path to the directory where they reside.') + parser.add_argument('-t', '--cravat_tissues_filepath', + default='', \ + help='Specify a non-default location where the Cosmic files reside. ' + \ + 'Normally they are assumed to reside in the build directory, ' + \ + 'but if that directory has not been created yet when this program ' + \ + 'is called, you can specify the full path to the directory where they reside.') # Method 1) arguments - Download and Build. # - One can optionally utilize --build_location argument with this group of arguments. download_and_build_args = parser.add_argument_group('Download and Build arguments') @@ -1546,6 +1552,17 @@ data_manager_dict['data_tables']['ctat_genome_resource_libs'] = [] data_table_entry = dict(value=unique_id, name=display_name, path=genome_build_directory) data_manager_dict['data_tables']['ctat_genome_resource_libs'].append(data_table_entry) + + # Create the data table for the cravat_tissues, if the file is given: + if (args.cravat_tissues_filepath is not None) and (args.cravat_tissues_filepath != ""): + data_manager_dict['data_tables']['ctat_cravat_tissues'] = [] + cravat_file = open(args.cravat_tissues_filepath, 'r') + for line in cravat_file: + if line[0] != '#': + # The line is not a comment, so parse it. + items = [item.strip() for item in line.split("\t")] + data_table_entry = dict(value=items[0], name=items[1], code=items[2], date=items[3]) + data_manager_dict['data_tables']['ctat_cravat_tissues'].append(data_table_entry) # Temporarily the output file's dictionary is written for debugging: print "The dictionary for the output file is:\n\t{:s}".format(str(data_manager_dict))
--- a/data_manager/add_ctat_resource_lib.xml Fri Nov 02 14:17:08 2018 -0400 +++ b/data_manager/add_ctat_resource_lib.xml Tue Nov 06 11:53:38 2018 -0500 @@ -14,7 +14,8 @@ <![CDATA[ python $__tool_directory__/add_ctat_resource_lib.py --output_filename="${out_file}" - --display_name="${display_name}" + --display_name="${display_name}" + --cravat_tissues_filepath="${__tool_directory__}/../tool-data/ctat_cravat_tissues.loc.sample" #if str( $genome_resource_library.build_type ) == "download_and_build": --download_url="${genome_resource_library.download_url}" --download_location="${genome_resource_library.download_destination}" @@ -188,7 +189,8 @@ Neither the "source_data" nor the "plug-n-play" versions have Mutation Resources included. Those must be downloaded separately and integrated into the Library. If you are going to be using the - ctat_mutations tool, check the Download Mutation Library check box. + ctat_mutations tool, check the Download Mutation Library check box. Whether or not you check this box, the + ctat_cravat_tissues table needed by the ctat_mutations tool will be created. In order to integrate the Mutation Resources into a CTAT Genome Resource Library, you must have previously downloaded COSMIC resources (See Step 2 from https://github.com/NCIP/ctat-mutations/tree/master/mutation_lib_prep )
--- a/data_manager_conf.xml Fri Nov 02 14:17:08 2018 -0400 +++ b/data_manager_conf.xml Tue Nov 06 11:53:38 2018 -0500 @@ -34,5 +34,21 @@ <!--</column> --> </output> </data_table> + <data_table name="ctat_cravat_tissues"> + <output> + <column name="value" /> + <!-- value is used to uniquely identify this entry in the table. + --> + <column name="name" /> + <!-- name is used as the selector in the pull down lists for items in this table. + --> + <column name="code" /> + <!-- . + --> + <column name="date" /> + <!-- . + --> + </output> + </data_table> </data_manager> </data_managers>
--- a/tool-data/cravat_tissues.loc.sample Fri Nov 02 14:17:08 2018 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -Bladder Bladder Urothelial Carcinoma BLCA (TCGA) Jun 2013 -Blood-Lymphocyte Chronic Lymphocytic Leukemia CLL (ICGC) Mar 2013 -Blood-Myeloid Acute Myeloid Leukemia LAML (TCGA) Jun 2013 -Brain-Cerebellum Medulloblastoma MB (mixed source) Dec 2010 -Brain-Glioblastoma-Multiforme Glioblastoma Multiforme GBM (TCGA) Jun 2013 -Brain-Lower-Grade-Glioma Brain Lower Grade Glioma LGG (TCGA) Jun 2013 -Breast Breast Invasive Carcinoma BRCA (TCGA) Jun 12012 -Cervix Cervical Squamous Cell Carcinoma and Endocervical Adenocarcinoma CESC (TCGA) Jun 2013 -Colon Colon Adenocarcinoma COAD (TCGA) Jun 2013 -Head and Neck Head and Neck Squamous Cell Carcinoma HNSC (TCGA) Jun 2013 -Kidney-Chromophobe Kidney Chromophobe KICH (TCGA) Jun 2013 -Kidney-Clear-Cell Kidney Renal Clear Cell Carcinoma KIRC (TCGA) Jun 2013 -Kidney-Papillary-Cell Kidney Renal Papillary Cell Carcinoma KIRP (TCGA) Jun 2013 -Liver-Nonviral Hepatocellular Carcinoma (Secondary to Alcohol and Adiposity) HCCA (ICGC) Mar 2013 -Liver-Viral Hepatocellular Carcinoma (Viral) HCCV (ICGC) Mar 2013 -Lung-Adenocarcinoma Lung Adenocarcinoma LUAD (TCGA) Jun 2013 -Lung-Squamous Cell Lung Squamous Cell Carcinoma LUSC (TCGA) Jun 2013 -Melanoma Melanoma ML (Yardena Samuels lab) Dec 2011 -Other General purpose OV (TCGA) Jun 2013 -Ovary Ovarian Serous Cystadenocarcinoma OV (TCGA) Jun 2013 -Pancreas Pancreatic Cancer PNCC (ICGC)) Mar 2013 -Prostate-Adenocarcinoma Prostate Adenocarcinoma PRAD (TCGA) Jun 2013 -Rectum Rectum Adenocarcinoma READ (TCGA) Jun 2013 -Skin Skin Cutaneous Melanoma SKCM (TCGA) Jun 2013 -Stomach Stomach Adenocarcinoma STAD (TCGA) Jun 2013 -Thyroid Thyroid Carcinoma THCA (TCGA) Jun 2013 -Uterus Uterine Corpus Endometriod Carcinoma UCEC (TCGA) Jun 2013
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool-data/ctat_cravat_tissues.loc.sample Tue Nov 06 11:53:38 2018 -0500 @@ -0,0 +1,27 @@ +Bladder Bladder Urothelial Carcinoma BLCA (TCGA) Jun 2013 +Blood-Lymphocyte Chronic Lymphocytic Leukemia CLL (ICGC) Mar 2013 +Blood-Myeloid Acute Myeloid Leukemia LAML (TCGA) Jun 2013 +Brain-Cerebellum Medulloblastoma MB (mixed source) Dec 2010 +Brain-Glioblastoma-Multiforme Glioblastoma Multiforme GBM (TCGA) Jun 2013 +Brain-Lower-Grade-Glioma Brain Lower Grade Glioma LGG (TCGA) Jun 2013 +Breast Breast Invasive Carcinoma BRCA (TCGA) Jun 12012 +Cervix Cervical Squamous Cell Carcinoma and Endocervical Adenocarcinoma CESC (TCGA) Jun 2013 +Colon Colon Adenocarcinoma COAD (TCGA) Jun 2013 +Head and Neck Head and Neck Squamous Cell Carcinoma HNSC (TCGA) Jun 2013 +Kidney-Chromophobe Kidney Chromophobe KICH (TCGA) Jun 2013 +Kidney-Clear-Cell Kidney Renal Clear Cell Carcinoma KIRC (TCGA) Jun 2013 +Kidney-Papillary-Cell Kidney Renal Papillary Cell Carcinoma KIRP (TCGA) Jun 2013 +Liver-Nonviral Hepatocellular Carcinoma (Secondary to Alcohol and Adiposity) HCCA (ICGC) Mar 2013 +Liver-Viral Hepatocellular Carcinoma (Viral) HCCV (ICGC) Mar 2013 +Lung-Adenocarcinoma Lung Adenocarcinoma LUAD (TCGA) Jun 2013 +Lung-Squamous Cell Lung Squamous Cell Carcinoma LUSC (TCGA) Jun 2013 +Melanoma Melanoma ML (Yardena Samuels lab) Dec 2011 +Other General purpose OV (TCGA) Jun 2013 +Ovary Ovarian Serous Cystadenocarcinoma OV (TCGA) Jun 2013 +Pancreas Pancreatic Cancer PNCC (ICGC)) Mar 2013 +Prostate-Adenocarcinoma Prostate Adenocarcinoma PRAD (TCGA) Jun 2013 +Rectum Rectum Adenocarcinoma READ (TCGA) Jun 2013 +Skin Skin Cutaneous Melanoma SKCM (TCGA) Jun 2013 +Stomach Stomach Adenocarcinoma STAD (TCGA) Jun 2013 +Thyroid Thyroid Carcinoma THCA (TCGA) Jun 2013 +Uterus Uterine Corpus Endometriod Carcinoma UCEC (TCGA) Jun 2013
--- a/tool_data_table_conf.xml.sample Fri Nov 02 14:17:08 2018 -0400 +++ b/tool_data_table_conf.xml.sample Tue Nov 06 11:53:38 2018 -0500 @@ -3,4 +3,8 @@ <columns>value, name, path</columns> <file path="tool-data/ctat_genome_resource_libs.loc" /> </table> + <table name="ctat_cravat_tissues" comment_char="#" allow_duplicate_entries="False"> + <columns>value, name, code, date</columns> + <file path="tool-data/ctat_cravat_tissues.loc" /> + </table> </tables>