Test3_Sniffles - sansuach/Sanskritiacharya GitHub Wiki

First, I started by changing to my working directory on the ISAAC server where I set up for structural variant (SV) detection using Sniffles.

cd /lustre/isaac/proj/UTK0318/test3/analysis/sachar10/

I created a directory specifically for the Sniffles output to keep files organized, and I entered the Sniffles directory to perform the setup and analysis within this folder.

mkdir sniffles_sv
cd sniffles_sv

I created a new Conda environment called Sniffles and activated this environment to use Sniffles and associated tools

conda create -n sniffles bioconda::sniffles
conda activate sniffles

I created symbolic links to the BAM file, BAM index, and reference genome, which are required inputs for Sniffles.This allows Sniffles to access these files without duplicating them.

ln -s /lustre/isaac/proj/UTK0318/dogwood_genome/analysis/sachar10/2_minimap2/CherBrave_Run1.bam
ln -s /lustre/isaac/proj/UTK0318/dogwood_genome/analysis/sachar10/2_minimap2/CherBrave_Run1.bam.bai
ln -s /lustre/isaac/proj/UTK0318/dogwood_genome/raw_data/AppSpring_1.0.0_Hap1.Chr11.fasta

Using nano, I created a Slurm script snifflessv.qsh to submit the Sniffles job on the ISAAC server.

nano snifflessv.qsh

Inside the file, I added the following content:

#!/bin/bash
#SBATCH -J snifflessv
#SBATCH --nodes=1
#SBATCH --cpus-per-task=11
#SBATCH -A ISAAC-UTK0318
#SBATCH -p short
#SBATCH -q short
#SBATCH -t 03:00:00
#SBATCH --mail-type=END,FAIL
#SBATCH [email protected]
#SBATCH --output=R-%x.%j.out
#SBATCH --error=R-%x.%j.err

# Load conda environment
eval "$(conda shell.bash hook)"
conda activate sniffles

sniffles \
  --threads 11 \
  --input CherBrave_Run1.bam \
  --reference AppSpring_1.0.0_Hap1.Chr11.fasta \
  --vcf CherBrave_Run1.gt.vcf

I submitted the job to the ISAAC server using:

sbatch snifflessv.qsh

After the Sniffles job completes, I created and activated another environment for SURVIVOR, which I used to analyze the output VCF file.

conda create -n survivor bioconda::survivor
conda activate survivor

I used SURVIVOR to calculate statistics on the VCF file generated by Sniffles, saving the output to CherBrave_Run1.gt.vcf.stats.

SURVIVOR stats CherBrave_Run1.gt.vcf -1 -1 -1 CherBrave_Run1.gt.vcf.stats

Finally, I inspected the SURVIVOR statistics for a summary of structural variants identified in the sample.

cd assembly.compleasm
cat CherBrave_Run1.gt.vcf.stats