Mercurial > repos > mingchen0919 > aurora_fasta_importer
changeset 6:63e9ce43c1ee draft
planemo upload
author | mingchen0919 |
---|---|
date | Wed, 16 May 2018 11:51:50 -0400 |
parents | 8850e8e60977 |
children | 803a8301bce5 |
files | build-and-run-job-scripts.sh command-line-arguments.csv rmarkdown_report.xml twoBitToFa |
diffstat | 4 files changed, 22 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/build-and-run-job-scripts.sh Tue May 15 09:00:22 2018 -0400 +++ b/build-and-run-job-scripts.sh Wed May 16 11:51:50 2018 -0400 @@ -3,10 +3,22 @@ #========== build and run job 1 script ============ cat >curl-download.sh <<EOF -# use the first line as an url and start downloading. If it failed, run the second command. -curl $(head -1 $X_f) > $X_O || cp $X_f $X_O +if [ $(wc -l <$X_f) -gt 2 ]; then + cp $X_f $X_O +else + if [ "$X_e" = "twobit" ]; then + cp $TOOL_INSTALL_DIR/twoBitToFa twoBitToFa + chmod +x twoBitToFa + ./twoBitToFa $(head -1 $X_f) $X_O + elif [ "$X_e" = "gz" ]; then + curl $(head -1 $X_f) > output.fa.gz + gunzip -c output.fa.gz > $X_O + else + curl $(head -1 $X_f) > $X_O + fi +fi + EOF -# run job 1 script sh curl-download.sh
--- a/command-line-arguments.csv Tue May 15 09:00:22 2018 -0400 +++ b/command-line-arguments.csv Wed May 16 11:51:50 2018 -0400 @@ -2,5 +2,6 @@ o,1,character,report d,1,character,report.files_path f,1,character,upload_fasta +e,1,character,url_ext O,1,character,output_fasta
--- a/rmarkdown_report.xml Tue May 15 09:00:22 2018 -0400 +++ b/rmarkdown_report.xml Wed May 16 11:51:50 2018 -0400 @@ -30,6 +30,7 @@ -d $report.files_path -f $upload_fasta + -e $url_ext -O $output_fasta @@ -37,6 +38,11 @@ <inputs> <param type="data" name="upload_fasta" format="txt,fa,fna,fasta" label="Fasta file or Fasta URL" help="A fasta file or a txt file. If it is txt file, it should only has one line, which is an URL to a downloadable fasta file."/> + <param type="select" name="url_ext" label="URL fasta format"> + <option value="fasta" selected="true">.fa, .fasta</option> + <option value="gz">.gz</option> + <option value="twobit">.2bit</option> + </param> </inputs> <outputs> <data format="html" name="report" label="${tool.name} report on ${on_string}"/>