add nextflow d30e48d
This commit is contained in:
41
nextflow/tests-v1/blast.nf
Normal file
41
nextflow/tests-v1/blast.nf
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env nextflow
|
||||
|
||||
params.db = "$baseDir/blast-db/tiny"
|
||||
params.query = "$baseDir/data/sample.fa"
|
||||
params.chunkSize = 1
|
||||
|
||||
DB = file(params.db)
|
||||
|
||||
process blast {
|
||||
input:
|
||||
path 'seq.fa'
|
||||
|
||||
output:
|
||||
path 'out'
|
||||
|
||||
"""
|
||||
blastp -db $DB -query seq.fa -outfmt 6 > out
|
||||
"""
|
||||
}
|
||||
|
||||
process sort {
|
||||
input:
|
||||
path 'hits_*'
|
||||
|
||||
output:
|
||||
stdout
|
||||
|
||||
"""
|
||||
sort hits_*
|
||||
"""
|
||||
}
|
||||
|
||||
|
||||
workflow {
|
||||
Channel.fromPath(params.query) |
|
||||
splitFasta( by: params.chunkSize, file:true ) |
|
||||
blast |
|
||||
collect |
|
||||
sort |
|
||||
subscribe { println it }
|
||||
}
|
||||
Reference in New Issue
Block a user