# nf-core tutorial # setup * log into eddie * qlogin into node * `qlogin -pe interactivemem 2 -l h_vmem=3G` * Move to scratch directory * `cd /exports/eddie/scratch/$USER` * Make semplelab folder and move into it ~~~ mkdir nfcore_tut cd nfcore_tut ~~~ * load singularity, anaconda and nextflow modules ~~~ module load roslin/singularity/3.5.3 module load igmm/apps/nextflow/20.12.0-edge ~~~ * set conda cache directory ~~~ export NXF_CONDA_CACHEDIR="/exports/igmm/eddie/public/semplelab/conda" ~~~ * load conda enviroment (you will need conda setup) * `conda activate /exports/igmm/eddie/public/semplelab/.env` * run ~~~ nf-core --version ~~~ You should get output ~~~ ,--./,-. ___ __ __ __ ___ /,-._.--~\ |\ | |__ __ / ` / \ |__) |__ } { | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' nf-core/tools version 1.13 There is a new version of nf-core/tools available! (1.13.1) nf-core, version 1.13 ~~~ # List nf-core pipelines ~~~ nf-core list --help ~~~ ~~~ nf-core list ~~~ ### Filter pipelines ~~~ nf-core list rnaseq ~~~ ### Sort ~~~ nf-core list rnaseq -s stars ~~~ # Run test hlatyping pipeline ## Pull latest hlatyping pipeline ~~~ nextflow pull nf-core/hlatyping -r 1.2 ~~~ ## Configuration 1. create the file `custom.config` 2. add the following ~~~ params.email=`myemail` ~~~ ## Run locally This will run the pipeline on the current node using the test profile and singularity ~~~ nextflow run nf-core/hlatyping -r 1.2 -profile test,singularity -c custom.config ~~~ It will fail with an error message ~~~ Error executing process > 'remap_to_hla (1)' Caused by: Process requirement exceed available CPUs -- req: 2; avail: 1 Command executed: samtools view -@ 2 -h -f 0x40 example_pe.bam > output_1.bam samtools view -@ 2 -h -f 0x80 example_pe.bam > output_2.bam samtools bam2fq output_1.bam > output_1.fastq samtools bam2fq output_2.bam > output_2.fastq yara_mapper -e 3 -t 2 -f bam yara/hla_reference_dna output_1.fastq output_2.fastq > output.bam samtools view -@ 2 -h -F 4 -f 0x40 -b1 output.bam > mapped_1.bam samtools view -@ 2 -h -F 4 -f 0x80 -b1 output.bam > mapped_2.bam Command exit status: - Command output: (empty) Work dir: /exports/eddie/scratch/ggrimes2/semplelab/work/d6/bb3f7e53f1f464b0184d804266c4d3 Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh` ~~~ Use `Ctrl+C` to exit nextflow run The nextflow run failed as it was requesting 2 CPUS and only 1 avialable. Re_run using the `-resume option` using the param max_cpus set to 1 `--max_cpus 1` ~~~ nextflow run nf-core/rnaseq -r 3.0 -profile test,singularity -c custom.config --max_cpus 1 -resume ~~~ ## Results By default the results will be placed in a results directory ## Submit to HPC You can use intitutional configs to submit nextflow to you HPC. ~~~ nextflow run nf-core/hlatyping -r 1.2 -profile eddie,test,singularity -resume ~~~