view get_test_data.sh @ 0:6e13890afaef draft default tip

"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/qc/fastq_pair commit e8517297f4bf2ab5afc544e6af7bb4c5f152dd3e"
author ebi-gxa
date Thu, 17 Mar 2022 01:46:15 +0000
parents
children
line wrap: on
line source

#!/usr/bin/env bash

BASE_LINK="https://raw.githubusercontent.com/linsalrob/fastq-pair/master/test"

LEFT_FILE="left.fastq"
RIGHT_FILE="right.fastq"
LEFTGZ_FILE="left.fastq.gz"
RIGHTGZ_FILE="right.fastq.gz"

LEFT_LINK=$BASE_LINK"/"$LEFT_FILE
RIGHT_LINK=$BASE_LINK"/"$RIGHT_FILE
LEFTGZ_LINK=$BASE_LINK"/"$LEFTGZ_FILE
RIGHTGZ_LINK=$BASE_LINK"/"$RIGHTGZ_FILE

function get_data {
  local link=$1
  local fname=$2

  if [ ! -f $fname ]; then
    echo "$fname not available locally, downloading.."
    wget -O $fname --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 3 $link
  fi
}

# Get test data
pushd test-data

get_data $LEFT_LINK $LEFT_FILE
get_data $RIGHT_LINK $RIGHT_FILE
get_data $LEFTGZ_LINK $LEFTGZ_FILE
get_data $RIGHTGZ_LINK $RIGHTGZ_FILE