Nanocompore is written sadly in using Nextflow DSL1 and installing and using it is a nightmare. Also the docker package tleonardi/nanocompore:v1.0.4 miss a dependency ont_vbz_hdf_plugin from it and therefore it keeps on failing at f5c eventalign steps.
Here are the steps to avoid the errors. We will make two separate environments: One will hold nextflow that nanocompore pipeline requires and other will include tools such as f5c and nanocompore that we will be later on used in the modification of the [nanocompore.nf](http://nanocompore.nf/) script.
conda create -n nanocompore -c bioconda nextflow==22.10.6 curl==7.88.1 ## This is the environment from where we will launch the .nf script.
conda create -n nanocompore_utils -c bioconda f5c ont_vbz_hdf_plugin ## For tool installation and debugging
conda activate nanocompore_utils
Install nanocompore with conda or pip: conda install nanocompore or pip install nanocompore
now go to [nanocompore.nf](http://nanocompore.nf/)
if( params.FPGA=="false"){
// Run f5c eventalign
process eventalign {
publishDir "${params.resultsDir}/${sample}/", mode: 'copy'
//container "${params.eventalign_container}" <------------------------ Commented this
input:
// The raw data file has to have a fixed name to avoid a collision with guppy_results filename
set val(sample), file(guppy_results), val(label), file('raw_data'), file(bam_file), file(bam_index) from guppy_outputs_eventalign.join(eventalign_annot).join(minimap)
each file(transcriptome_fasta) from transcriptome_fasta_eventalign
output:
set val(sample), val(label), file("eventalign_collapse/out_eventalign_collapse.tsv"), file("eventalign_collapse/out_eventalign_collapse.tsv.idx") into eventalign_collapse
file("eventalign.txt") optional true
script:
// def cpus_each = (task.cpus/2).trunc(0)
def cpus_each = task.cpus
def tee = params.keep_eventalign_files ? ' tee eventalign.txt | ' : ''
"""
cat ${guppy_results}/pass/*.fastq > basecalled.fastq
/home/shuaibm/anaconda3/envs/env_nf/bin/f5c index -t ${cpus_each} -d 'raw_data' basecalled.fastq <------------------------ Added Absolute path here
/home/shuaibm/anaconda3/envs/env_nf/bin/f5c eventalign -t ${cpus_each} -r basecalled.fastq -b ${bam_file} -g ${transcriptome_fasta} --samples --print-read-names --scale-events --rna --disable-cuda=yes --min-mapq 0 | ${tee} /home/shuaibm/anaconda3/envs/env_nf/bin/nanocompore eventalign_collapse -t ${cpus_each} -o eventalign_collapse --log_level ${params.nanocompore_loglevel} <------------------------ Added Absolute path here
"""
}
now activate the nanocompore conda environment and launch your job:
nextflow run /home/shuaibm/nanocompore_pipeline-master/[nanocompore.nf](http://nanocompore.nf/)
Nanocompore is written sadly in using Nextflow DSL1 and installing and using it is a nightmare. Also the docker package
tleonardi/nanocompore:v1.0.4
miss a dependencyont_vbz_hdf_plugin
from it and therefore it keeps on failing at f5c eventalign steps. Here are the steps to avoid the errors. We will make two separate environments: One will hold nextflow that nanocompore pipeline requires and other will include tools such asf5c
andnanocompore
that we will be later on used in the modification of the[nanocompore.nf](http://nanocompore.nf/)
script..nf
script.conda install nanocompore
orpip install nanocompore
now go to
[nanocompore.nf](http://nanocompore.nf/)
now activate the
nanocompore
conda environment and launch your job: