Help improve this workflow!
This workflow has been published but could be further improved with some additional meta data:- Keyword(s) in categories input, output
You can help improve this workflow by suggesting the addition or removal of keywords, suggest changes and report issues, or request to become a maintainer of the Workflow .
Fastq-to-BAM @ NCI-Gadi is a genome alignment workflow that takes raw FASTQ files, aligns them to a reference genome and outputs analysis ready BAM files. This workflow is designed for the National Computational Infrastructure's (NCI) Gadi supercompter, leveraging multiple nodes on NCI Gadi to run all stages of the workflow in parallel, either massively parallel using the scatter-gather approach or parallel by sample. It consists of a number of stages and follows the BROAD Institute's best practice recommendations.
Infrastructure_deployment_metadata: Gadi (NCI)
Code Snippets
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | set -e # Wont work if in run_parallel script postalt=./bwa-postalt.js ref=../Reference/hs38DH.fasta outdir=../Align_split hladir=../HLA_fastq logdir=Logs/Align errdir=Logs/Align_error_capture fqpair=`echo $1 | cut -d ',' -f 1` fq1=$(ls ${fqpair}*R1.f*q.gz) #Must check regex for each batch fq2=$(ls ${fqpair}*R2.f*q.gz) sampleID=`echo $1 | cut -d ',' -f 2` centre=`echo $1 | cut -d ',' -f 3` lib=`echo $1 | cut -d ',' -f 4` platform=`echo $1 | cut -d ',' -f 5` flowcell=`echo $1 | cut -d ',' -f 6` lane=`echo $1 | cut -d ',' -f 7` outPrefix=$(basename $fqpair) err=${errdir}/${outPrefix}.err #bwakit emits default sort order (queryname, but no SO tag in headers) or option to sort #by coordinate with samtools but does not allow the -n flag to specify sort order by name. #Sambamba requires queryname sorted with SO tag. Below code does it by force. echo fqpair:$fqpair fq1:$fq1 fq2:$fq2 sampleID:$sampleID centre:$centre lib:$lib platform:$platform flowcell:$flowcell lane:$lane outPrefix:$outPrefix err:$err ref:$ref NCPUS:$NCPUS seqtk mergepe $fq1 $fq2 | bwa mem -p -t $NCPUS \ -R "@RG\tID:${flowcell}.${lane}_${sampleID}_${lib}\tPL:${platform}\tPU:${flowcell}.${lane}\tSM:${sampleID}\tLB:${sampleID}_${lib}\tCN:${centre}" \ -M ${ref} - 2> ${logdir}/${outPrefix}.log.bwamem | k8 ${postalt} -p ${hladir}/${outPrefix} ${ref}.alt \ | samtools sort -n -@ $NCPUS -o ${outdir}/${outPrefix}.aln.bam if ! samtools quickcheck ${outdir}/${outPrefix}.aln.bam then printf "Corrupted or missing BAM\n" > $err fi |
24 25 26 27 28 29 30 | fastq=`echo $1 | cut -d ',' -f 1` out=`echo $1 | cut -d ',' -f 2` logfile=`echo $1 | cut -d ',' -f 3` echo "$(date): Running fastQC. Fastq:${fastq}, Output:${out}, Log file: ${logfile}, NCPUS:${NCPUS}" >> ${logfile} 2>&1 fastqc -t ${NCPUS} --extract -o ${out} ${fastq} >> ${logfile} 2>&1 |
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | fqpair=`echo $1 | cut -d ',' -f 1` file=$(basename $fqpair) fq1=$(ls ${fqpair}*R1*f*q.gz) #Must check regex for each batch. fq2=$(ls ${fqpair}*R2*f*q.gz) log=./Logs/Split_fastq/${file}.log fastp -i ${fq1} \ -I ${fq2} \ -AGQL \ -w $NCPUS \ -S 2000000 \ -d 0 \ --out1 ../Split_fastq/${file}_R1.fastq.gz \ --out2 ../Split_fastq/${file}_R2.fastq.gz 2>${log} |
Support
Do you know this workflow well? If so, you can
request seller status , and start supporting this workflow.
Created: 1yr ago
Updated: 1yr ago
Maitainers:
public
URL:
https://github.com/Sydney-Informatics-Hub/Fastq-to-BAM
Name:
fastq-to-bam
Version:
Version 1
Downloaded:
0
Copyright:
Public Domain
License:
GNU General Public License v3.0
- Future updates
Related Workflows

ENCODE pipeline for histone marks developed for the psychENCODE project
psychip pipeline is an improved version of the ENCODE pipeline for histone marks developed for the psychENCODE project.
The o...

Near-real time tracking of SARS-CoV-2 in Connecticut
Repository containing scripts to perform near-real time tracking of SARS-CoV-2 in Connecticut using genomic data. This pipeli...

snakemake workflow to run cellranger on a given bucket using gke.
A Snakemake workflow for running cellranger on a given bucket using Google Kubernetes Engine. The usage of this workflow ...

ATLAS - Three commands to start analyzing your metagenome data
Metagenome-atlas is a easy-to-use metagenomic pipeline based on snakemake. It handles all steps from QC, Assembly, Binning, t...
raw sequence reads
Genome assembly
Annotation track
checkm2
gunc
prodigal
snakemake-wrapper-utils
MEGAHIT
Atlas
BBMap
Biopython
BioRuby
Bwa-mem2
cd-hit
CheckM
DAS
Diamond
eggNOG-mapper v2
MetaBAT 2
Minimap2
MMseqs
MultiQC
Pandas
Picard
pyfastx
SAMtools
SemiBin
Snakemake
SPAdes
SqueezeMeta
TADpole
VAMB
CONCOCT
ete3
gtdbtk
h5py
networkx
numpy
plotly
psutil
utils
metagenomics

RNA-seq workflow using STAR and DESeq2
This workflow performs a differential gene expression analysis with STAR and Deseq2. The usage of this workflow is described ...

This Snakemake pipeline implements the GATK best-practices workflow
This Snakemake pipeline implements the GATK best-practices workflow for calling small germline variants. The usage of thi...