Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling multiple fastqs in urls.list file during continuous download #2

Open
SimonDMurray opened this issue May 19, 2023 · 0 comments

Comments

@SimonDMurray
Copy link
Member

Hi Alex,

I found a useful little tool that may be helpful for your reprocessing pipeline during the continous_download.sh section.

The following code takes a string containing multiple fastqs delimited by a ; and splits them into separate elements in an array:

#!/bin/bash

set -euo pipefail

# split up fastq files if there are more than one into an array

line="ftp.sra.ebi.ac.uk/vol1/fastq/SRR713/005/SRR7130925/SRR7130925_1.fastq.gz;ftp.sra.ebi.ac.uk/vol1/fastq/SRR713/005/SRR7130925/SRR7130925_2.fastq.gz"

if grep -q ";" <<< $line; then
  arrURL=(${line//;/ }) 
else
  arrURL=(${line})
fi

for URL in ${arrURL[@]}; do
  echo $URL
done

I hope this helps and obviously no pressure to include it!

Simon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant