User Tools

Site Tools


scripts:qc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
scripts:qc [2025/03/12 10:13] 37.26.174.181scripts:qc [2025/03/21 12:43] (current) 37.26.174.181
Line 92: Line 92:
 echo "Running MultiQC..." echo "Running MultiQC..."
 mkdir -p "$output_dir" mkdir -p "$output_dir"
-multiqc -o "$output_dir" "$input_dir/"*.fq.gz+multiqc -o "$output_dir" "$input_dir"
 </code> </code>
  
Line 101: Line 101:
 #SBATCH --mem=10gb #SBATCH --mem=10gb
 #SBATCH --cpus-per-task=10 #SBATCH --cpus-per-task=10
-#SBATCH --job-name=fastqc_multiqc_00 +#SBATCH --job-name=multiqc_00 
-#SBATCH --output=log/fastqc_00%j.log  # %j will be replaced with the job ID+#SBATCH --output=log/multiqc_00%j.log  # %j will be replaced with the job ID
  
 #parameters #parameters
Line 114: Line 114:
 You can also perform them simultaneously with one parent script: You can also perform them simultaneously with one parent script:
 == Combined parent script == == Combined parent script ==
-fastqc_multiqc_00.sh+qc_00.sh
 <code> <code>
 #!/bin/bash #!/bin/bash
Line 133: Line 133:
 </code> </code>
  
-You can also use the same scripts on trimmed files. Just add "_trimmed" to the inputs and outputs like this. Remember to save them in separate olders (fastqc_trimmed, multiqc_trimmed)+You can also use the same scripts on trimmed files. Just add "_trimmed" to the inputs and outputs like this. Remember to save them in separate folders (fastqc_trimmed, multiqc_trimmed) 
 + 
 +fastqc_post_00.sh
 <code> <code>
-#Input parameters+#!/bin/bash 
 +#SBATCH --mem=10gb 
 +#SBATCH --cpus-per-task=10 
 +#SBATCH --job-name=fastqc_post_00 
 +#SBATCH --output=log/fastqc_post_00%j.log  # %j will be replaced with the job ID 
 + 
 +#parameters 
 input=fq_trimmed input=fq_trimmed
 output=fastqc_trimmed output=fastqc_trimmed
 +
 +src/fastqc.sh $input $output
 </code> </code>
  
-== Fastp =+multiqc_post_00.sh 
-If you want to add Fastp reports to MultiQC, you can add "fq_trimmed" directory as input to MultiQC.+<code> 
 +#!/bin/bash 
 +#SBATCH --mem=10gb 
 +#SBATCH --cpus-per-task=10 
 +#SBATCH --job-name=multiqc_post_00 
 +#SBATCH --output=log/multiqc_post_00%j.log  # %j will be replaced with the job ID
  
-In daughter script:+#parameters 
 + 
 +input=fastqc_trimmed 
 +output=multiqc_trimmed 
 + 
 +src/multiqc.sh $input $output 
 +</code> 
 + 
 +=== Fastp === 
 +If you want to add Fastp reports to MultiQC, you can add "fq_trimmed" directory as input to MultiQC (multiqc_fastp.sh). 
 + 
 +== Daughter script == 
 +multiqc_fastp.sh:
 <code> <code>
-Rest of the code+SCRIPT FOR PERFORMING MultiQC 
 +# NOTE: Run this script from the directory where the "log" directory is located, 
 +#       Example: /mnt/proj/ibd/ds-06_cd-fecal/common 
 +
 +# 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/multiqc.sh <input_dir> <output_dir> 
 +
 +# IMPORTANT: 
 +#   - Run from a parent script. 
 + 
 +# Check if correct number of arguments are provided 
 +if [ "$#" -ne 2 ]; then 
 +    echo "Usage: $0 <input_dir> <output_dir>" 
 +    exit 1 
 +fi 
 # Input parameters # Input parameters
-input_dir="$1" +input_dir=$1 
-input_fastp="$2" +input_fastp=$2 
-output_dir="$3" +output_dir=$3 
-# Rest of the code+ 
 +echo "Running MultiQC...
 +mkdir -p "$output_dir" 
 +multiqc -o "$output_dir" "$input_dir" "$input_fastp"
 </code> </code>
  
-In parent script:+== Parent == 
 +multiqc_fastp_00.sh
 <code> <code>
-Rest of the code +#!/bin/bash 
-src/multiqc.sh $input_dir $input_fastp $output_dir+#SBATCH --mem=10gb 
 +#SBATCH --cpus-per-task=10 
 +#SBATCH --job-name=multiqc_fastp_00 
 +#SBATCH --output=log/multiqc_fastp_00%j.log  # %j will be replaced with the job ID 
 + 
 +#parameters 
 + 
 +input=fastqc_trimmed 
 +input_fastp=fq_trimmed 
 +output=multiqc_trimmed 
 + 
 +src/multiqc.sh $input $input_fastp $output
 </code> </code>
scripts/qc.1741774395.txt.gz · Last modified: by 37.26.174.181

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki