Mercurial > repos > dcouvin > resfinder4
comparison resfinder/scripts/resfinder.nf @ 0:55051a9bc58d draft default tip
Uploaded
| author | dcouvin |
|---|---|
| date | Mon, 10 Jan 2022 20:06:07 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:55051a9bc58d |
|---|---|
| 1 #!/usr/bin/env nextflow | |
| 2 | |
| 3 python3 = "python3" | |
| 4 resfinder = "/home/projects/cge/apps/resfinder/resfinder/run_resfinder.py" | |
| 5 | |
| 6 params.indir = './' | |
| 7 params.ext = '.fq.gz' | |
| 8 params.outdir = '.' | |
| 9 params.species = 'other' | |
| 10 | |
| 11 println("Search pattern: $params.indir*{1,2}$params.ext") | |
| 12 | |
| 13 Channel | |
| 14 .fromFilePairs("$params.indir*{1,2}$params.ext", followLinks: true) | |
| 15 .set{ infile_ch } | |
| 16 | |
| 17 process resfinder{ | |
| 18 | |
| 19 cpus 5 | |
| 20 time '30m' | |
| 21 memory '1 GB' | |
| 22 clusterOptions '-V -W group_list=cge -A cge' | |
| 23 executor "PBS" | |
| 24 | |
| 25 input: | |
| 26 set sampleID, file(datasetFile) from infile_ch | |
| 27 | |
| 28 output: | |
| 29 stdout result | |
| 30 | |
| 31 """ | |
| 32 set +u | |
| 33 module unload mgmapper metabat fastqc | |
| 34 module unload ncbi-blast perl | |
| 35 source /home/projects/cge/apps/env/rf4_env/bin/activate | |
| 36 module load perl | |
| 37 module load ncbi-blast/2.8.1+ | |
| 38 if [ $params.species = 'other' ] | |
| 39 then | |
| 40 $python3 $resfinder -acq -ifq $datasetFile -o '$params.outdir/$sampleID' -s '$params.species' | |
| 41 else | |
| 42 $python3 $resfinder -acq -ifq $datasetFile -o '$params.outdir/$sampleID' -s '$params.species' --point | |
| 43 fi | |
| 44 """ | |
| 45 } | |
| 46 | |
| 47 /* | |
| 48 result.subscribe { | |
| 49 println it | |
| 50 } | |
| 51 */ |
