...
Map long ONT reads onto a reference genome
Input:
Code Block |
---|
- ref_genome.fasta
- ref_list.txt # length of sequences in the above file: Accession "tab" Length (i.e., NC001477 10735)
- sample FASTQ file(s) |
Prepare a script, for example, called ‘launch_variant_analysis.pbs’ that contains the following information:
Code Block |
---|
#!/bin/bash -l
#PBS -N nano-Q
#PBS -l walltime=24:00:00
#PBS -l mem=16gb
#PBS -l ncpus=8
cd $PBS_O_WORKDIR
################################################################################################################################
# USER DEFINE VARIABLES
################################################################################################################################
SAMPLEID=NC483
REFNAME=NC001477_RefGenome
LIST='/work/phylo/OxfordNanopore/nextflow/assembly/data/NC483/NC483_ref_list.txt'
REF='/work/phylo/OxfordNanopore/nextflow/assembly/data/NC483/NC483_NC001477_reference_sequence.fasta'
ONT='/work/phylo/OxfordNanopore/nextflow/assembly/data/NC483/NC483_FAU10290_pass_barcode96_0cf303ee.fastq'
################################################################################################################################
#activate conda environment containing tools for analysis
conda activate nanoQ2
#generic mapping reads
minimap2 -a $REF $ONT > ${SAMPLEID}_aln.sam
#mapping noisy reads
#minimap2 -ax $REF $ONT > ${SAMPLEID}_aln2.sam
#Samtools
samtools view -bt ${LIST} -o ${SAMPLEID}_aln.bam ${SAMPLEID}_aln.sam
samtools sort -T /tmp/aln.sorted -o ${SAMPLEID}_aln.sorted.bam ${SAMPLEID}_aln.bam
samtools index ${SAMPLEID}_aln.sorted.bam |
submit the job to the scheduler
Code Block |
---|
qsub launch_variant_analysis.pbs |
Monitor progress
Code Block |
---|
qjobs |
Additional information
Code Block |
---|
#generic mapping reads minimap2 -a ref.fa ont-reads.fq > aln.sam #mapping noisy reads minimap2 -ax map-ont ref.fa ont-reads.fq > aln.sam # for Oxford Nanopore reads |
...