...
Save a list of SRA accession numbers to download in a file called SraAccList.txt
Code Block |
---|
|
SRR1039508
SRR1039509
SRR1039510
SRR1039511
SRR1039512
SRR1039513
SRR1039514
SRR1039515
SRR1039516
SRR1039517
SRR1039518
SRR1039519
SRR1039520
SRR1039521
SRR1039522
SRR1039523 |
Use the following PBS Pro submission script to fetch the FASTQ files for all listed samples. Note, data will be downloaded to the folder where the job is submitted. Example script (fetch_SraAccList.pbs):
Code Block |
---|
|
#!/bin/bash
#usage: ./fetch_SraAccList.sh SraAccList.txt
for r1 in `cat $1`;
do
qsub <<EOF
#!/bin/bash -l
#PBS -N sra_fetch$(basename $r1)
#PBS -l walltime=810:00:00
#PBS -l mem=8gb8G
#PBS -l ncpus=4
#PBS -m bae
###PBS -M email@host
#PBS
-j oe
#Usage: qsub fetch_SraAccList.pbs
cd $PBS_O_WORKDIR
for#activate iconda inenvironment
`cat SraAccList.txt`;
doconda activate sra
#fetch FASTQ echo $i
files
prefetch $i$r1
fastq-dump --split-files $i$r1
EOF
done |
Submit the job to the HPC cluster:
Code Block |
---|
./fetch_SraAccList.sh SraAccList.txt |
Monitor jobs: