-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Collection of bash scripts used throughout the pipeline
- Loading branch information
Showing
10 changed files
with
153 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#!/bin/bash | ||
#SBATCH [email protected] | ||
#SBATCH --mail-type=END | ||
cat accessions.txt | while read line | ||
do | ||
echo "Reading ${line}" | ||
if [ ! -f /gpfs/home/naa17jnu/scratch/seq_runs/${line}.fastq.gz ] # check if file doesnt already exist | ||
then | ||
echo "File ${line} doesnt exist - downloading" | ||
if wget --spider ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/000/${line}/${line}.fastq.gz 2>/dev/null | ||
then | ||
echo "Found ${line}.fastq.gz on 000" | ||
wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/000/${line}/${line}.fastq.gz -P /gpfs/home/naa17jnu/scratch/seq_runs | ||
fi | ||
if wget --spider ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/001/${line}/${line}.fastq.gz 2>/dev/null | ||
then | ||
echo "Found ${line}.fastq.gz on 001" | ||
wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/001/${line}/${line}.fastq.gz -P /gpfs/home/naa17jnu/scratch/seq_runs | ||
fi | ||
if wget --spider ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/002/${line}/${line}.fastq.gz 2>/dev/null | ||
then | ||
echo "Found ${line}.fastq.gz on 002" | ||
wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/002/${line}/${line}.fastq.gz -P /gpfs/home/naa17jnu/scratch/seq_runs | ||
fi | ||
if wget --spider ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/003/${line}/${line}.fastq.gz 2>/dev/null | ||
then | ||
echo "Found ${line}.fastq.gz on 003" | ||
wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/003/${line}/${line}.fastq.gz -P /gpfs/home/naa17jnu/scratch/seq_runs | ||
fi | ||
if wget --spider ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/004/${line}/${line}.fastq.gz 2>/dev/null | ||
then | ||
echo "Found ${line}.fastq.gz on 004" | ||
wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/004/${line}/${line}.fastq.gz -P /gpfs/home/naa17jnu/scratch/seq_runs | ||
fi | ||
if wget --spider ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/005/${line}/${line}.fastq.gz 2>/dev/null | ||
then | ||
echo "Found ${line}.fastq.gz on 005" | ||
wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/005/${line}/${line}.fastq.gz -P /gpfs/home/naa17jnu/scratch/seq_runs | ||
fi | ||
if wget --spider ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/006/${line}/${line}.fastq.gz 2>/dev/null | ||
then | ||
echo "Found ${line}.fastq.gz on 006" | ||
wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/006/${line}/${line}.fastq.gz -P /gpfs/home/naa17jnu/scratch/seq_runs | ||
fi | ||
if wget --spider ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/007/${line}/${line}.fastq.gz 2>/dev/null | ||
then | ||
echo "Found ${line}.fastq.gz on 007" | ||
wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/007/${line}/${line}.fastq.gz -P /gpfs/home/naa17jnu/scratch/seq_runs | ||
fi | ||
if wget --spider ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/008/${line}/${line}.fastq.gz 2>/dev/null | ||
then | ||
echo "Found ${line}.fastq.gz on 008" | ||
wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/008/${line}/${line}.fastq.gz -P /gpfs/home/naa17jnu/scratch/seq_runs | ||
fi | ||
if wget --spider ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/009/${line}/${line}.fastq.gz 2>/dev/null | ||
then | ||
echo "Found ${line}.fastq.gz on 008" | ||
wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR838/009/${line}/${line}.fastq.gz -P /gpfs/home/naa17jnu/scratch/seq_runs | ||
fi | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
#SBATCH [email protected] | ||
#SBATCH --mail-type=END | ||
|
||
source activate icshape-pipe | ||
fasterq-dump SRR11164866 -O /gpfs/home/naa17jnu/scratch/fastq_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
#SBATCH [email protected] | ||
#SBATCH --mail-type=END | ||
#SBATCH --mem=80G | ||
#SBATCH -p compute-24-96 | ||
|
||
export PATH=/gpfs/home/naa17jnu/.conda/envs/r-env/bin:$PATH | ||
source activate r-env | ||
Rscript sleuth-new.R |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
#SBATCH [email protected] | ||
#SBATCH --mail-type=END | ||
|
||
cat accessions.txt | while read line | ||
do | ||
echo "Cleaning ${line}" | ||
./fastp -i /gpfs/home/naa17jnu/scratch/seq_runs/${line}.fastq.gz -o /gpfs/home/naa17jnu/scratch/fastp/${line}_clean.fastq.gz -Q -L -j ${line}.json - h ${line}.html -R "${line}" | ||
echo "Done" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
#SBATCH [email protected] | ||
#SBATCH --mail-type=END | ||
|
||
|
||
# MUST DO module load fastqc/0.11.9 before running | ||
module load fastqc/0.11.9 | ||
cat accessions.txt | while read line | ||
do | ||
echo "Cleaning ${line}" | ||
fastqc /gpfs/home/naa17jnu/scratch/seq_runs/${line}.fastq.gz --outdir /gpfs/home/naa17jnu/scratch/fastqc_analysis | ||
echo "Done" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
cat input_mirs.txt | while read line | ||
do | ||
echo "Reading ${line}" | ||
python miR-Search.py format -i sleuth_output/sleuth_results_${line}.csv mir_search_output/${line}.csv -o ${line}.csv | ||
echo "Done" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
cat input_mirs.txt | while read line | ||
do | ||
echo "Reading ${line}" | ||
python mir-search ggplot-format -s "sleuth_output_transcript/condition${line} .csv" icshape-align_out_flanking/${line}.pickle -o ${line}.csv | ||
echo "Done" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
cat input_mirs.txt | while read line | ||
do | ||
echo "Reading ${line}" | ||
python mir-search icshape-align -s /home/sammy/Documents/MSc_Research_Project/9.transSHAPE/final.shape -t mir_search_output/${line}.csv -u final_trans.fasta -f 10 | ||
echo "Done" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
#SBATCH [email protected] | ||
#SBATCH --mail-type=END | ||
|
||
#Before running generate index file - kallisto index -i filename | ||
|
||
# DO module load kallisto/0.46.1 | ||
module load kallisto/0.46.1 | ||
line=$1 | ||
echo "Reading ${line}" | ||
if [ -f /gpfs/home/naa17jnu/scratch/fastp/${line}_clean.fastq.gz ] # check clean file actually exists | ||
then | ||
echo "File exists at /gpfs/home/naa17jnu/scratch/fastp/${line}_clean.fastq.gz" | ||
if [ ! -f ${line}_block ] # check kallisto isnt in progress | ||
then | ||
echo "Running kallisto on ${line}" | ||
touch ${line}_block | ||
kallisto quant -i /gpfs/home/naa17jnu/scratch/kallisto/homo_sapiens_GRCh38 --single --fragment-length=180 --sd=20 --bias -b 100 -o /gpfs/home/naa17jnu/scratch/kallisto/${line}_kallisto /gpfs/home/naa17jnu/scratch/fastp/${line}_clean.fastq.gz 2>&1 | tee ${line}_stdout.txt | ||
else | ||
echo "Block file found - is kallisto running already?" | ||
fi | ||
else | ||
echo "Cleaned file not found" | ||
fi | ||
rm -f ${line}_block | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
cat input_mirs.txt | while read line | ||
do | ||
echo "Reading ${line}" | ||
python mir-search mir-search -m -i ${line} final_trans.fasta | ||
echo "Done" | ||
done |