Mercurial > repos > dchristiany > data_manager_proteore
changeset 43:3febf3d1139a draft
planemo upload commit 9b701c1faf8be4835b4e7236780ee9ee26f9a373-dirty
author | dchristiany |
---|---|
date | Thu, 31 Jan 2019 08:40:52 -0500 |
parents | 5a37a086c9a8 |
children | f89f008bf80d |
files | data_manager/resource_building.py data_manager/resource_building.xml |
diffstat | 2 files changed, 10 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/data_manager/resource_building.py Tue Jan 29 11:08:07 2019 -0500 +++ b/data_manager/resource_building.py Thu Jan 31 08:40:52 2019 -0500 @@ -59,14 +59,14 @@ ####################################################################################################### # 2. Peptide Atlas ####################################################################################################### -def peptide_atlas_sources(data_manager_dict, tissue, target_directory): +def peptide_atlas_sources(data_manager_dict, tissue, date, target_directory): # Define organism_id (here Human) - to be upraded when other organism added to the project organism_id = "2" # Extract sample_category_id and output filename tissue=tissue.split(".") sample_category_id = tissue[0] tissue_name = tissue[1] - output_file = tissue_name+"_"+time.strftime("%d-%m-%Y") + ".tsv" + output_file = tissue_name+"_"+date + ".tsv" query="https://db.systemsbiology.net/sbeams/cgi/PeptideAtlas/GetProteins?&atlas_build_id="+ \ sample_category_id+"&display_options=ShowAbundances&organism_id="+organism_id+ \ @@ -81,7 +81,6 @@ uni_dict = build_dictionary(cr) #columns of data table peptide_atlas - date = time.strftime("%d-%m-%Y") tissue_id = tissue_name+"_"+date name = tissue_id.replace("-","/").replace("_"," ") path = os.path.join(target_directory,output_file) @@ -418,6 +417,7 @@ parser.add_argument("--id_mapping", metavar = ("ID_MAPPING_SPECIES")) parser.add_argument("--interactome", metavar = ("PPI")) parser.add_argument("--species") + parser.add_argument("--date") parser.add_argument("-o", "--output") args = parser.parse_args() @@ -442,13 +442,14 @@ ## Download source file from Peptide Atlas query try: peptide_atlas = args.peptideatlas + date = args.date except NameError: peptide_atlas = None if peptide_atlas is not None: #target_directory = "/projet/galaxydev/galaxy/tools/proteore/ProteoRE/tools/resources_building/test-data/" peptide_atlas = peptide_atlas.split(",") for pa_tissue in peptide_atlas: - peptide_atlas_sources(data_manager_dict, pa_tissue, target_directory) + peptide_atlas_sources(data_manager_dict, pa_tissue, date, target_directory) ## Download ID_mapping source file from Uniprot try:
--- a/data_manager/resource_building.xml Tue Jan 29 11:08:07 2019 -0500 +++ b/data_manager/resource_building.xml Thu Jan 31 08:40:52 2019 -0500 @@ -1,4 +1,4 @@ -<tool id="data_manager_proteore" name="Get source files for proteore tools" version="2019.01.29.3" tool_type="manage_data"> +<tool id="data_manager_proteore" name="Get source files for proteore tools" version="2019.01.31" tool_type="manage_data"> <description> to create or update reference files for proteore tools </description> @@ -14,11 +14,12 @@ --hpa "$database.tissues" #else if $database.database == "peptide_atlas" --peptideatlas="$database.tissues" + --date="$database.date" #else if $database.database == "id_mapping" --id_mapping="$database.species" #else if $database.database == "PPI" - --species="$database.species" - --interactome="$database.interactome" + --species="$database.base.species" + --interactome="$database.base.interactome" #end if --output "$output" @@ -60,6 +61,7 @@ <option value="422.Human_Urinary_bladder">Human Bladder proteome</option> <option value="423.Human_Urine">Human Urine proteome</option> </param> + <param name="date" type=text value="" label="enter the build date" help="for example: '2018-04'"/> </when> <when value="id_mapping"> <param name="species" type="select" multiple="false" label="Please select the species">