scripts:qc
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| scripts:qc [2025/03/11 11:41] – created 37.26.174.181 | scripts:qc [2025/03/21 12:43] (current) – 37.26.174.181 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Perform quality check of your FASTQ files ====== | + | ==== Quality Control with FastQC, Fastp and MultiQC |
| - | ===== QC with FASTQC & MULTIQC ===== | + | The following scripts perform quality check with FastQC and MultiQC. You can find Fastp in [[scripts: |
| - | ==== Daughter script ==== | + | === FastQC |
| - | ==== Parent script ==== | + | |
| + | Uses fastq files as inputs and generates reports. Below daughter and parent scripts are provided. | ||
| + | |||
| + | == Dauther script == | ||
| + | fastqc.sh | ||
| < | < | ||
| + | # SCRIPT FOR PERFORMING FASTQC | ||
| + | # NOTE: Run this script from the directory where the " | ||
| + | # | ||
| + | # | ||
| + | # PURPOSE: | ||
| + | # This script performs FastQC. | ||
| + | # | ||
| + | # PARAMETERS: | ||
| + | # 1: input_dir - Directory where FASTQ files are located. | ||
| + | # 2: output_dir - Directory where FastQC reports will be located | ||
| + | # SAMPLE USAGE: | ||
| + | # In a parent script: src/ | ||
| + | # | ||
| + | # IMPORTANT: | ||
| + | # - Run from a parent script. | ||
| + | |||
| + | # Check if correct number of arguments are provided | ||
| + | if [ " | ||
| + | echo " | ||
| + | exit 1 | ||
| + | fi | ||
| + | |||
| + | # Input parameters | ||
| + | input_dir=" | ||
| + | output_dir=" | ||
| + | |||
| + | echo " | ||
| + | mkdir -p " | ||
| + | fastqc -o " | ||
| </ | </ | ||
| - | ===== QC with FASTP & MULTIQC ===== | + | == Parent script |
| - | ==== Daughter script ==== | + | fastqc_00.sh |
| - | ==== Parent script ==== | + | < |
| + | # | ||
| + | #SBATCH --mem=10gb | ||
| + | #SBATCH --cpus-per-task=10 | ||
| + | #SBATCH --job-name=fastqc_00 | ||
| + | #SBATCH --output=log/ | ||
| + | #parameters | ||
| + | |||
| + | input=fq_renamed | ||
| + | output=fastqc | ||
| + | |||
| + | src/ | ||
| + | </ | ||
| + | === MultiQC === | ||
| + | |||
| + | MultiQC generates a report based on multiple FastQC reports and enables to view then simultaneously. MultiQC also takes Fastp reports as input and allocates a separate section. | ||
| + | |||
| + | == Dauther script == | ||
| + | multiqc.sh | ||
| + | < | ||
| + | # SCRIPT FOR PERFORMING MultiQC | ||
| + | # NOTE: Run this script from the directory where the " | ||
| + | # | ||
| + | # | ||
| + | # PURPOSE: | ||
| + | # This script performs MultiQC. | ||
| + | # | ||
| + | # PARAMETERS: | ||
| + | # 1: input_dir - Directory where FastQC reports are located. | ||
| + | # 2: output_dir - Directory where MultiQC report will be located | ||
| + | # SAMPLE USAGE: | ||
| + | # In a parent script: src/ | ||
| + | # | ||
| + | # IMPORTANT: | ||
| + | # - Run from a parent script. | ||
| + | |||
| + | # Check if correct number of arguments are provided | ||
| + | if [ " | ||
| + | echo " | ||
| + | exit 1 | ||
| + | fi | ||
| + | |||
| + | # Input parameters | ||
| + | input_dir=" | ||
| + | output_dir=" | ||
| + | |||
| + | echo " | ||
| + | mkdir -p " | ||
| + | multiqc -o " | ||
| + | </ | ||
| + | |||
| + | == Parent script == | ||
| + | multiqc_00.sh | ||
| + | < | ||
| + | #!/bin/bash | ||
| + | #SBATCH --mem=10gb | ||
| + | #SBATCH --cpus-per-task=10 | ||
| + | #SBATCH --job-name=multiqc_00 | ||
| + | #SBATCH --output=log/ | ||
| + | |||
| + | #parameters | ||
| + | |||
| + | input=fastqc | ||
| + | output=multiqc | ||
| + | |||
| + | src/ | ||
| + | </ | ||
| + | |||
| + | You can also perform them simultaneously with one parent script: | ||
| + | == Combined parent script == | ||
| + | qc_00.sh | ||
| + | < | ||
| + | #!/bin/bash | ||
| + | #SBATCH --mem=10gb | ||
| + | #SBATCH --cpus-per-task=10 | ||
| + | #SBATCH --job-name=fastqc_multiqc_00 | ||
| + | #SBATCH --output=log/ | ||
| + | |||
| + | #parameters | ||
| + | |||
| + | input_fqc=fq | ||
| + | output_fqc=fastqc | ||
| + | input_mqc=fastqc | ||
| + | output_mqc=multiqc | ||
| + | |||
| + | src/ | ||
| + | src/ | ||
| + | </ | ||
| + | |||
| + | You can also use the same scripts on trimmed files. Just add " | ||
| + | |||
| + | fastqc_post_00.sh | ||
| + | < | ||
| + | #!/bin/bash | ||
| + | #SBATCH --mem=10gb | ||
| + | #SBATCH --cpus-per-task=10 | ||
| + | #SBATCH --job-name=fastqc_post_00 | ||
| + | #SBATCH --output=log/ | ||
| + | |||
| + | #parameters | ||
| + | |||
| + | input=fq_trimmed | ||
| + | output=fastqc_trimmed | ||
| + | |||
| + | src/ | ||
| + | </ | ||
| + | |||
| + | multiqc_post_00.sh | ||
| + | < | ||
| + | #!/bin/bash | ||
| + | #SBATCH --mem=10gb | ||
| + | #SBATCH --cpus-per-task=10 | ||
| + | #SBATCH --job-name=multiqc_post_00 | ||
| + | #SBATCH --output=log/ | ||
| + | |||
| + | #parameters | ||
| + | |||
| + | input=fastqc_trimmed | ||
| + | output=multiqc_trimmed | ||
| + | |||
| + | src/ | ||
| + | </ | ||
| + | |||
| + | === Fastp === | ||
| + | If you want to add Fastp reports to MultiQC, you can add " | ||
| + | |||
| + | == Daughter script == | ||
| + | multiqc_fastp.sh: | ||
| + | < | ||
| + | # SCRIPT FOR PERFORMING MultiQC | ||
| + | # NOTE: Run this script from the directory where the " | ||
| + | # | ||
| + | # | ||
| + | # PURPOSE: | ||
| + | # This script performs MultiQC. | ||
| + | # | ||
| + | # PARAMETERS: | ||
| + | # 1: input_dir - Directory where FastQC reports are located. | ||
| + | # 2: output_dir - Directory where MultiQC report will be located | ||
| + | # SAMPLE USAGE: | ||
| + | # In a parent script: src/ | ||
| + | # | ||
| + | # IMPORTANT: | ||
| + | # - Run from a parent script. | ||
| + | |||
| + | # Check if correct number of arguments are provided | ||
| + | if [ " | ||
| + | echo " | ||
| + | exit 1 | ||
| + | fi | ||
| + | |||
| + | # Input parameters | ||
| + | input_dir=$1 | ||
| + | input_fastp=$2 | ||
| + | output_dir=$3 | ||
| + | |||
| + | echo " | ||
| + | mkdir -p " | ||
| + | multiqc -o " | ||
| + | </ | ||
| + | |||
| + | == Parent == | ||
| + | multiqc_fastp_00.sh | ||
| + | < | ||
| + | #!/bin/bash | ||
| + | #SBATCH --mem=10gb | ||
| + | #SBATCH --cpus-per-task=10 | ||
| + | #SBATCH --job-name=multiqc_fastp_00 | ||
| + | #SBATCH --output=log/ | ||
| + | |||
| + | #parameters | ||
| + | |||
| + | input=fastqc_trimmed | ||
| + | input_fastp=fq_trimmed | ||
| + | output=multiqc_trimmed | ||
| + | |||
| + | src/ | ||
| + | </ | ||
scripts/qc.1741693260.txt.gz · Last modified: by 37.26.174.181
