Mercurial > repos > dchristiany > data_manager_proteore
diff data_manager/resource_building.py @ 29:871a7347ca24 draft
planemo upload commit c89c5deac442c0c2aa52b24f2c5af4b290773fc0-dirty
author | dchristiany |
---|---|
date | Mon, 28 Jan 2019 05:16:55 -0500 |
parents | d235909789ca |
children | b8271b9a1049 |
line wrap: on
line diff
--- a/data_manager/resource_building.py Fri Jan 25 09:38:35 2019 -0500 +++ b/data_manager/resource_building.py Mon Jan 28 05:16:55 2019 -0500 @@ -60,17 +60,16 @@ # 2. Peptide Atlas ####################################################################################################### def peptide_atlas_sources(data_manager_dict, tissue, target_directory): - # Define PA Human build released number (here early 2018) - atlas_build_id = "472" # 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 - sample_category_id = tissue.split("-")[0] - output_file = tissue.split("-")[1] +"_"+ time.strftime("%d-%m-%Y") + ".tsv" - query = "https://db.systemsbiology.net/sbeams/cgi/PeptideAtlas/GetPeptides?atlas_build_id=" + \ - atlas_build_id + "&display_options=ShowMappings&organism_id= " + \ - organism_id + "&sample_category_id=" + sample_category_id + \ - "&QUERY_NAME=AT_GetPeptides&output_mode=tsv&apply_action=QUERY" + tissue=tissue.split(".") + sample_category_id = tissue[0] + name = tissue[1] + output_file = name+"_"+time.strftime("%d-%m-%Y") + ".tsv" + query="https://db.systemsbiology.net/sbeams/cgi/PeptideAtlas/GetProteins?&atlas_build_id="+sample_category_id+ \ + "&display_options=ShowAbundances&organism_id="+organism_id+"&redundancy_constraint=4&presence_level_constraint=1%2C2"+ \ + "&gene_annotation_level_constraint=leaf&QUERY_NAME=AT_GetProteins&action=QUERY&output_mode=tsv&apply_action=QUERY" download = requests.get(query) decoded_content = download.content.decode('utf-8') cr = csv.reader(decoded_content.splitlines(), delimiter='\t')