# HG changeset patch # User iuc # Date 1698435880 0 # Node ID 480d9e9d156b67cd1789817b640f5cfdd58794d7 # Parent a62c4a11a67d72ef51782993ede339c5824444e8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ena_upload commit dccd4c0668ec8ce1b1c8fd9cef4dcf3a99dc78b3 diff -r a62c4a11a67d -r 480d9e9d156b README.md --- a/README.md Thu Nov 10 15:18:00 2022 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -# ena-upload-wrapper -Galaxy wrapper for ena-cli-upload - -This tool is shipped in a ready to use Galaxy container found [here](https://github.com/ELIXIR-Belgium/ena-upload-container). - -## Setting up credentials on Galaxy - -The admin of the server can set up global credentials through a file with the format: -``` -username: webin_id -password: webin_password -``` - -The path to this file must be exported as an environment variable called $GALAXY_ENA_SECRETS - -Alternatively, the admin can enable users to set their own credentials for this tool. -To enable it, make sure the file `config/user_preferences_extra_conf.yml` has the following section: - -``` - ena_webin_account: - description: Your ENA Webin account details - inputs: - - name: webin_id - label: ENA Webin ID - type: text - required: False - - name: password - label: Password - type: password - required: False -``` diff -r a62c4a11a67d -r 480d9e9d156b README.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.rst Fri Oct 27 19:44:40 2023 +0000 @@ -0,0 +1,42 @@ +ENA-upload-cli wrapper +====================== + +Galaxy wrapper of the +`ena-upload-cli `__. +Templates that can be used in as input for the metadata can be found +`here `__ + +This tool is shipped in a ready to use Galaxy container found +`here `__. + +Setting up credentials on Galaxy +-------------------------------- + +The admin of the server can set up global credentials through a file +with the format: + +.. code-block:: yaml + + username: webin_id + password: webin_password + +The path to this file must be exported as an environment variable called +$GALAXY_ENA_SECRETS + +Alternatively, the admin can enable users to set their own credentials +for this tool. To enable it, make sure the file +``config/user_preferences_extra_conf.yml`` has the following section: + +.. code-block:: yaml + + ena_webin_account: + description: Your ENA Webin account details + inputs: + - name: webin_id + label: ENA Webin ID + type: text + required: False + - name: password + label: Password + type: password + required: False diff -r a62c4a11a67d -r 480d9e9d156b ena_upload.xml --- a/ena_upload.xml Thu Nov 10 15:18:00 2022 +0000 +++ b/ena_upload.xml Fri Oct 27 19:44:40 2023 +0000 @@ -1,10 +1,11 @@ - + - 0.6.1 + 0.6.3 + 0 samples_macros.xml - ena-upload-cli + ena-upload-cli @@ -47,7 +48,7 @@ #if $action_options.input_format_conditional.input_format == "excel_tables": ln -s '$action_options.input_format_conditional.xlsx_file' ./xlsx_input.xlsx && #end if -#if $action_options.test_submit_parameters.dry_run == "false" and $action_options.test_submit == "False": +#if $action_options.test_submit_parameters.dry_run == "False" and $action_options.test_submit == "False": webin_id=`grep 'username' $credentials`; if [ "\$webin_id" = "" ]; then ## No credentials in user defined preferences @@ -57,7 +58,7 @@ credentials_path=\${GALAXY_ENA_SECRETS}; webin_id=`grep 'username' \$GALAXY_ENA_SECRETS`; if [ "\$webin_id" = "" ]; then - echo "No global credentials defined. Check your GALAXY_ENA_SECRETS file or set your credentials via: User -> Preferences -> Manage Information"; + echo "No global credentials defined. Check your GALAXY_ENA_SECRETS file or set your credentials via: User -> Preferences -> Manage Information"; exit 1; fi; #else: @@ -80,7 +81,7 @@ #for $run in $experiment.rep_runs: #for $file in $run.upload_files: #set $safename_reads_file = re.sub('[^\w\-_\.]', '_', $file.element_identifier) - #if $action_options.input_format_conditional.add_extension == "true": + #if $action_options.input_format_conditional.add_extension == "True": #set $extension = '.fastq' #else #set $extension = '' @@ -90,7 +91,7 @@ #set $safename_reads_file = $safename_reads_file + $extension + '.gz' gzip -c '$file' > $safename_reads_file && #else: - #if $action_options.input_format_conditional.add_extension == "true": + #if $action_options.input_format_conditional.add_extension == "True": #if $file.is_of_type('fastq.gz', 'fastqsanger.gz'): #set $compression = '.gz' #elif $file.is_of_type('fastqsanger.bz2', 'fastq.bz2'): @@ -148,14 +149,14 @@ #set $safename_reads_file = re.sub('[^\w\-_\.]', '_', $file.element_identifier) #if $file.is_of_type('fastq', 'fastqsanger'): ## always compress add the gz extension - #if $action_options.input_format_conditional.run_input_format_conditional.add_extension == "true": + #if $action_options.input_format_conditional.run_input_format_conditional.add_extension == "True": #set $safename_reads_file = $safename_reads_file + '.fastq.gz' #else #set $safename_reads_file = $safename_reads_file + '.gz' - #end if + #end if gzip -c '$file' > $safename_reads_file && #else - #if $action_options.input_format_conditional.run_input_format_conditional.add_extension == "true": + #if $action_options.input_format_conditional.run_input_format_conditional.add_extension == "True": #if $file.is_of_type('fastq.gz', 'fastqsanger.gz'): #set $extension = '.fastq.gz' #elif $file.is_of_type('fastqsanger.bz2', 'fastq.bz2'): @@ -172,7 +173,7 @@ #if $action_options.action == "add": ena-upload-cli - --tool 'ena-upload-cli v@VERSION@ @ Galaxy' + --tool 'ena-upload-cli v@TOOL_VERSION@ @ Galaxy' --action '$action_options.action' --center '$action_options.center' --secret \${credentials_path} @@ -180,7 +181,7 @@ #for $dataset in $files_to_upload: '$dataset' #end for -#if $action_options.test_submit_parameters.dry_run == "true": +#if $action_options.test_submit_parameters.dry_run == "True": --draft #end if #if $action_options.input_format_conditional.input_format != "excel_tables": @@ -196,17 +197,17 @@ --checklist $action_options.input_format_conditional.checklist_id #else: #if $action_options.input_format_conditional.input_format == "build_tables": - #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "true": + #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "True": --checklist ERC000033 #end if #else: --checklist $action_options.input_format_conditional.checklist_id #end if #end if -#if $action_options.idempotent == "true": +#if $action_options.idempotent == "True": --auto_action #end if -#if $action_options.test_submit_parameters.submit_dev == "true": +#if $action_options.test_submit_parameters.submit_dev == "True": -d #end if >> '$output'; @@ -216,7 +217,7 @@ #if $action_options.action == "modify": ena-upload-cli - --tool 'ena-upload-cli v@VERSION@ @ Galaxy' + --tool 'ena-upload-cli v@TOOL_VERSION@ @ Galaxy' --action '$action_options.action' --center '$action_options.center' --secret \${credentials_path} @@ -224,7 +225,7 @@ #for $dataset in $files_to_upload: '$dataset' #end for -#if $action_options.test_submit_parameters.dry_run == "true": +#if $action_options.test_submit_parameters.dry_run == "True": --draft #end if #if $action_options.input_format_conditional.input_format != "excel_tables": @@ -241,7 +242,7 @@ --checklist $action_options.input_format_conditional.checklist_id #else: #if $action_options.input_format_conditional.input_format == "build_tables": - #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "true": + #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "True": --checklist ERC000033 #end if #else: @@ -251,7 +252,7 @@ >> '$output'; #end if -#if $action_options.test_submit_parameters.dry_run == "false": +#if $action_options.test_submit_parameters.dry_run == "False": echo -e 'center_name\t$action_options.center' >> '$output'; echo -e 'action_option\t$action_options.action' >> '$output'; #end if @@ -305,12 +306,10 @@ $experiments.append({'title':str($experiment.experiment_title),'experiment_design':str($experiment.experiment_design),'library_strategy':str($experiment.library_strategy),'library_source':str($experiment.library_source),'library_selection':str($experiment.library_selection),'library_layout':str($experiment.library_layout),'insert_size':str($experiment.insert_size),'library_construction_protocol':str($experiment.library_construction_protocol),'platform':str($experiment.platform),'instrument_model':str($experiment.instrument_model),'runs':$runs}) #end for - #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "true": - + #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "True": $samples.append({'title':str($sample.sample_title),'description':str($sample.sample_description),'tax_name':str($sample.scientific_name),'tax_id':str($sample.tax_id),'collection_date':str($sample.collection_date),'geo_location':str($sample.geo_location_country),'host_common_name':str($sample.host_common_name),'host_subject_id':str($sample.host_subject_id),'host_health_state':str($sample.host_health_state),'host_sex':str($sample.host_sex),'host_scientific_name':str($sample.host_scientific_name),'collector_name':str($sample.collector_name),'collecting_institution':str($sample.collecting_institution),'isolate':str($sample.isolate),'experiments':$experiments}) #else: - -$samples.append({'title':str($sample.sample_title),'description':str($sample.sample_description),'tax_name':str($sample.scientific_name),'tax_id':str($sample.tax_id),'experiments':$experiments}) +$samples.append({'title':str($sample.sample_title),'description':str($sample.sample_description),'tax_name':str($sample.scientific_name),'tax_id':str($sample.tax_id),'collection_date':str($sample.collection_date),'geo_location':str($sample.geo_location_country),'experiments':$experiments}) #end if #end for $studies.append({'title':str($study.study_title),'type':str($study.study_type),'abstract':str($study.study_abstract),'pubmed_id':str($study.study_pubmed_id),'samples':$samples}) @@ -326,7 +325,7 @@ - + @@ -355,19 +354,19 @@ - +
- - + +
- + @@ -405,19 +404,19 @@
- +
- - + +
- + @@ -465,19 +464,19 @@
- +
- - + +
- + @@ -501,8 +500,8 @@ - - + + @@ -515,15 +514,15 @@
- +
- - + +
- + @@ -550,16 +549,16 @@
- +
- - + +
- + - + @@ -587,16 +586,16 @@
- +
- - + +
- + @@ -609,6 +608,8 @@ + + @@ -646,7 +647,7 @@ - + @@ -657,19 +658,21 @@
- - + +
- - + +
+ + - - + @@ -680,56 +683,8 @@ - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- - -
- - - - - - - - - - - - - - - - + + @@ -759,20 +714,20 @@
- - + +
- - + +
- + - + @@ -822,17 +777,17 @@
- - + +
- - + +
- + @@ -869,7 +824,7 @@ - + @@ -880,7 +835,7 @@ - + @@ -889,9 +844,9 @@
+ doi:10.1093/bioinformatics/btab421
diff -r a62c4a11a67d -r 480d9e9d156b extract_tables.py --- a/extract_tables.py Thu Nov 10 15:18:00 2022 +0000 +++ b/extract_tables.py Fri Oct 27 19:44:40 2023 +0000 @@ -40,21 +40,20 @@ for study_index, study in enumerate(studies_dict): study_alias = 'study_' + str(study_index) + '_' + timestamp studies_table.write('\t'.join([study_alias, action, study['title'], - study['type'], study['abstract'], study['pubmed_id'], - ])) - if "geo_location" in study['samples'][0].keys(): # sample belongs to a viral sample + study['type'], study['abstract'], study['pubmed_id']])) + if "host_subject_id" in study['samples'][0].keys(): # sample belongs to a viral sample samples_table.write('\t'.join(['alias', 'status', 'title', 'scientific_name', 'taxon_id', 'sample_description', 'collection date', 'geographic location (country and/or sea)', 'host common name', 'host subject id', 'host health state', 'host sex', 'host scientific name', - 'collector name', 'collecting institution', 'isolate', - ]) + '\n') + 'collector name', 'collecting institution', 'isolate']) + '\n') else: samples_table.write('\t'.join(['alias', 'status', 'title', 'scientific_name', - 'taxon_id', 'sample_description']) + '\n') + 'taxon_id', 'sample_description', 'collection date', + 'geographic location (country and/or sea)']) + '\n') for sample_index, sample in enumerate(study['samples']): sample_alias = 'sample_' + str(sample_index) + '_' + timestamp - if "geo_location" in sample.keys(): # sample belongs to a viral sample + if "host_subject_id" in sample.keys(): # sample belongs to a viral sample if sample['collector_name'] == '': sample['collector_name'] = 'unknown' samples_table.write('\t'.join([sample_alias, action, sample['title'], @@ -64,12 +63,13 @@ sample['host_subject_id'], sample['host_health_state'], sample['host_sex'], sample['host_scientific_name'], sample['collector_name'], - sample['collecting_institution'], sample['isolate'], + sample['collecting_institution'], sample['isolate'] ]) + '\n') else: samples_table.write('\t'.join([sample_alias, action, sample['title'], sample['tax_name'], sample['tax_id'], - sample['description']]) + '\n') + sample['description'], sample['collection_date'], + sample['geo_location']]) + '\n') for exp_index, exp in enumerate(sample['experiments']): exp_alias = 'experiment_' + str(exp_index) + '.' + str(sample_index) + '_' + timestamp lib_alias = 'library_' + str(exp_index) + '_' + str(sample_index) @@ -79,8 +79,7 @@ exp['library_source'], exp['library_selection'], exp['library_layout'].lower(), exp['insert_size'], exp['library_construction_protocol'], - exp['platform'], exp['instrument_model'], - ]) + '\n') + exp['platform'], exp['instrument_model']]) + '\n') run_index = 0 # exp['runs'] is a list of lists for (base_run, run_files) in exp['runs']: diff -r a62c4a11a67d -r 480d9e9d156b samples_macros.xml --- a/samples_macros.xml Thu Nov 10 15:18:00 2022 +0000 +++ b/samples_macros.xml Fri Oct 27 19:44:40 2023 +0000 @@ -44,9 +44,9 @@ -
- - +
+ +
@@ -57,7 +57,7 @@ - + @@ -68,7 +68,7 @@ - + @@ -81,19 +81,22 @@ - - - - + + + + - + - - + + + + + - + @@ -106,9 +109,9 @@ - - - + + + @@ -146,17 +149,17 @@ - + - + - + @@ -169,16 +172,9 @@ - - - - - - - - - - + + + @@ -187,75 +183,79 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + (^[0-9]{4}(-[0-9]{2}(-[0-9]{2}(T[0-9]{2}:[0-9]{2}(:[0-9]{2})?Z?([+-][0-9]{1,2})?)?)?)?(/[0-9]{4}(-[0-9]{2}(-[0-9]{2}(T[0-9]{2}:[0-9]{2}(:[0-9]{2})?Z?([+-][0-9]{1,2})?)?)?)?)?$)|(^not collected$)|(^not provided$)|(^restricted access$) - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff -r a62c4a11a67d -r 480d9e9d156b test-data/metadata_test_nonviral.xlsx Binary file test-data/metadata_test_nonviral.xlsx has changed diff -r a62c4a11a67d -r 480d9e9d156b test-data/metadata_test_nonviral_1_run.xlsx Binary file test-data/metadata_test_nonviral_1_run.xlsx has changed diff -r a62c4a11a67d -r 480d9e9d156b tool-data/geographic_location_1.loc.sample --- a/tool-data/geographic_location_1.loc.sample Thu Nov 10 15:18:00 2022 +0000 +++ b/tool-data/geographic_location_1.loc.sample Fri Oct 27 19:44:40 2023 +0000 @@ -1,7 +1,3 @@ -not applicable -not collected -not provided -restricted access Afghanistan Albania Algeria @@ -277,3 +273,15 @@ Yemen Zambia Zimbabwe +missing: control sample +missing: data agreement established pre-2023 +missing: endangered species +missing: human-identifiable +missing: lab stock +missing: sample group +missing: synthetic construct +missing: third party data +not applicable +not collected +not provided +restricted access diff -r a62c4a11a67d -r 480d9e9d156b tool-data/host_sex_1.loc.sample --- a/tool-data/host_sex_1.loc.sample Thu Nov 10 15:18:00 2022 +0000 +++ b/tool-data/host_sex_1.loc.sample Fri Oct 27 19:44:40 2023 +0000 @@ -1,9 +1,17 @@ -other +female +hermaphrodite +male +missing: control sample +missing: data agreement established pre-2023 +missing: endangered species +missing: human-identifiable +missing: lab stock +missing: sample group +missing: synthetic construct +missing: third party data +neuter not applicable -not provided -neuter not collected -female +not provided +other restricted access -male -hermaphrodite diff -r a62c4a11a67d -r 480d9e9d156b tool-data/instrument_model.loc.sample --- a/tool-data/instrument_model.loc.sample Thu Nov 10 15:18:00 2022 +0000 +++ b/tool-data/instrument_model.loc.sample Fri Oct 27 19:44:40 2023 +0000 @@ -1,58 +1,75 @@ -minION -GridION -PromethION 454 GS 454 GS 20 454 GS FLX +454 GS FLX Titanium 454 GS FLX+ -454 GS FLX Titanium 454 GS Junior +AB 310 Genetic Analyzer +AB 3130 Genetic Analyzer +AB 3130xL Genetic Analyzer +AB 3500 Genetic Analyzer +AB 3500xL Genetic Analyzer +AB 3730 Genetic Analyzer +AB 3730xL Genetic Analyzer +AB 5500 Genetic Analyzer +AB 5500xl Genetic Analyzer +AB 5500xl-W Genetic Analysis System +AB SOLiD 3 Plus System +AB SOLiD 4 System +AB SOLiD 4hq System +AB SOLiD PI System +AB SOLiD System +AB SOLiD System 2.0 +AB SOLiD System 3.0 +BGISEQ-50 +BGISEQ-500 +Complete Genomics +DNBSEQ-G400 +DNBSEQ-G400 FAST +DNBSEQ-G50 +DNBSEQ-T7 +Element AVITI +GridION +Helicos HeliScope +HiSeq X Five +HiSeq X Ten Illumina Genome Analyzer Illumina Genome Analyzer II Illumina Genome Analyzer IIx +Illumina HiScanSQ Illumina HiSeq 1000 Illumina HiSeq 1500 Illumina HiSeq 2000 Illumina HiSeq 2500 Illumina HiSeq 3000 Illumina HiSeq 4000 -Illumina iSeq 100 -Illumina HiScanSQ -Illumina NextSeq 500 -Illumina NextSeq 550 -Illumina NovaSeq 6000 -Illumina HiSeq X Five -Illumina HiSeq X Ten +Illumina HiSeq X Illumina MiSeq Illumina MiniSeq -AB SOLiD System -AB SOLiD System 2.0 -AB SOLiD System 3.0 -AB SOLiD 3 Plus System -AB SOLiD 4 System -AB SOLiD 4hq System -AB SOLiD PI System -AB 5500 Genetic Analyzer -AB 5500xl Genetic Analyzer -AB 5500xl-W Genetic Analysis System +Illumina NovaSeq 6000 +Illumina NovaSeq X +Illumina iSeq 100 +Ion GeneStudio S5 +Ion GeneStudio S5 Plus +Ion GeneStudio S5 Prime +Ion Torrent Genexus Ion Torrent PGM Ion Torrent Proton Ion Torrent S5 Ion Torrent S5 XL -Complete Genomics +MGISEQ-2000RS +MinION +NextSeq 1000 +NextSeq 2000 +NextSeq 500 +NextSeq 550 +Onso PacBio RS PacBio RS II +PromethION +Revio Sequel Sequel II -AB 3730xL Genetic Analyzer -AB 3730 Genetic Analyzer -AB 3500xL Genetic Analyzer -AB 3500 Genetic Analyzer -AB 3130xL Genetic Analyzer -AB 3130 Genetic Analyzer -AB 310 Genetic Analyzer -BGISEQ-500 -DNBSEQ-T7 -DNBSEQ-G400 -DNBSEQ-G50 -DNBSEQ-G400 FAST +Sequel IIe +UG 100 +unspecified diff -r a62c4a11a67d -r 480d9e9d156b tool-data/library_selection.loc.sample --- a/tool-data/library_selection.loc.sample Thu Nov 10 15:18:00 2022 +0000 +++ b/tool-data/library_selection.loc.sample Fri Oct 27 19:44:40 2023 +0000 @@ -8,7 +8,14 @@ size fractionation MSLL cDNA +cDNA_randomPriming +cDNA_oligo_dT +PolyA +Oligo-dT +Inverse rRNA +Inverse rRNA selection ChIP +ChIP-Seq MNase DNase Hybrid Selection @@ -20,8 +27,5 @@ RACE MDA padlock probes capture method -Oligo-dT -Inverse rRNA selection -ChIP-Seq other unspecified diff -r a62c4a11a67d -r 480d9e9d156b tool-data/library_source.loc.sample --- a/tool-data/library_source.loc.sample Thu Nov 10 15:18:00 2022 +0000 +++ b/tool-data/library_source.loc.sample Fri Oct 27 19:44:40 2023 +0000 @@ -1,5 +1,7 @@ GENOMIC +GENOMIC SINGLE CELL TRANSCRIPTOMIC +TRANSCRIPTOMIC SINGLE CELL METAGENOMIC METATRANSCRIPTOMIC SYNTHETIC diff -r a62c4a11a67d -r 480d9e9d156b tool-data/library_strategy.loc.sample --- a/tool-data/library_strategy.loc.sample Thu Nov 10 15:18:00 2022 +0000 +++ b/tool-data/library_strategy.loc.sample Fri Oct 27 19:44:40 2023 +0000 @@ -3,6 +3,7 @@ WXS RNA-Seq ssRNA-seq +snRNA-seq miRNA-Seq ncRNA-Seq FL-cDNA @@ -33,6 +34,8 @@ Synthetic-Long-Read Targeted-Capture Tethered Chromatin Conformation Capture +NOMe-Seq ChM-Seq GBS +Ribo-Seq OTHER diff -r a62c4a11a67d -r 480d9e9d156b tool-data/platform.loc.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool-data/platform.loc.sample Fri Oct 27 19:44:40 2023 +0000 @@ -0,0 +1,13 @@ +LS454 +ILLUMINA +HELICOS +ABI_SOLID +COMPLETE_GENOMICS +BGISEQ +OXFORD_NANOPORE +PACBIO_SMRT +ION_TORRENT +CAPILLARY +DNBSEQ +ELEMENT +ULTIMA diff -r a62c4a11a67d -r 480d9e9d156b tool-data/study_type.loc.sample --- a/tool-data/study_type.loc.sample Thu Nov 10 15:18:00 2022 +0000 +++ b/tool-data/study_type.loc.sample Fri Oct 27 19:44:40 2023 +0000 @@ -12,3 +12,4 @@ Exome Sequencing Pooled Clone Sequencing Transcriptome Sequencing +Other diff -r a62c4a11a67d -r 480d9e9d156b tool_data_table_conf.xml.sample --- a/tool_data_table_conf.xml.sample Thu Nov 10 15:18:00 2022 +0000 +++ b/tool_data_table_conf.xml.sample Fri Oct 27 19:44:40 2023 +0000 @@ -4,10 +4,10 @@ value
value
value
+ value
value
value
value
value
value
- diff -r a62c4a11a67d -r 480d9e9d156b tool_data_table_conf.xml.test --- a/tool_data_table_conf.xml.test Thu Nov 10 15:18:00 2022 +0000 +++ b/tool_data_table_conf.xml.test Fri Oct 27 19:44:40 2023 +0000 @@ -4,6 +4,7 @@ value
value
value
+ value
value
value
value