Mercurial > repos > dcouvin > resfinder4
comparison resfinder/scripts/resfinder_asm.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.input = './*.fa' | |
7 // params.indir = './' | |
8 // params.ext = '.fa' | |
9 params.outdir = '.' | |
10 params.species = 'other' | |
11 | |
12 println("Search pattern: $params.input") | |
13 | |
14 infile_ch = Channel | |
15 .fromPath("$params.input", followLinks: true) | |
16 .map{ file -> tuple(file.baseName, file) } | |
17 | |
18 process resfinder{ | |
19 | |
20 cpus 1 | |
21 time '30m' | |
22 memory '1 GB' | |
23 clusterOptions '-V -W group_list=cge -A cge' | |
24 executor "PBS" | |
25 | |
26 input: | |
27 set sampleID, file(datasetFile) from infile_ch | |
28 | |
29 output: | |
30 stdout result | |
31 | |
32 """ | |
33 set +u | |
34 module unload mgmapper metabat fastqc | |
35 module unload ncbi-blast perl | |
36 source /home/projects/cge/apps/env/rf4_env/bin/activate | |
37 module load perl | |
38 module load ncbi-blast/2.8.1+ | |
39 if [ $params.species = 'other' ] | |
40 then | |
41 $python3 $resfinder -acq -ifa $datasetFile -o '$params.outdir/$sampleID' -s '$params.species' | |
42 else | |
43 $python3 $resfinder -acq -ifa $datasetFile -o '$params.outdir/$sampleID' -s '$params.species' --point | |
44 fi | |
45 """ | |
46 } | |
47 | |
48 /* | |
49 result.subscribe { | |
50 println it | |
51 } | |
52 */ |