Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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).

Option 1:

Code Block
languagebash
#!/bin/bash
#usage: ./fetch_SraAccList.sh SraAccList.txt

for r1 in `cat $1`;
do

  qsub <<EOF
#!/bin/bash -l

#PBS -N $(basename $r1)
#PBS -l walltime=10:00:00
#PBS -l mem=8G
#PBS -l ncpus=4

cd $PBS_O_WORKDIR

#activate conda environment
conda activate sra

#fetch FASTQ files
prefetch $r1
fastq-dump --split-files $r1  

EOF
done

Option 2:

Code Block
languagebash
#!/bin/bash
#PBS -N SRA
#PBS -l walltime=12:00:00
#PBS -l mem=8G
#PBS -l ncpus=4

cd $PBS_O_WORKDIR

#activate conda environment
conda activate sra

LIST='SraAccList.txt'

#fetch FASTQ files
for i in `cat $LIST`;
do
  echo $i
  prefetch $i
  fastq-dump --split-files $i
done

Submit the job to the HPC cluster:

Code Block
languagepowershell
./fetch_SraAccList.sh SraAccList.txt

...