This is a pipeline to obtain relative copy number from fastq files from sWGS. This pipeline is written using nextflow. I have aligned here to hg19 for ease, as hg38 bin annotations are not easily available for analysis with QDNASeq at this time.
FASTQC_RAW- fastQC is used on the raw files to determine their quality
TRIMMOMATIC- Trimmomatic is used to trim out adapters and polyG tails. These are available in a text file in /bin and specified with
params.adap
- Trimmomatic is used to trim out adapters and polyG tails. These are available in a text file in /bin and specified with
FASTQC_TRIM- Used to determine the quality of the sequences after trimming out adapters and polyG tails.
MultiQC_TRIM- Used to collect results from fastQC before and after trim and create one report for all fastqc reports
ALIGNbwamemandsamtoolsare used to align the sWGS files to hg19 and sort/index resulting bam files. A genome index is needed for this step and its path is specified usingparams.index.qualimapis also used to determine efficiency of the mapping
- QDNNASeq is used to obtain relative copy number from bam files using a customised Rscript in
$projectDir/bin. This process is a little different, as two separate scripts are needed depending on whether the sex chromosomes are to be included in analysis as specified using the--sexChrInclflag:QDNASEQ- default option. Sex chromosomes are not included in analysis, nextflow directs to theQDNASeq.Rscript in$projectDir/binQDNASEQSEX- Sex chromosomes included in analysis, based on the presence of the--sexChrInclflag in the mainnextflow runcommand
--readscan be used to specify the path to the reads. Default is set to$projectDir/sWGS/fastq/*_{R1,R2}.fq.gz--indexpath to BWA indexed genome. Default is hg19 in reference data in ICR cluster Alma.--outdirwhere to publish results. Deafult$projectDir/results--adappath to textfile where adapter sequences are. These are essential for trimmomatic.--binsizedefault30, allows you to specify the bin size for QDNASeq. available options are 1, 5, 10, 15, 30, 50, 100, 500, and 1000 kbp.--sexChrInclspecify this flag if you want to include sex chromsomes. Othersie QDNASeq will ignore them.
Two customised scripts for QDNASeq can be found in /bin (QDNAseq.R QDNAseq_sexChrIncl.R). These have been made using the QDNASeq vignette available here
The main script is in 8-GTN_sWGS.nf. You will also need bin/QDNAseq.R and bin/QDNAseq_sexChrIncl.R which must be executable, use chmod +x to do this.
Depending on the cluster, the way the main script is executed will be different. nextflow.config was made to be compatible with ICR alma.